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

Talk about making games.

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

Postby Kooldudese » Sat Jan 27, 2007 9:46 pm

PLZ... tell me how
User avatar
Kooldudese
 
Posts: 128
Joined: Sat Jan 27, 2007 5:20 pm
Location: In a house
Score: 0 Give a positive score

Postby Game A Gogo » Sat Jan 27, 2007 10:28 pm

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.
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby Kooldudese » Sun Jan 28, 2007 1:02 am

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:
User avatar
Kooldudese
 
Posts: 128
Joined: Sat Jan 27, 2007 5:20 pm
Location: In a house
Score: 0 Give a positive score

Postby Game A Gogo » Sun Jan 28, 2007 1:43 am

i will work on a ged file tomorrow, its kinda late here, ok?
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby Sgt. Sparky » Sun Jan 28, 2007 1:47 am

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
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest