![]() |
No Matching signatures - 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: No Matching signatures (/thread-17701.html) |
No Matching signatures - Lake - 08-12-2012 This is the error: ![]() this is the script: Code: Void OnStart() Global.hps: Code: void OnStart() RE: No Matching signatures - palistov - 08-12-2012 Unfortunately you can't define functions in global.hps and expect them to work. All scripts must be done in the level-specific file ![]() Technically you CAN do all kinds of stuff in global.hps like control flow and your own functions and the like, but you don't have any access to the API, so you can't really do much of anything useful with it. TL;DR solution: move Func02 definition to your level's script file. Global.hps isn't included in your levels' scripts. RE: No Matching signatures - Lizard - 08-12-2012 move void func02 to the other .hps Void OnStart() { AddEntityCollideCallback("Player", "ScriptArea_1", "statue", true, 1); SetLocalVarInt("suitorelement", 0); } void statue(string &in asParent, string &in asChild, int alState) { AddLocalVarInt("suitorelement", 1); Func02(); SetEntityActive("enemy_suitor_2", true); } void Func02() { if (GetLocalVarInt("suitorelement") == 1) { SetEntityActive("nota5", true); } } RE: No Matching signatures - Lake - 08-12-2012 so how can I do to ensure that when the player goes in the script 1 a map, then something happens in another? RE: No Matching signatures - Lizard - 08-12-2012 What exactly is it that you want? RE: No Matching signatures - Lake - 08-12-2012 I want that when the player steps into the ScriptArea_1 another map appears a note that was not there before RE: No Matching signatures - Lizard - 08-12-2012 (08-12-2012, 11:14 AM)Lake Wrote: I want that when the player steps into the ScriptArea_1 another map appears a note that was not there beforeI dont know if that is possible ![]() Would i would do was, to put an area in the map where the note is, so that when the player collides with the area, the note appears RE: No Matching signatures - Lake - 08-12-2012 ok I understand, I'll think of some other idea for the custom RE: No Matching signatures - Lizard - 08-12-2012 (08-12-2012, 11:19 AM)Lake Wrote: ok I understand, I'll think of some other idea for the customThere is also another option. You could have a item as trigger for the note. Pick up an trigger item in one map, and when you enter the second the game should check if you have the trigger item in your inventory, and if you have the note should appear |