Frictional Games Forum (read-only)
setentityactive is not working? - 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: setentityactive is not working? (/thread-16218.html)



setentityactive is not working? - liamthespy - 06-16-2012

AddEntityCollideCallback("Player", "delusiontrigger_1", "delusionfunction_1", true, 1);



void delusionfunction_1(string &in asEntity, string &in type)
{
SetEntityActive("delusion_2", true);
ShowEnemyPlayerPosition("delusion_2");
}

those are the relevant parts of my code, but only the showenemyplayerposition part is taking affect, any ideas? I've triple checked the names on the entities


RE: setentityactive is not working? - Your Computer - 06-17-2012

You have the wrong callback syntax.


RE: setentityactive is not working? - liamthespy - 06-17-2012

how do I fix it?

it's an area that the player collides with, if that makes any difference


RE: setentityactive is not working? - Your Computer - 06-17-2012

http://wiki.frictionalgames.com/hpl2/amnesia/script_functions#entities


RE: setentityactive is not working? - liamthespy - 06-17-2012

obviously the issue is that I'm having trouble understanding the tutorials, thanks for the no-help asshole. don't post in threads if you have nothing constructive to say except to point obvious things out. thanks.


RE: setentityactive is not working? - Adny - 06-17-2012

The syntax he's refering to are the words in the parentheses after "
delusionfunction_1 ". The syntax you have there are incorrect and the page he linked had the proper syntax listed if you scrolled down a little bit. Try changing:

(string &in asEntity, string &in type)
to the proper:

(string &in asParent, string &in asChild, int alState)


Don't be so hard on Your Computer, he is correct to assume that everyone who is modding/scripting for HPL2 should know the very basics. I'd suggest doing a little research to familiarize yourself with scripting "lingo", to better help yourself understand in the future.


RE: setentityactive is not working? - liamthespy - 06-17-2012

ah, fixed! thanks Big Grin can they activate even if I'm looking at their spawn?


RE: setentityactive is not working? - Obliviator27 - 06-17-2012

(06-17-2012, 12:49 AM)liamthespy Wrote: ah, fixed! thanks Big Grin can they activate even if I'm looking at their spawn?
They activate no matter the circumstance.