accessing clones properties

Non-platform specific questions.

accessing clones properties

Postby zoiba » Tue Feb 27, 2007 9:28 am

I have some cloned objects in game as backround elements.
I wish some of them, sometimes, are colidable with player while are not collidable with enemies.
Flexible solution could be having a property, rapresented by an actor variable, that event actor can check collide actor for deciding if react to the collision or not.

Well, is there a way so that the event actor can access collide actor's variable from script?

Hope this make sense.

Thanks
User avatar
zoiba
 
Posts: 45
Joined: Mon Aug 09, 2004 9:44 am
Location: Italy
Score: 1 Give a positive score

Postby DilloDude » Tue Feb 27, 2007 10:12 am

Just use
Code: Select all
collide.variable
If you have a lot of properties to check, try setting up a single-integer system like in Fuzzy's 'Dealing with Qualities' thread. In my current project I am using this, even though I only have two states to check.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Postby zoiba » Tue Feb 27, 2007 5:27 pm

D'oh! I'm a stupid!
Many thanks DilloDude! :)
User avatar
zoiba
 
Posts: 45
Joined: Mon Aug 09, 2004 9:44 am
Location: Italy
Score: 1 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest