Frictional Games Forum (read-only)
Add Collide Area after picking up an item? - 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: Add Collide Area after picking up an item? (/thread-4671.html)



Add Collide Area after picking up an item? - theDARKW0LF - 09-22-2010

Yes, I need help once again, just trying to polish some areas so that there's no issues when I get people playing my map... Can anyone show me exactly what I do to make it so an Area is added in the AddEntityCollideCallback once I pick up a specific item?

Thanks... Blush

Anyone know?


RE: Add Collide Area after picking up an item? - Pandemoneus - 09-23-2010

Slow down, speedy. Tongue
You could have looked at my map, if you pick up the Library Key is calls a function, but let me give you the code. Wink

In the editor:
Every interactable entity has this box. Put YourFunctionToCall in there.
[Image: customkey.jpg]

In the script:
Code:
void LibraryKeyFound(string& asName, string& asCallback)
{
    AddEntityCollideCallback("Player", "MyArea", "MyFunction", true, 1);
}