Frictional Games Forum (read-only)
Help on entity activation - 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 - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Help on entity activation (/thread-25679.html)

Pages: 1 2


RE: Help on entity activation - TShapeShifter - 07-13-2014

(07-13-2014, 10:15 PM)Mudbill Wrote: If you need to use global variables, just change the AddLocalVarInt to AddGlobalVarInt, as well as the Set and Get versions. That's all.

wow o: seems simple Smile Thanks for all your help! ^^

okay so its not working with notes from other maps Undecided I've tried adding the same function to each note like:
PHP Code:
SetEntityPlayerInteractCallback("note_generic_1""AddOneToFunction"true); 
and then adding the function on each map:
PHP Code:
void AddOneToFunction(string &in asEntity)
{
    
AddGlobalVarInt("monster_appear"1);

but it doesnt seem to be working with the notes from other maps... just the one I had written the Global Variable in Undecided Help please, any ideas why it's not working? Undecided


RE: Help on entity activation - Mudbill - 07-14-2014

Don't use PlayerInteractCallbacks. Use SetEntityCallbackFunc.

Callback syntax: void MyFunc(string &in asEntity, string &in type)

Now that I look at it, I forgot the second parameter is a string, not int. That is probably why my example didn't work. I only wrote that example off the top of my head xP