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 / [SOLVED] Break window after stepping into a triggerzone

Author
Message
Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 6th Feb 2009 22:10
Is it possible to have a glass window shatter by the player stepping into a triggerzone? How would I go about it?

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 6th Feb 2009 22:25
Haven't tested this, but perhaps give the glass window a script that will check player distance. Whent he player gets close enough have it "entityaddhealth=-9999", to force it to die (and not simply "destroy") and thus shatter.


The one and only,


Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 6th Feb 2009 23:03 Edited at: 6th Feb 2009 23:03
Is there an entityaddhealth? I'm using FPI EditPad and there's nether a 'entityaddhealth', a 'SetHealth' or a 'AddHealth' (the last two actions appear in the guide!)

Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 6th Feb 2009 23:25
Right, done it. Just changed the windows destroy script a bit by adding plrdistwithin, called it breakglass.fpi and placed it in the windows startAI.

General Jackson
User Banned
Posted: 7th Feb 2009 00:15
Can i have the script?

It is well that war is so terrible or we should grow too fond of it- Robert E Lee
Doomster
17
Years of Service
User Offline
Joined: 8th Nov 2007
Location: Germany
Posted: 7th Feb 2009 21:44


Use it as the Start-Script.

Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 8th Feb 2009 01:49
Actually, I used this one.



Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 8th Feb 2009 03:43
Quote: "shapedecal"


That's an interesting command, I hadn't seen that one used before.


The one and only,


Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 8th Feb 2009 17:24
It's in the original window destroy script.

General Jackson
User Banned
Posted: 8th Feb 2009 20:33
Thx

It is well that war is so terrible or we should grow too fond of it- Robert E Lee
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 8th Feb 2009 21:01
Lol, yeah, that would explain why I've never seen it before. I never opened that script up before.


The one and only,


Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 9th Feb 2009 04:11
Do you know what shapedecal does?

The past has a lot of memories to hold onto; but, today is chock full of new adventures, and, the future shouts out, "The best is yet to come!" -- TerryC
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 9th Feb 2009 07:25 Edited at: 9th Feb 2009 07:26
Here's how I did it with a trigger zone. The trigger zone uses the plrinzoneactivateused.fpi in it's main. In the ifused parameter put in the name of the window you want shattered.

In the window's main script parmaemter of the AI Scripts put in the following code:



This will run the destroy script so leave it alone. Nothing is necessary for the window's appear script either.

For some reason, if you destroy the window in the "Start" or "Main" parameter of the AI Scripts the window will not shatter; at least that is what I found. However running the destroy script on the condition met by the main script will show the glass shattering. Otherwise it simply disappears.


__________________________________________________________
Make life a little easier and use FPI Editpad for your sctripting needs.
Now with Line Numbers. V3.3.8 is now available.

The past has a lot of memories to hold onto; but, today is chock full of new adventures, and, the future shouts out, "The best is yet to come!" -- TerryC
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 9th Feb 2009 13:15
Quote: "Do you know what shapedecal does?"


It changes the size of the decal to the size of the entity it's been bound to.


The one and only,


Login to post a reply

Server time is: 2024-11-24 19:23:26
Your offset time is: 2024-11-24 19:23:26