Page 1 of 1

Bullet Following an actor

PostPosted: Sat Nov 10, 2007 11:06 pm
by arcreamer
Im sure this has been asked many times before but I cant seem to find the right answer, im making a game where ur an aircraf tand the actor follows the mouse and I have some enemyies shooting but what i want is for them to shoot bullets at the actor but once the bullet is shot, it doesnt seek me, if i move it will miss me; that is what I want any ideas?

Re: Bullet Following an actor

PostPosted: Sun Nov 11, 2007 2:28 am
by Rux
Try the move to on DRAW ACTOR instead of Create Actor. :)

Re: Bullet Following an actor

PostPosted: Sun Nov 11, 2007 11:47 am
by mrgame
i think he meanz the other way round

he wants the bullet once it is shot to go to where the player was when the bullet was created
so you want to put the moveto on create actor not draw actor

Re: Bullet Following an actor

PostPosted: Sun Nov 11, 2007 7:45 pm
by arcreamer
im asking for a script to shoot a bullet where my player was when the bullet was created

Re: Bullet Following an actor

PostPosted: Sun Nov 11, 2007 8:49 pm
by Rux
arcreamer wrote:im asking for a script to shoot a bullet where my player was when the bullet was created

I had to read this several times to get it. So your saying like the ship creates a bullet Goes around and back to the place where it was made?

Re: Bullet Following an actor

PostPosted: Mon Nov 12, 2007 12:48 am
by Game A Gogo
on create actor:
Code: Select all
angle=direction(x,y,target.x,target.y);
directional_velocity=10;

Re: Bullet Following an actor

PostPosted: Mon Nov 12, 2007 4:18 am
by arcreamer
undeclared identifier target is what it says when i put that under creat actor of the bullet

Re: Bullet Following an actor

PostPosted: Mon Nov 12, 2007 4:25 am
by arcreamer
oh I got it, i just realized u were substituting "target" for the player's name... lol sorry, and thnks its working now =)

Re: Bullet Following an actor

PostPosted: Tue Nov 13, 2007 12:47 am
by Game A Gogo
lol, np =P