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 / changing texture and explosive after time or damage.

Author
Message
midget overlord
15
Years of Service
User Offline
Joined: 17th Apr 2011
Location: On a rather insignificant blue planet
Posted: 7th Jun 2012 22:08
I've never scripted before and I'm wondering if someone could point me in the right direction for a script. I know the basics of scripting and I'm looking to create a script that

a)has the entity change texture over time or damage, specifically having one of the two colors grow to cover the figure.

b) has it explode on death (I know you can do this without scripting but bear with me) or after time expires.

I was thinking of doing something like having expiring time deal damage to the creature. I looked in the guides and didn't see anything. Anyone have any ideas.
BlackFox
FPSC Master
18
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 8th Jun 2012 07:29
Quote: "a)has the entity change texture over time or damage, specifically having one of the two colors grow to cover the figure."


Using the "etimerstart/etimergreater=x" and "alttexture=x" (x=0 or 1) will achieve this. You specify the texture and alt texture in the properties for the entity and using the "alttexture=x" will allow you to switch them. Take a look at the "switch1.fpi" script to see how it uses the texture switching. If you are missing, here it is:



Quote: "b) has it explode on death (I know you can do this without scripting but bear with me) or after time expires."


The entity can explode, and you can even spawn a decal (ex: smokes, sparks, etc) to add to the effect. All you'd have to do is modify the destroy script of the entity to activate the decal and destroy the main entity. To get an idea, take a look at the "destroyandactivate.fpi" script in "scriptbank\destroy" folder. You can see it will activate the entity name in the IfUsed field (activateifused=1).

If you try to come up with something and get stuck, post what you do have and we can help you get it sorted.


Twitter: @NFoxMedia

Login to post a reply

Server time is: 2026-07-05 18:17:36
Your offset time is: 2026-07-05 18:17:36