Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Weeping Angel enemies
lizardrock17 Offline
Junior Member

Posts: 20
Threads: 3
Joined: Jun 2013
Reputation: 0
#21
RE: Weeping Angel enemies

(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!

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.
(This post was last modified: 06-21-2013, 03:54 AM by lizardrock17.)
06-21-2013, 03:46 AM
Find
CarnivorousJelly Offline
Posting Freak

Posts: 1,196
Threads: 41
Joined: Dec 2012
Reputation: 80
#22
RE: Weeping Angel enemies

(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 "

[Image: quote_by_rueppells_fox-d9ciupp.png]
(This post was last modified: 06-21-2013, 05:20 AM by CarnivorousJelly.)
06-21-2013, 05:17 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#23
RE: Weeping Angel enemies

Change the bool's. The error is at them.

"Veni, vidi, vici."
"I came, I saw, I conquered."
06-21-2013, 05:52 AM
Find
lizardrock17 Offline
Junior Member

Posts: 20
Threads: 3
Joined: Jun 2013
Reputation: 0
#24
RE: Weeping Angel enemies

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");
}
}
(This post was last modified: 06-21-2013, 03:41 PM by lizardrock17.)
06-21-2013, 02:59 PM
Find
Adrianis Offline
Senior Member

Posts: 620
Threads: 6
Joined: Feb 2012
Reputation: 27
#25
RE: Weeping Angel enemies

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

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)

06-21-2013, 05:47 PM
Find




Users browsing this thread: 1 Guest(s)