Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Trigger Zone to destroy all entities

Author
Message
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 27th Sep 2005 01:53
OK..I'm a DB Pro'er, not an FPSC'er, and I can't work out this, my very first script attempt.

I want a Trigger Zone that destroys anything that enters it. If I chuck a crate in, it should be destroyed. If I chuck myself in, or a chair, potted plant or desk, they should all be destroyed.

I figure the script needs to be attached to the Trigger Zone "Main" AI Script. I tried:

:state=0,entitywithinzone=1:destroy

and failed, as did:

:state=0,anywithinzone=1:destroy

At a guess, I would say I am destroying the Trigger Zone, not the entity. Can anyone help me transfer this "Destroy" action to the entity?

Zero #43
19
Years of Service
User Offline
Joined: 5th May 2004
Location: ** in your head **
Posted: 27th Sep 2005 02:04
well, coloff is the statement for the leavecorpse.fpi when the entity dies, try doing that. and you need a within distance thing,

:state=0,(objects within 100 of zone),entitywithinzone=1:coloff or destroy or whatever.

Intel® Pentium® 4 Processor w/ HT Technology 3.4GHz 800MHz FSB w/ 512KB Cache, 1GB DDR PC-2700 at 333MHz - 1x1024 SO-DIMM, ATI MOBILITY™ RADEON™ 9700 128MB DDR, 80GB Hard Drive
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 27th Sep 2005 11:07
COLOFF simply ends collision for the player. This script is also specific to the entity you run it on.

I need to run a script on a zone which effects any entity that enters the zone.

Merranvo
18
Years of Service
User Offline
Joined: 24th May 2005
Location: That ^ is a Orange
Posted: 29th Sep 2005 00:33 Edited at: 29th Sep 2005 00:38
:state=0:state=1
:state=1:activateifused=1,state=2
:state=2,anywithinzone=1:activateifused=0,state=1

//enemy
:state=0,activated=1:state=1
:state=1,activated=0:destroy,state=2

only thing is that steping in the zone destroys all enemys set...

you could also have a boulder do something

//
:state=0,activated=1:state=1
:state=1,activated=0:triggerforce=100
:state=2:moveback=100,state=0

Merranvo, taking over the net, one forum at a time.

"ye oft de adopte early shalt move mountains, and be gods among men"
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 29th Sep 2005 01:25
Cheers, Merranvo. I'll try that when I've got 15 minutes to do it properly.

One thing...
activateifused=1

What does that do, it's been bugging me for a while? Do I need to put a value in the If Used property to make it work, and if so what value?

Merranvo
18
Years of Service
User Offline
Joined: 24th May 2005
Location: That ^ is a Orange
Posted: 30th Sep 2005 01:27
Yeah... the name of the entity involved

Merranvo, taking over the net, one forum at a time.

"ye oft de adopte early shalt move mountains, and be gods among men"
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 30th Sep 2005 10:07
But I won't know the name of the entity involved, it could be anything

Or have I misunderstood?

Pulsar Coder
20
Years of Service
User Offline
Joined: 3rd Jan 2004
Location:
Posted: 30th Sep 2005 21:53
Quote: ":state=0,entitywithinzone=1:destroy"


'destroy' doesn't refer to the entity within the zone but the zone marker. That's why Menarvo suggests using the 'activateifused=1' action command.

Maybe you cuold also try 'activateallinzone=x', being x the value you want to check in the main fpi of the entities you want to destroy (do not use the common ones: 0 and 1).

Then, in the main fpi of every entity write:

:state=0,activated=x:state=1 (being x = 2, for instance)
:state=1,activated=0:destroy,state=2

AFAK, there is no 'destroyanywithinzone' command yet.
Merranvo
18
Years of Service
User Offline
Joined: 24th May 2005
Location: That ^ is a Orange
Posted: 30th Sep 2005 23:14 Edited at: 30th Sep 2005 23:14
Take it away Ultrahead, I missed that command when I went over the sheet... been awhile.

Merranvo, taking over the net, one forum at a time.

"ye oft de adopte early shalt move mountains, and be gods among men"

Login to post a reply

Server time is: 2024-04-23 18:16:24
Your offset time is: 2024-04-23 18:16:24