Problem with keep-coming back destroyed actor.
Hey all,
So the following rule:
when
game.weapondaggertier=1
game.weaponswordtier=1
game.weaponxbowtier=1
spawn actor 'tiernextlevel'
Actor 'tiernextlevel' displayes a text with 'congratulations, you unlocked new weapons', and after 5 seconds it gets destroyed,
Problem is..
After it destroys, and the player goes to a new screen, like in this case the blacksmith or vendor, he will see the popup again, cause the weapondaggertier, weaponswordtier and weaponxbowtier integers are still set on 1, and will go to 2 only after purchasing new weapons.
Basically, I hate that the actor does not really destroy itself, cause it keeps coming back every other scene cause the integer stays the same.
Is there a simple way to solve this?
So the following rule:
when
game.weapondaggertier=1
game.weaponswordtier=1
game.weaponxbowtier=1
spawn actor 'tiernextlevel'
Actor 'tiernextlevel' displayes a text with 'congratulations, you unlocked new weapons', and after 5 seconds it gets destroyed,
Problem is..
After it destroys, and the player goes to a new screen, like in this case the blacksmith or vendor, he will see the popup again, cause the weapondaggertier, weaponswordtier and weaponxbowtier integers are still set on 1, and will go to 2 only after purchasing new weapons.
Basically, I hate that the actor does not really destroy itself, cause it keeps coming back every other scene cause the integer stays the same.
Is there a simple way to solve this?
Comments
Hi @BasGoodboy have you tried:
Rule: When
game.weapondaggertier=1
game.weaponswordtier=1
game.weaponxbowtier=1
Change Attribute game.weapondaggertier to 0
Change Attribute game.weaponswordtier to 0
Change Attribute game.weaponxbowtier to 0
spawn actor 'tiernextlevel'
Your block may look something like this:
When
game.weapondaggertier=1
game.weaponswordtier=1
game.weaponxbowtier=1
game.lasttiermessage=0
spawn actor 'tiernextlevel'
change attribute game.lasttiermessage to 1
That should stop the message showing again for level 1.
The actor does destroy itself correctly so it's not a bug/problem with GameSalad, but to stop it respawning again you have to put in the relevant logic.
@KevinCross thanks, this is what I'm aiming for. I guess I have to make it like that to make it work good!