#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

# How to do this?

Posts: 45Member, PRO

hi,

I want to make game almost like a paxon. My problem is: the enemy come to the stage if i collect 3 coin
and if i collect 5 coin come another enemy to stage, so 2 enemy on a stage now. but when i fail (the enemy kill me) again 0 enemy should on a stage and should have i again 0 coin. And after can try again.

my problem is the enemy i did like this:

When the coin = 3

change atributte: self position x +50
change atributte: self position y +50

And if i die should 0 enemy on the stage so i did this:
(when collide with enemy coin change to 0)

When the coin = 0

change atributte: self position x -50
change atributte: self position y -50

this logic work 1 times after the enemy not come back to the stage even when i have 3 coin.

I hope its understandable.

• Posts: 387Member, PRO

Hard to understand, but if it works one time, put it in a blank loop.
Just type in loop or do an Every 0.0 timer and copy all of those rules into the part so it keeps doing it

Might work but not sure, I'd need to dive deep and decipher you and things

• Posts: 11,335Member, Sous Chef, PRO, Senior Sous-Chef

Why are you moving the enemies 50 pixels in each direction?

If you want an actor to move or destroy itself when something happens to a different actor, you can "communicate" that by changing the value of a game attribute (e.g a boolean from false to true or an integer from 0 to 1, etc.). Then have the actor move/destroy when that attribute is a certain value.

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