Tutorials

Talk about making games.

Tutorials

Postby deek » Thu Feb 01, 2007 1:33 am

I think there should be one post that includes Movement, Jumping, and Health
deek
 
Posts: 48
Joined: Wed Dec 20, 2006 6:52 am
Score: 0 Give a positive score

Postby Troodon » Thu Feb 01, 2007 4:20 pm

All those can be easily made with variables. 8)
Are you needing help with some of those three?
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby deek » Sun Feb 04, 2007 10:29 pm

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
deek
 
Posts: 48
Joined: Wed Dec 20, 2006 6:52 am
Score: 0 Give a positive score

Postby Troodon » Mon Feb 05, 2007 3:23 pm

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.
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Troodon » Mon Feb 05, 2007 3:29 pm

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;
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Joshua Worth » Mon Feb 05, 2007 8:50 pm

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;
Stay sweet
User avatar
Joshua Worth
 
Posts: 515
Joined: Tue Jul 19, 2005 12:00 am
Location: Stralia
Score: 5 Give a positive score

Postby deek » Wed Feb 07, 2007 1:30 am

I know this but i wanted an animation in the jump
deek
 
Posts: 48
Joined: Wed Dec 20, 2006 6:52 am
Score: 0 Give a positive score

Postby Troodon » Wed Feb 07, 2007 6:56 pm

Just make the jump animation and use the "wait for frame action" instead of "immediate action" :)
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron