Page 1 of 1

Tutorials

PostPosted: Thu Feb 01, 2007 1:33 am
by deek
I think there should be one post that includes Movement, Jumping, and Health

PostPosted: Thu Feb 01, 2007 4:20 pm
by Troodon
All those can be easily made with variables. 8)
Are you needing help with some of those three?

PostPosted: Sun Feb 04, 2007 10:29 pm
by deek
a little
I know how to move
But i want a perfect jump

And tied to make a fighting system for my game but
cant figure it out. so i cant make a health system

PostPosted: Mon Feb 05, 2007 3:23 pm
by Troodon
Ok. To make a jump without been able to fly.
Make a variable called canJump. (the classic example)
Actor -> collision any side of ground -> canJump = 1
Actor -> collision finish with ground -> canJump = 0

Then in the jump key make:

if(canJump == 1)
{
the jump code you prefer
}

it will check if the canJump is 1 and if it is, it will allow jumping.
I hope this helped little.

PostPosted: Mon Feb 05, 2007 3:29 pm
by Troodon
To make the health, make a variable called: health. (don't blame my imaginary with the variable names :lol: )

Actor -> create actor -> Health = 100 (or whatever number you want)
Actor -> collision any side of enemy -> Health = health - 10
Actor -> collision any side of healthbox -> health = health + 10
Actor -> collision any side of healthbox -> destroy collide actor

Then in the draw actor write:
if (health =< 1)
{
destroy actor("Event actor")
}

Now make a text actor and write in it's draw actor:
yourtextactor.textNumber = health;

PostPosted: Mon Feb 05, 2007 8:50 pm
by Joshua Worth
tekdino wrote:Actor -> collision any side of ground -> canJump = 1


If you want him to jump only when his feet are on the ground, use

Actor -> Collision -> Top side of ground -> canJump = 1;

PostPosted: Wed Feb 07, 2007 1:30 am
by deek
I know this but i wanted an animation in the jump

PostPosted: Wed Feb 07, 2007 6:56 pm
by Troodon
Just make the jump animation and use the "wait for frame action" instead of "immediate action" :)