The Daily Click ::. Forums ::. Klik Coding Help ::. How can i make a spring object on games factory?
 

Post Reply  Post Oekaki 
 

Posted By Message

Digital Dream software



Registered
  24/04/2003
Points
  278
15th February, 2004 at 06:24:34 -

Hi, ive been wantin to kno for ages, how 2 make a spring object for a platformer?- how the hell do ya do it? id be grateful for ur help. Digi Dreams. p.s its got to be for the games factory!!!

 
*DiGiTaL DrEaMs*

Pete Nattress

Cheesy Bits img src/uploads/sccheesegif

Registered
  23/09/2002
Points
  4811
15th February, 2004 at 06:28:34 -

it's standard response number 214 i'm afraid... you'll have to make a custom platform movement (unless the platform object comes for TGF but i don't think it does). do an article search; there are loads of tutorials that'll teach you how to do it.

 
www.thenatflap.co.uk

Zane



Registered
  09/09/2003
Points
  1183
15th February, 2004 at 13:16:50 -

there is a way to do it whit the standard platform movement actually. and its supriseingly simple.

-make a counter.
-make it so the minimum value for the counter is 0 and the maximum is 20(this will change depending on the gravity strength), set the inital value to the max value.

make the events
when player collides with spring - stop player, set internal flag 0 on(player)
when flag 0 is on (player) - player y pos=player y pos - counter value, subtract 1 from counter
when player collides with background - set internal flag 0 off

that should work, though you may want to put a detector above the players head and turn flag 0 off when the detector is overlapping the background, or else the player could go through the celling.

theres and example at my site - www.zaneproductions.tk
but its for mmf so you might not be able to view it (unless you download the demo)

hope that helps and pm me if you need anymore help with it

 
www.klikforever.co.uk
GO THERE!!!

:JULI@N:



Registered
  14/07/2002
Points
  641
15th February, 2004 at 13:19:16 -

springs that when you touch them you get impulsed up?
easy... when the guy collides with the spring set its alterable value A to -15 (or whatever, the less it's it, the more he will jump). Then put an event that says that if his alterable value A is less than 0, set the guy's Yposition to his Yposition + alterbale value A, and add 1 to alterable value A. If you're not using custom movement, he will fall down when his alt value reaches 0.

 
n/a

:JULI@N:



Registered
  14/07/2002
Points
  641
15th February, 2004 at 13:19:41 -

uh, zane posted first

 
n/a
   

Post Reply



 



Advertisement

Worth A Click