Number of turns reached => Move player to another room (SOLVED)

the anamneser
14 Oct 2017, 20:19

I want to limit the number of turns my player can take in a room. If he reaches a certain amount of turns, i want him to move to another room.
So for my code looks like this: (I have set the number of turns to 1 to test it.

set (player, "statusattributes", NewStringDictionary())
dictionary add (player.statusattributes, "turns", "")
set (player, "turns", 0)
player.turns = player.turns + 1
if (player.turns = 1) {MoveObject (player, Klinisch onderzoek)}

However, he does not move to another room. Can someone point me out where i went wrong?
Note, It is my first game, i don't know anything about coding.


Hello,

Do you have those last two lines in a turn script (which is Enabled), and the first three lines in a script set on the room?


Dang, mrangel... We posted at the same minute on this one.

You have the floor, good sir.


Where have you put this script? In the room's on-enter script? In a turnscript?


the anamneser
14 Oct 2017, 20:31

Thank you, it's fixed. The last line was in my starting script.