Adding values of actors and destroying one

CaramelistCaramelist Member, BASIC Posts: 3

Hi,
I am quite new to GS. My problem might be easy to tackle, but could not figure any solutions yet.
When I drag the actor on the same actor type, I want the scores (values of the actors) to be added as the sum of both, and the one that I hit by dragging, to be destroyed and I want the actor to take the place of the destroyed one.

Is there a way to achieve that?

Thanks in advance for your help!

Best Answer

  • tatiangtatiang Posts: 11,949
    edited August 2016 Accepted Answer

    Here's an example (attached). It might not be exactly what you're looking for but could get you on your way. It was made on a Mac so you'll need to convert it if you're using a PC (Google convert mac to windows gamesalad).

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

Answers

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Is the non-dragged one moving at all? Does it change position ever? If not, I might have a solution...

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

  • CaramelistCaramelist Member, BASIC Posts: 3
    edited August 2016

    @tatiang said:
    Here's an example (attached). It might not be exactly what you're looking for but could get you on your way. It was made on a Mac so you'll need to convert it if you're using a PC (Google convert mac to windows gamesalad).

    Hi,

    Thank you very much, In fact I am using a Mac, I don't how I could manage to put in working with PC to my profile :))
    I think I found another solution, but I am not sure, since it seems to be a temporary one, and I loose the sum, the moment the position changes, the old value appears again.

    I have a grid and I want the value of the actors to be changed, by sliding them, and to be destroyed. So to fill the empty spaces, the actors fall down, I use a spawner for the new ones. My problem is, even though I change the table values, the moment the actor slides down, it goes back to original value.

    I also tried with your solution, but it does not work either, somehow I can only allocate the sum, when it says in his Y position, the moment it changes, It goes back to its original value....

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    You posted in the "Working with GS (PC)" sub-forum. I went ahead and moved this to the Mac sub-forum.

    If you're using a grid (by the way, those kinds of details are really important to include in your posts), can you just check the actor(s)' position(s) rather than collision detection?

    My problem is, even though I change the table values to the sum, the moment the block slides down, it goes back to original value.

    How are you doing all that? What is the rule for the change table value, for example? And any thoughts about what is making it revert back to the original value?

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

  • CaramelistCaramelist Member, BASIC Posts: 3
    edited August 2016

    Hi,

    I solved it, It was caused by the Cell ID, which was not updated.
    Thanks a lot for your help!

Sign In or Register to comment.