Page 1 of 1

Is this code right?

PostPosted: Fri Mar 17, 2006 7:46 pm
by The achievement
Hi guys, i was wondering if i add a health bar, and i run into somthing that makes my health go down or up, can i use these codes?


int apple=5;
int cake=2;
int poop=-4
int twinkie=50; lol


then ill do collision with actor on all of them, so do these work?

PostPosted: Sat Mar 18, 2006 11:53 am
by Novice
Yes, but those codes will only initialize those varibales use that in create actor, and on collison ex.
Code: Select all
apple++;
//or
aplle+=1;

and ad a ; behind poop. :wink:

PostPosted: Sat Mar 18, 2006 5:06 pm
by The achievement
Cool! Thank you Novice!

PostPosted: Mon Mar 20, 2006 4:17 pm
by The achievement
Woudnt i use an if statement??