Frictional Games Forum (read-only)

Full Version: Weeping Angel enemies
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
(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.

Like this.
Spoiler below!

Code:
bool abCode
abCode - determines if you want to use the code or not.
ITS JUST AN EXAMPLE

Let's just say you want to use it.

If you want to use it = true
If you DONT want to use it = false

No quotation's needed.


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.
(06-21-2013, 03:46 AM)lizardrock17 Wrote: [ -> ]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.

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 "
Change the bool's. The error is at them.
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");
}
}
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);
That is perfectly valid, and will work provided there are no other issues. I suggest that what happened to you is that you changed several different things, one of those changes corrected the issue you were having, but it was not the parenthesis around (true)
Pages: 1 2 3