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 Product Chat / What would be the best way to drop a object?

Author
Message
Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 8th Jan 2008 18:41
I have an object near the ceiling, it's in full view all the time. When the player gets near, I want the object to drop. I can't really spawn the object as it's in full view. How would I go about doing this?

Was going to take a break... But I missed FPSC!
TGPEG
17
Years of Service
User Offline
Joined: 28th Dec 2006
Location: Bristol, United Kingdom
Posted: 8th Jan 2008 18:51
make a script for it (adapt the defualt one) and put something like

plrdistwithin=40;moveup=-80 in it somewhere. Just experiment with the values a bit and it should go okay.

[center]
rolfy
18
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 8th Jan 2008 19:40
The only problem is if you want the object to remain suspended you will have to set it to immobile and then it will not drop.
Although I am sure there will be someone with enough scripting knowledge to say how this can be done,my first thought is to place an invisible object beneath it and destroy that using plrdistwithin,then the object will drop with proper physics.


Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 8th Jan 2008 19:53
Quote: "my first thought is to place an invisible object beneath it and destroy that using plrdistwithin,then the object will drop with proper physics."


Hmm, never thought of that. The idea I had was to have a static object then destroy that the same time as I spawned an identical object in the same place.

What I want to do is drop an upside down chair (see my image in this thread: http://forum.thegamecreators.com/?m=forum_view&t=121495&b=21) when the player nears it.

Was going to take a break... But I missed FPSC!
rolfy
18
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 8th Jan 2008 20:25
I took a look at it the problem is that the object remains suspended after destroying the invisible object,it needs a nudge to make it drop after,maybe using destroy/spawn is your best bet.


TGPEG
17
Years of Service
User Offline
Joined: 28th Dec 2006
Location: Bristol, United Kingdom
Posted: 8th Jan 2008 20:31 Edited at: 8th Jan 2008 20:33
... in which case set the destroy script for the chair to destroyandactivate.fpi, and create a trigger zone where you want the chair to be dropped from. Set the if used field to the name of the chair object.

Then duplicate the chair object, and change its properties to Show at Start = No.

Then go back to the other chair, and set it's If Used field to the name of the second chair. Then simply put the chairs in the same position.

That should do it I think.

[center]

Login to post a reply

Server time is: 2024-11-27 11:48:54
Your offset time is: 2024-11-27 11:48:54