Jump Command Help
by Alexander \"Xander\" Brown · in Torque Game Builder · 11/06/2008 (2:58 am) · 1 replies
Okay i've been trying to figuer out a good way to do this. I need my 'player' to jump up and down like in a platform but from a faked perspective view ware you have 4 way movement (simmiler to the old 2d hack and slash games). I though i could use a path, like have it draw a two piont path and just bounce the sprite from one to the other and back again, but i can't figuer out how to temp make the path in script or mount the sprite to it? any help would be vary helpfull.
About the author
Torque Owner Alexander \"Xander\" Brown
Bad Production Studio
......... moveMap.bindCmd(keyboard, "space", "jumpup();", "jumpdown();"); ......... ......... function jumpUp(){ $player.jump("0 -10");} function jumpDown(){ $player.jump("0 10");} function playerclass::jump(%this, %amount){ %position = %this.getPosition(); %newPosition = t2dVectorAdd(%position, %amount); %this.setPosition(%newPosition); return %newPosition;}