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 / What is wrong?

Author
Message
ABR
16
Years of Service
User Offline
Joined: 13th Feb 2008
Location:
Posted: 9th Jun 2008 02:47 Edited at: 9th Jun 2008 02:49
I have a false wall entity named Wall1, I also have a decal explosion entity named Explo1. In the Wall1 entity I have the If Used property set to the entity named Explo1 and the Destroy property set to the fpi script named destroyandactivate.fpi. In the Explo1 entity, I have the main ai script set to a customized script named decalnoloopforce.fpi.

Now onto what should happen, when the player shoots the false wall entity Wall1, the Wall1 should disappear and the Explo1 entity should appear and play it's animation and sound 1 time, and then disappear its self.

Here is what actually is happening, the Player shoots the false wall entity Wall1 and it disappears, but the decal explosion entity Explo1 NEVER appears and never plays its sound either. Below is the customized script I have used in the main ai for the Explo1 entity.



Please help me fix this, please?

Thank You.

-ABR
Mr Bigglesworth
16
Years of Service
User Offline
Joined: 4th Mar 2008
Location:
Posted: 9th Jun 2008 05:09
Instead of using "state=10, state=20" you should use "state=1, state=2"
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 9th Jun 2008 08:28 Edited at: 9th Jun 2008 08:31
:state=0,activated=0:state=10,activate=1,triggerforce=500
:state=10,activated=1,plrusingaction=1:rundecal=0,sound=audiobank\user\explosion.wav,timerstart,plraddhealth=-100,state=20
:state=20,timergreater=8000:destroy

Okay, here is what is wrong.
You start as being activated=0, so in state=0 you are starting off by activating the entity and moving to state=1
There in state=1 you check for activated=1 which we know is true, and plrusingaction=1 then you take action.

If you try your setup again and shoot your wall, then all you need to do to see your effect is to hit the enter key.
But we both know that is not what you want.

After testing again and hitting your enter key, you'll see what I mean.

Now, according to what you said you wanted it to do then this may be better...

:state=0,activated=0:state=10,triggerforce=500
:state=10,activated=1:rundecal=0,sound=audiobank\user\explosion.wav,timerstart,plraddhealth=-100,state=20
:state=20,timergreater=8000:destroy

All I did was remove the activate=1 action from state=0
and I removed the plrusingaction=1 condition from state=1

Try that and see if you get better results.

Don't forget to visit Conjured Entertainment

Login to post a reply

Server time is: 2024-11-24 09:15:23
Your offset time is: 2024-11-24 09:15:23