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);