*newbie* Touch and drag Actor1 over Actor2 and change attributes of Actor2 on release

MasterCosmoMasterCosmo MichiganMember Posts: 13
edited June 2014 in Working with GS (Mac)

I'm working on a rock paper scissors type of game where the player picks his next 3 moves. He touches one of the moves (Actor1) and needs to drag it into spot 1, 2, or 3 (Actor2) to set that move by releasing the touch over the spot. I'm very new at this and have only spent approximately 4 hours in total playing around with GameSalad, and while I'm making good progress, however this action is eluding me.

I've tried to set a rule in Actor2 with conditions

Actor receives event < overlaps or collides < with actor of type < Rock

Actor receives event < Touch < is released

But I believe that since my touch is engaged with Actor1, the condition is not satisfied. I want to make sure that any behaviors I set do not take place until the player releases the touch over Actor2.

Anyone have any thoughts on this? I would appreciate it.

-MC

Comments

  • MasterCosmoMasterCosmo MichiganMember Posts: 13

    As an update, I tried to put the rules in both Actors, but they are not functioning how I want them to. Perhaps I cannot change an actors attributes on drop. On collide is easy, but releasing the touch I'm struggling.

    I'm thinking that I should spawn a new Actor1 over Actor2, and have that persistent actor have a rule to change the attributes of Actor2.

    I'll try that and report back.

  • MasterCosmoMasterCosmo MichiganMember Posts: 13

    Alright I figured it out. A created a rule in Actor1 to be destroyed on release, and created a rule in Actor2 to spawn Actor 1 overtop of it if both actors collide

    It seems so simple now. I guess that's the beauty of playing around with GS :)

  • quantumsheepquantumsheep Member Posts: 8,188

    @MasterCosmo said:
    It seems so simple now. I guess that's the beauty of playing around with GS :)

    There is much truth to this!

    Playing around is part of the fun, but also really helpful learning wise.

    Next time you need to do something like this, you'll already know what to do!

    Sorry no-one got to respond to you faster - sometimes threads get lost in the churn!

    QS =D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • MasterCosmoMasterCosmo MichiganMember Posts: 13

    No problem :) I know how things go. That's why instead of just bumping my thread, I shared progress. That way someone else might learn.

Sign In or Register to comment.