Identify which instance of an actor was the overlap

CasualEvolutionCasualEvolution Member, PRO Posts: 543
Hi, an idea for your todo list (sorry my english)
It would be very useful in the rules, when we put if "overlap or collides" could access the variables of the actor that collides.
Suppose I have the actor enemy and within these a variable that identifies which instance of enemy is. That is, as usual, in the prototype put a variable "index", then we change in each instance to identify each enemy as 1, 2, 3 ... The idea or proposal would be that when collided with one of these instances, it would be great to be able to access the variable "index" of the instance to which collided.

So could do things like:
When overlap with the enemy A and the variable "colider.index" <3 ... bla bla

It is understood? sorry if I'm not clear or if this is something requested many times.

thank you very much

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    It is clear... and it is something that has been requested before, but I can certainly see how it would be helpful.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • BluemoonstudiosBluemoonstudios Member Posts: 156
    I would love to see this feature too. Being able to access an actors attribute without unlocking an actor would be very helpful. Maybe @CodeWizard has this on his list?
  • LumpAppsLumpApps Member Posts: 2,881
    Not sure if i understand but if your enemy has an index variable then on hit it could do a change game attribute to this variable and then have the "whatever actor needs it" read this variable?
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    I was working on doing something that involves changing the tag of the actor at spawning. You can change the tag of an actor at runtime. I imagine if GS allowed you to make a bunch of tags and allowed you to add an actor to that tag category. I was able to change the tag at runtime and make a rule in the actor and access that info in the actor but I want to do more tests to see if I create a bunch of empty tags at the game level if I can switch or add a actor to a game level tag at runtime. I was able to get part way there. Altering the tag system might prove easier for GS to do than scene level self attributes.
  • LumpAppsLumpApps Member Posts: 2,881
    Interesting!
  • CasualEvolutionCasualEvolution Member, PRO Posts: 543
    Thank you very much for the answers, with a little luck @CodeWizard reading this request and write down there in a corner of the ToDo list :)
Sign In or Register to comment.