Q: Clone Variables

Game Editor comments and discussion.

Q: Clone Variables

Postby zupernoc » Sat Jun 17, 2006 3:49 am

I am creating an actor (actor1) from another actors's script (actor2).

Code: Select all
actor1.angle = 45;


The above works fine. But how does one set the angle of one of the clones? example:
Code: Select all
actor1.01.angle = 45;
does not work

Ultimately I am just attempting to have 10 actors spawn from a single point, and move out at different angles. (similar to a particle explosion).

A solution to the above clone variable issue, or best practices advice appreciated. Thank you.
zupernoc
 
Posts: 17
Joined: Thu Jun 01, 2006 9:12 pm
Score: 0 Give a positive score

Postby Game A Gogo » Sat Jun 17, 2006 2:31 pm

if you want tem to move in random direction, use on create event:
Code: Select all
angle=rand(360);
directional_velocity=rand(3);
that should make then go to random angle and move at a random speed
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 makslane » Sat Jun 17, 2006 5:51 pm

makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby zupernoc » Sat Jun 17, 2006 6:50 pm

Thank you.

The getclone function worked.
I now have a sweet particle explosion. :D
zupernoc
 
Posts: 17
Joined: Thu Jun 01, 2006 9:12 pm
Score: 0 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron