Frictional Games Forum (read-only)

Full Version: A problem with doors
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi everyone!
Well, my problem is the following one:

I want that when the player interacts with a door, it teleports. No keys, only interact.
But i don't know how to do it. Seriously, i would like to do it myself, but i don't know.
Please, my CS is almost finished but I must cover this.
SetEntityPlayerInteractCallback(string& asName, string& asCallback, bool abRemoveOnInteraction);
Calls a function when the player interacts with a certain entity.
Callback syntax: void MyFunc(string &in asEntity)
asName - internal name
asCallback - function to call
abRemoveOnInteraction - determines whether the callback should be removed when the player interacts with the entity

Maybe locking the door would be a good idea.
And then:

TeleportPlayer(string& asStartPosName);
Thanks, beecake. You've helped me a lot.
No problem ^_^
To shorten the script a bit you can write the callback name in the door under the entity tab.
Ok, fixed it. Thanks everyone for being so attentive!