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 / I need entity to 'follow' a waypoint, but also detect the collision with player

Author
Message
papabrian
13
Years of Service
User Offline
Joined: 21st Dec 2010
Location: Colorado Springs
Posted: 7th Feb 2011 22:32
I am going to make a model of a simple piston type machine. The piston will just travel along a way point, back and forth. If I use the follow.fpi it runs just fine. However, when my player collides with the piston, I want the piston to explode, or at least damage my player. Any suggestions?
Akanto10
14
Years of Service
User Offline
Joined: 24th Apr 2010
Location: Earth
Posted: 9th Feb 2011 22:01 Edited at: 1st Jun 2011 21:41
I might have an answer -

If you want the piston to explode, use this (BETA 7-8 & LATER ONLY!) -


If you want it to just keep going and not get destroyed (and turn back when it hits the player), use this -


If you want it to just keep going and not get destroyed (and keep hitting the player until he/she is beyond it's last waypoint), use this -


NOTE: In order for the exploding script to work, you have to set the piston's 'Explodable?' property (under physics) to 'Yes'.

Let me know how this works for you!

I believe I should put a smart comment here, but I wouldn't have time to think about it.
papabrian
13
Years of Service
User Offline
Joined: 21st Dec 2010
Location: Colorado Springs
Posted: 10th Feb 2011 20:38
Thanks so much for the answers. I'll give them a try tonight.
Akanto10
14
Years of Service
User Offline
Joined: 24th Apr 2010
Location: Earth
Posted: 10th Feb 2011 21:54
You're welcome. Hope it works!

Login to post a reply

Server time is: 2024-11-24 12:31:36
Your offset time is: 2024-11-24 12:31:36