One scene triggers something in other.

So guys, iam working on a running game, and so far a have 2 scenes, the first and the second obviously.

In the scene 2 a have a actor, that shoots on the main actor when he gets close to him.

I keep track of my main actor, by constraining his position to a global game attribute called, mainactorX.

So the rule is simples:

If game.mainactorX > self.Position.X-300 : SPAWN ACTOR: Bullet.

This is what happen.
1 - I finish scene one.
2 - Click on the next scene button.
3 - I go to scene 2
4 - For some reason theres already a bullet coming in my actor direction.

If a click on restart the Bullet disappear.

Any ideas on what is causing that?

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Sounds like you have some other rules causing this... maybe post a screenshot of your rules and we'll go from there. My guess would be that you have an unlocked instance on the scene and you're looking at the prototype rules instead. You could troubleshoot it a bit by adding some Log Debugging Statements right before/after the spawn behavior to see if it's actually getting triggered.

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

  • decaoeudecaoeu PRO Posts: 61
    I solved the problem by adding a rule, that changes the mainactorX, to 0, in the NEXT button was clicked. But i still not sure what happened, i will try to add the log debugging.
Sign In or Register to comment.