Actor Variables

Non-platform specific questions.

Actor Variables

Postby jazz_e_bob » Wed Jul 16, 2003 12:23 am

When creating an actor I've created a new variable "mass".

I don't seem to be able to refer to this variable as "collision.mass" within a collision event script.

(I suppose this is because there is no guarantee that the collision object will have a "mass" variable available...)

Suggestions? Workarounds?

PS.

I'm enjoying your editor. Almost finished the tutorial but now I'm sidetracked by bouncing balls... :)
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score

Postby makslane » Wed Jul 16, 2003 3:13 am

The variables are global, so, is not possible make a collison.mass call.
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby jazz_e_bob » Wed Jul 16, 2003 5:08 am

Workaround?

I was hoping that if an actor isn't being used for text I could use "textNumber" as a local variable for that actor.

That way I could clone the actor and change the "textNumber" value for each one.

Unfortunately cloning refers to the same global textnumber variable...
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron