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

Talk about making games.

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

Postby j2graves » Tue Sep 18, 2007 6:21 pm

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!
No games to my name...
User avatar
j2graves
 
Posts: 1302
Joined: Thu Aug 16, 2007 6:42 pm
Location: on the other side of infinity
Score: 19 Give a positive score

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

Postby Troodon » Wed Sep 19, 2007 5:10 am

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) {...}
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

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

Postby j2graves » Thu Sep 27, 2007 3:48 pm

Could someone please give me some more information?
No games to my name...
User avatar
j2graves
 
Posts: 1302
Joined: Thu Aug 16, 2007 6:42 pm
Location: on the other side of infinity
Score: 19 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron