Shadowfied
Senior Member
Posts: 261
Threads: 34
Joined: Jul 2010
Reputation:
5
|
Remove a PlayerInteractCallback through script?
Another problem related to the other thread I posted about a static, non-colliding entity. Decided to make it a new thread though as people might look for this.
Alright so I have a door which is locked and unlocks automatically when the player picks up a note which is hanging on the door. I've made a PlayerInteractCallback function which adds a message saying "I should read the note first" if the player tries to use the door. I only want this to appear if the player has not picked up the note, so if the player picks up the note and then uses the door, which is the way I want players to do, and which is the way that most serious players would do, the message still appears. I've looked through the scripts on the HPL Engine wiki and can't find anything, and I've searched the forum but couldn't find anything about it.
So I thought that in the PlayerInteractCallback for the NOTE, which also unlocks the door, there could be some script removing the PlayerInteractCallback from the door.
So basically, I need a script like "RemovePlayerInteractCallback" which unfortunately does not exist.
Thanks in advance.
Edit: I do realize there are many alternatives way for THIS PARTICULAR problem, like changing the door entity to an identical one when the player picks up the note. I do have some alternative ways to fix it.
(This post was last modified: 02-09-2012, 12:28 PM by Shadowfied.)
|
|
02-09-2012, 12:25 PM |
|