Frictional Games Forum (read-only)

Full Version: [SOLVED] How to make a Crowbar work?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Just as the title Said, How to make a Crowbar work on a door??

(Code And Explaination please, if possible.)
I think it would be an; AddEntityCollideCallback(

Although thats only with areas.....erm....to be honest, i got no idea i just thought i would try x3
Take a look at your item you want to pick up in the level editor and search for " interactcallback" or something similar ... then write something in the empty box like " PickedupItemOne "

Then you write

void PickedupItemOne ( ..... )
{
simpleFunction ....
}

hope it helps cause i am not at home and have no code as an example !
(04-24-2011, 02:51 PM)laser50 Wrote: [ -> ]Just as the title Said, How do i make an event happen once a player picked an item up?

(Code And Explaination please, if possible.)
Code:
void OnStart()
{
SetEntityPlayerInteractCallback("Item", "Function", true);
}
void Function(string &in asEntity)
{
[EVENT]
}

Item = The item that is interacted with
Function = The function that is called
EVENT = What happens after the player picks the item up
SetEntityPlayerInteractCallback(string& asName, string& asCallback, bool abRemoveOnInteraction); = Line of code
Thanks for the help, I've edited my first post and title. I hope someone could aswell explain me how to do that.