![]() |
[SCRIPT] Weeping Angel enemies - 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: [SCRIPT] Weeping Angel enemies (/thread-21864.html) |
RE: Weeping Angel enemies - lizardrock17 - 06-21-2013 (06-21-2013, 03:42 AM)JustAnotherPlayer Wrote: Bool's only evaluates to true or false. So, you need to change the bool's to true or false. thanx i fixed that problem but it didnt help. the error i get is main (10, 43) : ERR : Expected '(' main (14, 41) : ERR : Expected '(' which doesnt make any sense to me because i followed the engine scripts correctly. I tried doing that but it just came up with another error had me place another parenthesis in a different place that still didnt make sense. RE: Weeping Angel enemies - CarnivorousJelly - 06-21-2013 (06-21-2013, 03:46 AM)lizardrock17 Wrote: thanx i fixed that problem but it didnt help. the error i get is Line 10, 43 character over, you need a ( or ) same thing for line 14, 41 character over. The coordinates (10, 43) are really just giving you the line and column (character you're on). If you have an actual scripting program like Notepad++ or Geany, you'll be able to find the line numbers on the left-hand bar. When it says Expected '[insert something here]', that just means you need to throw the specified thing into the coordinates given. The only one that's really not helpful is the Unexpected end of file, which just gives you the coordinates for the end of the file and is very non-descriptive. It just means you're missing a ';' or an " RE: Weeping Angel enemies - PutraenusAlivius - 06-21-2013 Change the bool's. The error is at them. RE: Weeping Angel enemies - lizardrock17 - 06-21-2013 Ok peoplz I have some success. For one I got the script working (apparently the true or false needs a parenthesis around it). Now I got to figure out how to make it instantaneous because when i look at the grunt it takes a little while for it to freeze. But other than that the script works. Can anyone help me with that problem. The finished script is below. void OnStart() { SetEntityPlayerLookAtCallback("servant_grunt_1", "WeepingAngel_1", false); } void WeepingAngel_1(string &in asEntity, int alState) { if(alState == 1) { SetEnemyDisabled("servant_grunt_1", bool (true)); } else if(alState == -1) { SetEnemyDisabled("servant_grunt_1", bool (false)); ShowEnemyPlayerPosition("servant_grunt_1"); } } RE: Weeping Angel enemies - Adrianis - 06-21-2013 Boolean values do not need to have parenthesis, im surprised that 'bool (true)' works at all, in fact! Technically, just using (bool) is legal but the parenthesis serves no purpose. Just like you don't need to include the type name 'string&' when providing a string value, you don't need the type name 'bool' when providing a boolean value Code: SetEnemyDisabled("servant_grunt_1", true); |