help with stupid enemy actor

Game Editor comments and discussion.

help with stupid enemy actor

Postby jonas » Tue Feb 20, 2007 12:47 am

First of all I have to thank makslane for making this great program and all you friendly people on this forum for being a great help and inpiration!
I have fiddled around with GE and desided to make a complete game. I chose Outlaw by Atari, because it was the first game I got for my Vic20 back in the early 80s... :lol:
Image

I thought it should be a piece of cake to make, even for a newbie like me, but I'm having a problem with the computer controlled enemy:
His movements (up and down only) is controlled with the MoveTo command relative to his enemy and his shooting is controlled by a random timer. This makes him look more like a zombie instead of a quick gunfighter, and he isn't much of a match,really.
So, if anyone here could give some hints on how I can give him som sort of brains, I would be most greatful! :)
jonas
 
Posts: 5
Joined: Fri Jan 12, 2007 12:52 am
Score: 0 Give a positive score

Postby makslane » Tue Feb 20, 2007 12:50 pm

Try to increase the MoveTo velocity.
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby jonas » Tue Feb 20, 2007 6:48 pm

The speed is not the issue, I am thinking about the enemy's ability to try to dodge bullets instead of just standing there and only shooting when the player is nearby- in other words-making him "more human" :)
jonas
 
Posts: 5
Joined: Fri Jan 12, 2007 12:52 am
Score: 0 Give a positive score

Postby makslane » Wed Feb 21, 2007 1:23 am

May be the MoveTo action is not the right choice.
You can try make moves based on the y position of the player.
In the Draw Actor event of the enemy, put this:

Code: Select all
double weight = 10;

if(ActorCount("shot") > 0)
{
  //The player shot. Get it out here!
  y++;
}
else
{
  //No shots, so, go to the player
  y = ((weight  - 1)*y + player.y)/weight;
}
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby jonas » Wed Feb 21, 2007 2:01 am

Yes,this did the trick! :D Thanks a million, makslane. I will sleep good tonight...
jonas
 
Posts: 5
Joined: Fri Jan 12, 2007 12:52 am
Score: 0 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron