problem with 'Change Attribute'

Hi,
I have 2 copies of an actor (A) than change an scene attribute when overlaps o collide with other actor (B).
Then, the actor B change their size with the scene attribute asigned in the other step, but only ocurrs when overlaps with the first actor, but no with the other. Any ideas?

Thanks.

Comments

  • BellowBellow Bartender Member, PRO Posts: 227
    dont use copy actor. Create new one.
  • vipremjuvipremju Member Posts: 3
    I've created a new actor, and same problem. I dont understand why only function the first time overlaps the actors.
    And also, why create a new actor? The 2 actors A must have the same attibutes and rules.
  • BellowBellow Bartender Member, PRO Posts: 227
    can you put screenshot pls
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    It sounds like you made a copy of your actor and named it the exact same name and expected the collision rule to work with both copies. This won't work because actors are referenced by xml id numbers that are unique. You would need two separate collision rules, one for each copy of the actor.

    But that's a really bad way to program. Instead, either spawn an actor each time you need a new copy or just option-drag the actor on the scene to create an exact copy that will function with a single collision rule.

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

  • vipremjuvipremju Member Posts: 3
    First of all, I am a newbie with Gamesalad. Perhaps I have a wrong concept of programing with this program.
    I've two actor instances with different names and with their own collision rules.
    Maybe I am starting wrong.
    All I want is: whenever an instance of actor A is placed on top of actor B, the latter increases slightly in size. How would you do you?
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    I was working on a demo for you but got busy. Let me see if I can finish it today.

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

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Wait, maybe I'm overthinking this. Is this what you're trying to do? Drag the blue squares onto the white square.

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

  • myke66myke66 Member Posts: 74
    Use two different actors, set actor 1 to a tag.

    Have a collision rule on the one you want to get bigger read "When collide with tag (actor 1) then Timer[For 1s] (scale=1). This will cause the second actor to increase in size when colliding.

    Will actor 1 stay on top of actor 2? if so you may need to have some type of "on/off" rule setup so it doesnt keep increasing insize. Or turn the time to run to completion.
  • vipremjuvipremju Member Posts: 3
    Thanks for all. I will try your ideas in my project.
Sign In or Register to comment.