Need help with separate actors and endless worlds

cBrookscBrooks Member, PRO Posts: 40
Hello everybody, cBrooks here with 2 questions that may be simple but I cannot figure out.

1) Help with my gold actor and dirt actor
I have a game where you are a miner trying to escape a mine collapse and you are running through an endless cave mining bits of gold and dirt to clear your path so you don't get crushed by the falling mine behind you. The cave is uneven and you cannot get farther than you already are without mining bits of dirt and rock in the way. I have a dirt and gold actor but my problem is when I place the actors in the area on the screen to act as blocks you need to mine, I have the problem that when I mine the first actor of gold or dirt all the others disappear because they are all the same actor. I need it so I can have just 1 dirt or gold actor that I can repeatedly place throughout the game but they don't all disappear when I mine 1. The one I mined would be the only one that disappears. Is there any way to do this other than creating many separate actors? I hope you understand what I am trying to say.

2) Endless caves
I need a way to automatically generate the caves and the 'gold' and 'dirt' actors throughout it. Any way to do this?

Thanks, -cBrooks

Comments

  • For your first question, what are the rules and behaviors you have set up that causes the gold to disappear? What you are trying to do is very simple, just need the rule that triggers the actor being destroyed to being something that will only affect the actor(s) being mined. In the "gold" actor, if you put the rule "if collides with actor:miner" then the behavior "destroy" then only the actors that touch the miner will be destroyed.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    1) I understand. You want overlapping instances of an actor to only destroy the first actor clicked instead of the entire group of overlapping instances. This is a tricky one and not something I've spent a lot of time working on but from memory if you set a boolean (e.g. self.Clicked) to false and then ... oh wait, I'll just make you a demo. Hang on.

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

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

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

  • cBrookscBrooks Member, PRO Posts: 40

    Thanks guys so much

Sign In or Register to comment.