Use (other object) on this

I wanna let an object be used on another one to unlock an exit does anyone know how that works? help would be much appreciated


Hello not sure what exactly you are looking for but here is a game code that will show you how to make a door, key and a locked room. When you pick the key up type with out quotes "use key on southdoor" and that will unlock the south exit. In the gui editor you can see how to set it all up very simple just ask if need help.

<!--Saved by Quest 5.6.6108.15891-->
<asl version="550">
  <include ref="English.aslx" />
  <include ref="Core.aslx" />
  <game name="DoorTest">
    <gameid>4b28642b-4ea7-4b2a-bc24-1f456689b674</gameid>
    <version>1.0</version>
    <firstpublished>2017</firstpublished>
  </game>
  <object name="room">
    <inherit name="editor_room" />
    <object name="player">
      <inherit name="editor_object" />
      <inherit name="editor_player" />
    </object>
    <exit name="lock1" alias="south" to="room1">
      <inherit name="southdirection" />
      <locked />
    </exit>
    <object name="key">
      <inherit name="editor_object" />
      <feature_usegive />
      <selfuseon type="scriptdictionary">
        <item key="southdoor">
          UnlockExit (lock1)
        </item>
      </selfuseon>
      <take />
    </object>
    <object name="southdoor">
      <inherit name="editor_object" />
      <feature_usegive />
      <useon type="scriptdictionary">
        <item key="key">
          UnlockExit (lock1)
        </item>
      </useon>
    </object>
  </object>
  <object name="room1">
    <inherit name="editor_room" />
    <exit alias="north" to="room">
      <inherit name="northdirection" />
    </exit>
  </object>
</asl>

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

Support

Forums