Page 1 of 1

HEY, how do you make an computer try to fight you?

PostPosted: Sat Jan 27, 2007 9:46 pm
by Kooldudese
PLZ... tell me how

PostPosted: Sat Jan 27, 2007 10:28 pm
by Game A Gogo
be more specific, like how their move, what they should do if an actor is at a certain position etc..., and i might construct you a demo of it.

PostPosted: Sun Jan 28, 2007 1:02 am
by Kooldudese
well, they move with x = x + 5; so on, and they atk with animations, and they jump with yvelocity = -1; when the player is in range they try to use they're atks and also they dodge players atks. plz help :cry:

PostPosted: Sun Jan 28, 2007 1:43 am
by Game A Gogo
i will work on a ged file tomorrow, its kinda late here, ok?

PostPosted: Sun Jan 28, 2007 1:47 am
by Sgt. Sparky
okay I will help! :D here is what you do have an invisible actor(wireframe region)and post him wherever gaps are and stuff :D and when the enemy collids with the wire actor it jumps, and have a filled actor the is the child actor of(the main actor is the parent)the main actor :D and when the enemys hit the filled actor they have a var(attack)
the script is
Code: Select all
Attack = round(rand(4));

and on the event when they hit the actor also have this
Code: Select all
if (Attack == 0)CreateActor("FireBall", "Fire", "(none)", "(none)", 0, 0, false);
if(Attack == 1)CreateActor("Arrow", "AttackShot", "(none)", "(none)", 0, 0, false);
Ect. (go all the way to 4)and have wireframe actors that change the enemy's direction, make a var called Direction, then have this script for the left going wire actors
Code: Select all
Direction = 0;

and on the right actors
Code: Select all
Direction = 1;
and for the draw actor event of the enemy
Code: Select all
if(Direction == 0)x -= 5;
if(Direction == 1)x += 5;
I hope that covers most of it, If you need any more help just let me know :D