problem with spawning actors

i have to actors in which you press one my main actor goes left and press the the other it goes right, these are powered by attributes. The objective of the game is to dodge to falling actors whenever the random actors spawn the left and right actors stop working and the main character stops moving help me please

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Post your rules and perhaps we can help.

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

  • AEPstudiosAEPstudios Member Posts: 110
    @tatiang
    in my spawner actor : change attribute game.random actors to random(1,1)

    rule: when attribute game.random actors = 1 then spawn actor in front of layer (position random(3,477)

    and my left and right buttons are:

    when actor is touched and mouse position is inside change attribute game.left to true otherwise to false ( the same with right button)

    left and right button attributes are boolean and random actors is integer
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Not sure why you're using random(1,1)... if you want that actor to spawn another actor, just add a spawn behavior. You don't need a rule that says When game.random actors=1. It will always equal 1 so it's not needed. But that's beside the point...

    I assume you left out the rules for your actor that actually do the movement. Something like When game.left is true --> Move direction 180 speed 100. Can you post those rules?

    If it's easier, just PM me a link to a zipped version of your project file and I'll take a look.

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

  • AEPstudiosAEPstudios Member Posts: 110
    @tatiang ok makes sense and the movement rules actually work but when the random spawned objects come in the scene the button magically stop working thanks
Sign In or Register to comment.