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 / Destroying entity with trigger zone that is all ready being activated.

Author
Message
bobbyisthebest
13
Years of Service
User Offline
Joined: 12th Mar 2011
Location:
Posted: 27th Aug 2012 17:05
Hi there, I have an entity that is spawned when the player goes into a zone. What I want is another zone that destroys the same entity.
Is there a way to do that?
All other scripts involve just the one trigger to activate the entity script and destroy it, but my entity spawns when it is activated by the first trigger zone.

Help me.... I'm new!
Corno_1
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 27th Aug 2012 18:59 Edited at: 27th Aug 2012 19:08
first read my other post! thats the questions it is for!

second: my answer:
for the triggerzones,write the name of the entity in the ifused field of the trigerzones(both, beginn and end):


for the entity:


next time use my help thread !

Corno

Yes, i´m a noob, but i like it
http://forum.thegamecreators.com/?m=forum_view&t=196656&b=24
bobbyisthebest
13
Years of Service
User Offline
Joined: 12th Mar 2011
Location:
Posted: 27th Aug 2012 22:05
Thanks foe the help. When I go into the first trigger, he spawns alright, but he doesn't go away when I go into the second trigger zone. Do you think this could have anything to do with the fact that I'm using the free version at the moment?

Help me.... I'm new!
Corno_1
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 28th Aug 2012 00:07
Quote: "Thanks foe the help"

I like to help
Quote: "Do you think this could have anything to do with the fact that I'm using the free version at the moment?"

No, because im using the free version too

I make a mistake, sry for that! so i create a new one and this time it is 100% functional!
First triggerzonefor appear entity)

Second triggerzone(disappear entity)

And then for the entity:


So hope now everthings work correctly

Yes, i´m a noob, but i like it
http://forum.thegamecreators.com/?m=forum_view&t=196656&b=24
bobbyisthebest
13
Years of Service
User Offline
Joined: 12th Mar 2011
Location:
Posted: 28th Aug 2012 15:10
I see what your trying to do here, but can an activation have variables like that? Again, using this script I'm having the same problems, the entity spawns, but is not destroyed by the other trigger zone.
Is it possible to have a value set to an activation, I thought you were either activated or not. I'm not sure that activated=0 actually does anything.
I'll try using a global variant instead, do you think that will work?

Thanks a lot for your help!

Help me.... I'm new!
rolfy
18
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 28th Aug 2012 17:05 Edited at: 28th Aug 2012 17:07
Use this instead:

activateifused=2

ifused=2

to destroy the entity in the second trigger.

Awesome! Its one of those threads.
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 28th Aug 2012 17:11
Hi bobbyisthebest
This is an entity and not a npc,right? To activate and destroy same entity w/triggers
First and Second triggers are the same

For the entity use another state in the main script that when activated it destroys it.

This will work. Always run the cleaner between tests.
Best
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 28th Aug 2012 17:21
@ rolfy
I thought they (activateifused) only had values of 0 or 1?
Thank you, thats good to know.
Corno_1
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 28th Aug 2012 17:43 Edited at: 28th Aug 2012 17:49
Quote: "I'm not sure that activated=0 actually does anything."

i does nothing but it is a condition and a condition just check if it is true or not! And activated=0 check if it is deactivated!
Quote: "First and Second triggers are the same"

No, i try this and it works not!
And your scripts dont work! they just destroy the entity!

Descrition how this works(my scripts): (chose folder "With Activation")
First triggerzone(to appear entity)
Set as main script the trigger_first.fpi
Ifused="entity"
Second triggerzone(to destroy the entity)
Set as main script the trigger_second.fpi
Ifused="entity"
Entity(must be dynamic)
Set as main script entity.fpi

Descrition how this works(my scripts): (chose folder "With Variables")
First triggerzone(to appear entity)
Set as main script the trigger_first.fpi
This time no ifused!!!!!
Second triggerzone(to destroy the entity)
Set as main script the trigger_second.fpi
This time no ifused!!!!!
Entity(must be dynamic)
Set as main script entity.fpi

Do not say this time:" It is not working" It works 100%, i test it five times and it always work! If not update to 1.20 beta3, then you maybe have a old version!

Yes, i´m a noob, but i like it
http://forum.thegamecreators.com/?m=forum_view&t=196656&b=24

Attachments

Login to view attachments
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 28th Aug 2012 18:20
Quote: "What I want is another zone that destroys the same entity"

OK, my bad. I just thought that is what he wanted?
rolfy
18
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 28th Aug 2012 19:20 Edited at: 28th Aug 2012 19:29
Quote: "I thought they (activateifused) only had values of 0 or 1?"

Personally I have only used activateifused=2 and know for certain it works, I am not sure how high you can go with these values but its a lot simpler than using variables.

Awesome! Its one of those threads.
Corno_1
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 28th Aug 2012 19:24
Quote: "its a lot simpler than using variables."

and it is faster than variables! The best example are my scripts above!

Yes, i´m a noob, but i like it
http://forum.thegamecreators.com/?m=forum_view&t=196656&b=24
Mr illusionest
15
Years of Service
User Offline
Joined: 5th Mar 2009
Location: Cairo , Egypt
Posted: 28th Aug 2012 20:35 Edited at: 28th Aug 2012 20:36
I use activateifused=x with x of ANY value , I wrote a script inwhich the entity is activated by 1 , 2 , 3 and 10 . and it works like charm .

"I am the night visitor when everyone is sleep , and when the last light fades"
The illusionest
bobbyisthebest
13
Years of Service
User Offline
Joined: 12th Mar 2011
Location:
Posted: 28th Aug 2012 20:42
Well, I downloaded the most recent update, and what do you know, it keeps spawning me in the top right hand corner of the map when I test it!
I'll search for this problem on the forums, but it'll be a while before I can test of the script again.

Help me.... I'm new!
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 29th Aug 2012 10:39
ched80 and me use activate=666 for common destroy-commands, so i think minimum up to 999, maybe its only limited by calculation (as dimvars are only limited through codelimit, too).

Login to post a reply

Server time is: 2024-11-23 22:31:42
Your offset time is: 2024-11-23 22:31:42