springs

Game Editor comments and discussion.

springs

Postby superhydrosonic » Mon Aug 13, 2007 4:42 pm

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 :)
User avatar
superhydrosonic
 
Posts: 22
Joined: Wed Jul 04, 2007 9:31 pm
Score: 1 Give a positive score

Postby DocRabbit » Mon Aug 13, 2007 9:13 pm

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);
User avatar
DocRabbit
 
Posts: 114
Joined: Fri Oct 27, 2006 2:56 am
Score: 10 Give a positive score

Postby superhydrosonic » Mon Aug 13, 2007 11:23 pm

Thanks Dude!!
that was really helpful
User avatar
superhydrosonic
 
Posts: 22
Joined: Wed Jul 04, 2007 9:31 pm
Score: 1 Give a positive score

Postby DocRabbit » Tue Aug 14, 2007 10:54 pm

No problem, glad I could help
User avatar
DocRabbit
 
Posts: 114
Joined: Fri Oct 27, 2006 2:56 am
Score: 10 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron