Some Code!

How to find or create sprites, graphics, sounds and music.

Some Code!

Postby MINEfan136 » Tue Sep 17, 2013 9:34 pm

For moving and Gravity.If you can, post some more code

Well here it is :P

Code: Select all
//Movement
x = x + 5;
x = x - 5;
//Gravity
yvelocity = -8;
yvelocity = yvelocity + .5;
//Score/Text
(charname).textNumber = (charname).textNumber + 1;
(charname).textNumber = (charname).textNumber - 1;
Last edited by MINEfan136 on Sat Sep 21, 2013 1:49 am, edited 1 time in total.
Trollololollololololol
:P
MINEfan136
 
Posts: 10
Joined: Fri Sep 13, 2013 11:26 pm
Score: 1 Give a positive score

Re: Some Code!

Postby JaroodaGames » Wed Sep 18, 2013 6:30 am

These are some of the first things a new GE user learns.
But, you asked for more code, so I'll deliver.
---------
Jumping:
Player -> Key Down -> (the key you want to use to jump with), no repeating.
Code: Select all
if(jump==1)
{
    yvelocity-=8; //Or something
    jump=0;
}

Player -> Collision with platform -> Top only
Code: Select all
jump=1;

Player -> Collision finish -> Platform actor
Code: Select all
jump=0;
User avatar
JaroodaGames
 
Posts: 56
Joined: Sun Jun 09, 2013 5:57 pm
Score: 2 Give a positive score

Re: Some Code!

Postby MINEfan136 » Sat Sep 21, 2013 1:48 am

kk thx for the code! I am a Beginner in this GE thing. Still learning! anyway, here is a point for your code :D
Trollololollololololol
:P
MINEfan136
 
Posts: 10
Joined: Fri Sep 13, 2013 11:26 pm
Score: 1 Give a positive score


Return to Game Resources

Who is online

Users browsing this forum: No registered users and 1 guest

cron