Frictional Games Forum (read-only)
[SOLVED] How to make a Crowbar work? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: [SOLVED] How to make a Crowbar work? (/thread-7609.html)



[SOLVED] How to make a Crowbar work? - laser50 - 04-24-2011

Just as the title Said, How to make a Crowbar work on a door??

(Code And Explaination please, if possible.)


RE: Event When Something has been picked up - Simpanra - 04-24-2011

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


RE: Event When Something has been picked up - stonecutter - 04-24-2011

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 !


RE: Event When Something has been picked up - Kyle - 04-24-2011

(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


RE: How to make a Crowbar work? - laser50 - 04-24-2011

Thanks for the help, I've edited my first post and title. I hope someone could aswell explain me how to do that.