Disable Turn Script Inside of Turn Script

Hi there,

Is it possible to Disable the current Turn Script inside of itself? I keep trying different things, even external Turn Scripts that constantly disable Turn Scripts and they seem to keep going. I've confirmed for sure with the Debugger that there are many times where the player or Harvey has the flag "teleported" and Harvey will stop following, but as soon as that flag is removed he starts following again. The Turn Script is turned on by talking to Harvey.

if (not GetBoolean(Harvey, "teleported")) {
  if (not GetBoolean(player, "teleported")) {
MoveObjectHere (Harvey)
  }
  else {
    DisableTurnScript (Harvey Follows)
  }
}
else {
  DisableTurnScript (Harvey Follows)
}

Are you sure there's not another script enavbling it again?

That looks valid; I can't give any more suggestions without looking at the game.


Currently the only way to begin the script is by speaking with Harvey.

There are multiple ways to get the "teleported" flags, which I confirm in the debugger happen and Harvey stops following, but when you lose that flag he starts to follow again even if I don't speak with him. During the time where he no longer follows, the turn script is still set as enabled = true.

I even tried having a turn script that's active 100% of the time that disabled the turn script "Harvey Follows" every turn and it doesn't disable it. The only thing I can think of is Turn Scripts reenable themselves in the background at the end unless something outside of transcripts turns them off.


Can you share the game so I can take a look at it?


Unfortunately, I cannot because it has private information on it. I've just done a workaround where the location where the teleport lands has a script that disables the Turn Script before entering the room.


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums