Activating a monster - 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) +--- Thread: Activating a monster (/thread-24349.html) |
Activating a monster - VillainousPotato - 01-11-2014 So I've written a script thats supposed to allow me to activate an enemy when my player picks up a note. It hasn't been working no matter what.No error messages pop up so I scratched and starting over on that script . So could anyone help me with that code? RE: Activating a monster - daortir - 01-11-2014 Copy the code and we'll help you find out what's wrong : > ? Also, did you check that the names were the same in the script and in the level editor ? RE: Activating a monster - VillainousPotato - 01-12-2014 void Onstart () { SetEntityCallbackFunc ("note_generic_4", "pickup"); } void pickup(string &in ent, string &in t) { If(t == "OnPickup") { SetEntityActive("servant_brute_1", true); } } RE: Activating a monster - PutraenusAlivius - 01-12-2014 PHP Code: void OnStart() RE: Activating a monster - daortir - 01-12-2014 LazyHarry is da god, he answered faster than me <3. Still I agree with him, even though I usuallly don't use the callbackfunc function : ). RE: Activating a monster - PutraenusAlivius - 01-12-2014 Okay, here is what you did wrong. Pay close attention. Spoiler below!
@daortir Usually I use A LOT of SECF's to define OnLit and OnPickup because I can use SECF's to define the functions, rather than the hassle and extra work of finding the correct function for the scripts I want. |