Bullet Following an actor

Non-platform specific questions.

Bullet Following an actor

Postby arcreamer » Sat Nov 10, 2007 11:06 pm

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?
arcreamer
 
Posts: 398
Joined: Tue Jul 03, 2007 4:08 pm
Score: 9 Give a positive score

Re: Bullet Following an actor

Postby Rux » Sun Nov 11, 2007 2:28 am

Try the move to on DRAW ACTOR instead of Create Actor. :)
I'm not good at coming up with signatures...
User avatar
Rux
 
Posts: 645
Joined: Sun Apr 29, 2007 9:26 pm
Location: Sitting on your moniter invisable.
Score: 35 Give a positive score

Re: Bullet Following an actor

Postby mrgame » Sun Nov 11, 2007 11:47 am

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
mrgame
 
Posts: 118
Joined: Sun Oct 21, 2007 8:09 pm
Location: my computer
Score: 3 Give a positive score

Re: Bullet Following an actor

Postby arcreamer » Sun Nov 11, 2007 7:45 pm

im asking for a script to shoot a bullet where my player was when the bullet was created
arcreamer
 
Posts: 398
Joined: Tue Jul 03, 2007 4:08 pm
Score: 9 Give a positive score

Re: Bullet Following an actor

Postby Rux » Sun Nov 11, 2007 8:49 pm

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?
I'm not good at coming up with signatures...
User avatar
Rux
 
Posts: 645
Joined: Sun Apr 29, 2007 9:26 pm
Location: Sitting on your moniter invisable.
Score: 35 Give a positive score

Re: Bullet Following an actor

Postby Game A Gogo » Mon Nov 12, 2007 12:48 am

on create actor:
Code: Select all
angle=direction(x,y,target.x,target.y);
directional_velocity=10;
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

Re: Bullet Following an actor

Postby arcreamer » Mon Nov 12, 2007 4:18 am

undeclared identifier target is what it says when i put that under creat actor of the bullet
arcreamer
 
Posts: 398
Joined: Tue Jul 03, 2007 4:08 pm
Score: 9 Give a positive score

Re: Bullet Following an actor

Postby arcreamer » Mon Nov 12, 2007 4:25 am

oh I got it, i just realized u were substituting "target" for the player's name... lol sorry, and thnks its working now =)
arcreamer
 
Posts: 398
Joined: Tue Jul 03, 2007 4:08 pm
Score: 9 Give a positive score

Re: Bullet Following an actor

Postby Game A Gogo » Tue Nov 13, 2007 12:47 am

lol, np =P
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


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron