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 / script interaction

Author
Message
denmengrel
14
Years of Service
User Offline
Joined: 18th Mar 2010
Location:
Posted: 10th May 2010 17:24
I have a few questions on how scripts interact...

In the destroy script if I just change state=0 - state=1 without
destroying the entity, does the script just keep playing over and
over at state=1 until the entity is destroyed.

What if I reset the health (addhealth=100) would runfpidefault=1
go back to the main script and cancel out the destroy script?
(EG. :state=1,varequal=1:addhealth=100,runfpidefault=1)

Hopefully this would allow the player to resurect an entity.
Or is there a better way of doing this.

Yes...I know this is odd because entities can only be killed by
the player....It's part of a story line.
bobochobo
16
Years of Service
User Offline
Joined: 9th Jul 2008
Location: My house, in the middle of my street
Posted: 10th May 2010 18:05 Edited at: 10th May 2010 18:06
Quote: "
In the destroy script if I just change state=0 - state=1 without
destroying the entity, does the script just keep playing over and
over at state=1 until the entity is destroyed."


If you set it to

The dying action will repeat.

I think this line added somewhere in the death script would work, not tested or anything, and you would need to get the right key number and animation range.

:state=0:scankeypressed=xx,animate=x,runfpi=appear.fpi

denmengrel
14
Years of Service
User Offline
Joined: 18th Mar 2010
Location:
Posted: 10th May 2010 19:09
Is "Dying Action" a command in 1.16? I don't find it in any of the lists.

Could a version of yours work?

Destroy script...

:state=0:globalvar=1,setvar=0,state=1
:state=1,varequal=1:runfpi=appear.fpi

then all I would need to do is set the globalvariable to 1 in
another script.
would this cancel out the destroy script and start the
entity over again?
bobochobo
16
Years of Service
User Offline
Joined: 9th Jul 2008
Location: My house, in the middle of my street
Posted: 10th May 2010 23:05
Quote: "Is "Dying Action" a command in 1.16? I don't find it in any of the lists.
"


Hehe, nope, its just a place holder for the dying animation ect.

Quote: "Destroy script...

:state=0:globalvar=1,setvar=0,state=1
:state=1,varequal=1:runfpi=appear.fpi

then all I would need to do is set the globalvariable to 1 in
another script.
would this cancel out the destroy script and start the
entity over again? "


It looks like it would, I've never used variables in my scripts so I don't know for sure... Only 1 way to find out though :p

Login to post a reply

Server time is: 2024-11-25 00:46:06
Your offset time is: 2024-11-25 00:46:06