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 Request

Author
Message
Matty forum
16
Years of Service
User Offline
Joined: 15th Sep 2008
Location:
Posted: 11th Dec 2009 22:13
OK. I have a little request for you script wizards out there. The cieling fan from model pack 2 is animated and rotates yet if you shoot it it will blow up, could you make a script where you shoot it you hear a noise and it stops rotating? (the noise part is optional)

Matty
Matty forum
16
Years of Service
User Offline
Joined: 15th Sep 2008
Location:
Posted: 11th Dec 2009 22:21
if that's even possible of course..

You can do anything with hope and belief
-Matty
Gunn3r
18
Years of Service
User Offline
Joined: 12th Jun 2006
Location: Portland, OR
Posted: 11th Dec 2009 23:47
Try here first: http://forum.thegamecreators.com/?m=forum_view&t=126004&b=23

Then try spawning a static entity at the position of the dynamic entity.

xplosys
19
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 12th Dec 2009 00:59
Use this for the fans destroy script.




That will just stop the animation when it gets shot. If you leave the explodable setting on for the fan, then you still get the explosion before it stops rotating, or you can set that to off.

If you want to add a sound you made, then just add it to the end of the line...

::animate=0,sound=audiobank\[your sound]

Brian.

Matty forum
16
Years of Service
User Offline
Joined: 15th Sep 2008
Location:
Posted: 17th Dec 2009 20:45
thanks all ill try it out

You can do anything with hope and belief
-Matty
Matty forum
16
Years of Service
User Offline
Joined: 15th Sep 2008
Location:
Posted: 26th Dec 2009 22:22
didnt work there is an explosion but the fan doesnt stop...

You can do anything with hope and belief
-Matty
Marc Steene
FPSC Master
19
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 26th Dec 2009 22:38
That above script should have worked, but here is another workaround if you cannot get it working. Give the animated fan the following destroy script:

:state=0:activateifused=1,sound=$0,destroy,state=1
:state=1:state=1

Right click the moving fan and set the destroy script to the script above and set the IfUsed field to staticfan. Place another fan in the exact position of the moving fan. Right click the new fan and set the Main script to default.fpi. Then set the fan's name to staticfan. Make sure the new fan is dynamic, set 'Spawn at Start' to no, set immobile to 1, and you should be done. Although it would be much easier if you got xplosys' script working


THE ONLY WAY TO STAY OUT OF IGNORANCE IS TO KEEP ASKING
xplosys
19
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 26th Dec 2009 23:43 Edited at: 26th Dec 2009 23:44
Quote: "didnt work there is an explosion but the fan doesnt stop..."

It worked for me. I wouldn't have posted it without testing it first. If you assigned my code for the fans destroy script, then the fan will stop when you shoot it.

Brian.

Metal Devil123
16
Years of Service
User Offline
Joined: 13th Jul 2008
Location: Suomi, Finland
Posted: 27th Dec 2009 01:29
And make Explodable to No

Login to post a reply

Server time is: 2025-05-26 00:03:03
Your offset time is: 2025-05-26 00:03:03