fast and easy Q.

Game Editor comments and discussion.

fast and easy Q.

Postby kes » Mon Mar 19, 2007 9:18 pm

this is my first message in a long time, im just having trouble with making an actor (view) follow another actor on the specified axis (x, y, you know) when at first i did it the view followed the actor but when the enemies where out of vision, i return to that place and the enemy disapeared. so i need another code.
excuse my english im Argentinian
kes
 
Posts: 7
Joined: Sun Feb 18, 2007 9:24 pm
Score: 1 Give a positive score

Postby UltimatHedgehog » Mon Mar 19, 2007 9:56 pm

make your guy the veiws parent
Image
I always thought Hell would be a giant load screen that goes on for eternity, then one day, eons later, it would end, only to reveal a slightly different loading screen.
User avatar
UltimatHedgehog
 
Posts: 325
Joined: Fri Jan 19, 2007 1:48 pm
Location: http://downloads.khinsider.com/?u=112542 plz click
Score: 10 Give a positive score

Re: fast and easy Q.

Postby Sgt. Sparky » Tue Mar 20, 2007 4:57 am

kes wrote:this is my first message in a long time, im just having trouble with making an actor (view) follow another actor on the specified axis (x, y, you know) when at first i did it the view followed the actor but when the enemies where out of vision, i return to that place and the enemy disapeared. so i need another code.
excuse my english im Argentinian

first, make an actor that is in the center of the view,
make center view actor the parent to the view,
draw actor event for center view
Code: Select all
angle = direction(x, y, player.x, player.y);
directional_velocity = distance(x, y, player.x, player.y) / 25;

(Game A Gogo I am not copying your code, I am using my version of it)
if the x and y do not work,
try using xscreen and yscreen instead :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

Postby Game A Gogo » Tue Mar 20, 2007 10:59 pm

i don't care even if its my code :P, its free to use by anyone!
But tell me, how is it changed?
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 UltimatHedgehog » Tue Mar 20, 2007 11:21 pm

how do you make it just follow the x not the y
Image
I always thought Hell would be a giant load screen that goes on for eternity, then one day, eons later, it would end, only to reveal a slightly different loading screen.
User avatar
UltimatHedgehog
 
Posts: 325
Joined: Fri Jan 19, 2007 1:48 pm
Location: http://downloads.khinsider.com/?u=112542 plz click
Score: 10 Give a positive score

Postby Game A Gogo » Wed Mar 21, 2007 12:14 am

replace the player.y to y
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 GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron