Page 1 of 1

how do you make actors do stuff on their own? + other stuff

PostPosted: Tue Sep 18, 2007 6:21 pm
by j2graves
I want to make actors that will walk around and do stuff on their own without having to press a key. and I don't want them to repeat the same motion over and over. this would be very useful for making boss actors I think. also, how do you make something happen only when your actor collides with something AND a key is pressed? PLEASE HELP!

Re: how do you make actors do stuff on their own? + other stuff

PostPosted: Wed Sep 19, 2007 5:10 am
by Troodon
The thing you described is AI which sometimes takes time and trying. Basically you should control your characters every move with a variable or with timer(s).
For the 2nd thing, check if the key is pressed in the collision. Collision any side of ice-cream -> if key is down: something happens.
Sorry I don't remember the key down checking system. It was something like:
if (char[s] == 1) {...}

Re: how do you make actors do stuff on their own? + other stuff

PostPosted: Thu Sep 27, 2007 3:48 pm
by j2graves
Could someone please give me some more information?