Change attribute of random actor in scene
rcheetham
UKMember Posts: 14
Hi All
Would it be possible to have one actor change an attribute of another actor in the same scene, but randomly choose from a group of the same actors?
Heres the scenario:
- Lets say I have 10 actors in a scene, all different instances of the same actor (not Prototypes) - Lets call this Actor A
- I want another actor in the scene (Lets call this Actor B ) to select 3 of those other actors at random
- Then change an attribute of those 3 randomly selected actors
In my head it would be like the following:
- Assigning each instance of Actor A a unique ID number
- Actor B selects 3 random numbers between 1-10
- Actor B then selects the Actor A with each of these numbers and changes an attribute of that actor
This is my web developer head coming into play here, so this may not be the best approach within GS, or even possible.
Any help would be greatly appreciated, thanks in advance.
Ryan
Comments
Check this: https://drive.google.com/file/d/0B1vwAScC9gKKdUk2NUNkZFVvRkk/view?usp=sharing
http://www.arcaderz.com
Nice job on that demo, @jeezzcake.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@tatiang : Thanks!
http://www.arcaderz.com
@jeezzcake amazing, thank you very much! I didn't expect someone to create a demo for me, but much appreciated!