Page 1 of 1

springs

PostPosted: Mon Aug 13, 2007 4:42 pm
by superhydrosonic
well I want to make it so when I jump on a spring my guy goes
up a certain distance upwards and will be able to move about while in
the air. could someone give me a scripted or something to make this
possible :)

PostPosted: Mon Aug 13, 2007 9:13 pm
by DocRabbit
This would be easy, don't even think you have to script this one unless that is what you want. This example assumes you have a working jump with gravitational pulldown, i.e. Player comes back to earth when you jump. Just add a collision event to your player with the top side of your spring actor. For action choose PhysicalResponse. On the collision event, be sure repeat while colliding is set to yes. For the physicalresponse settings, Move:Event Actor Only, EventMultiplier and CollideMultiplier just leave on 1, FinalVelocitymultiplier: Event Actor:1.6 <-(this to something greater than your gravity) And Collide Actor:0.

The coded version would be:
Make collision event for player with top side of spring repeat while colliding to yes, then for action, pick script editor. You will know you are in right section if the title above the script editor says: Script Editor:Player->Collision (Top Side of Spring)

Then just put this code in for same effect:
Code: Select all
PhysicalResponse(MOVE_EVENT_ACTOR_ONLY, USE_CALCULATED_MASS, 1.000000, 1.000000, 1.600000, 0.000000);

PostPosted: Mon Aug 13, 2007 11:23 pm
by superhydrosonic
Thanks Dude!!
that was really helpful

PostPosted: Tue Aug 14, 2007 10:54 pm
by DocRabbit
No problem, glad I could help