Forum rules - please read before posting.

Trigger Once

edited June 2014 in Technical Q&A
Hi! Can somebody please direct me to how to disable Hotspot after one click? 
For example player clicks the hotspot, it does it's job and then goes inactive. And stays like that for the rest of the game. Even if the player enters the level multiple times. 
I guess it has something to do with Global Variables but I have no idea how to use it.

Comments

  • You can just use the Object: Send message Action on it.  Pass the "Turn Off" message to the Hotspot and it will be disabled.  To disable an individual Interaction on the Hotspot, you can also use the Hotspot: Change interaction Action.

    Also, be sure to add the RememberHotspot script to your Hotspot, to make sure it's on/off state is recorded in saved games and scene reloads.
  • The thing is I enable/disable hotspots based on current camera. 
    Is there a way to kill it permanently?
  • If you instead enable/disable the individual interactions when switching camera, then passing the "Turn Off" message will override them all.
  • I'm not sure you got me right.
    In this video Ladder Hotspot gets activated after player clicks on the Walk Here trigger.
    Then, player picks the Ladder and it's Hotspot swithces off. Now when the player goes back and croses the Walk Here trigger the second time, for some reason, Ladder Hotspot goes active again even though I set Walk Here hotspot to check if player holds certain inventory item and based on that enable or disable Ladder Hotspot.

    Hope I made it clear now
  • It does, thank you - and the steps you've taken are correct, at least in principle.  Perhaps there's a problem with the execution.

    I often do this when testing something this sort of thing: try adding a simple Dialogue: Play speech Action to both conditionals of the Inventory: Check Action (it'll be easier if you use the ActionList Editor window).  You can use that to see if the correct "chain" of Actions is playing.  Let me know the result.
  • You know what? I've made the whole trigger from scratch and it's seems to be working now. 
    Thank you for your help!
Sign In or Register to comment.

Howdy, Stranger!

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

Welcome to the official forum for Adventure Creator.