Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
RE: Multiple triggers
(06-19-2012, 10:56 PM)theshanus Wrote: Can't tell what's wrong
StartPlayerLookAt in OnPickup is missing a semicolon at the end of it.
|
|
06-19-2012, 11:17 PM |
|
The Shanus
Member
Posts: 134
Threads: 15
Joined: Jun 2012
Reputation:
3
|
RE: Multiple triggers
(06-19-2012, 11:17 PM)Your Computer Wrote: (06-19-2012, 10:56 PM)theshanus Wrote: Can't tell what's wrong
StartPlayerLookAt in OnPickup is missing a semicolon at the end of it. Fixed that now, but same errors :/ void OnStart() { }
//////////////////////////// // Run when entering map
void OnEnter() { AddUseItemCallback("", "room101key", "room101", "UsedKeyOnDoor", true); AddUseItemCallback("", "room100key", "room100", "UsedKeyOnDoor", true); SetEntityCallbackFunc("room100key", "OnPickup"); SetEntityCallbackFunc("NOTETWO", "OnPickup"); }
void UsedKeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked(asEntity, false, true); PlaySoundAtEntity("", asEntity, "room101", 0, false); PlaySoundAtEntity("", asEntity, "room100", 0, false); RemoveItem(asItem); }
void OnPickup(string &in asEntity, string &in type) { if(asEntity == "room100key") { SetEntityActive("poofer1", true); ShowEnemyPlayerPosition("poofer1"); PlaySoundAtEntity("", "04_break.snt", "poofer1", 0, false); StartPlayerLookAt("poofer1",2,2,""); StopPlayerLookAt(); } else if(asEntity == "NOTETWO") { SetSwingDoorLocked("room102",false,false); SetEntityActive("brute1",true); ShowEnemyPlayerPosition("brute1"); StartPlayerLookAt("brute1",2,2,""); StopPlayerLookAt(); } }
EDIT: CURRENT ERRORS: "main (24,1) : INFO : Compiling void OnScript (string&in string&in)
main (26,5) : ERR: Expected expressions value
main (34,5) : ERR: Expected expressions value"
Off to sleep now, hopefully someone will have it figured out by morning. Thanks in advance!
(This post was last modified: 06-20-2012, 12:03 AM by The Shanus.)
|
|
06-19-2012, 11:22 PM |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
RE: Multiple triggers
(06-19-2012, 11:22 PM)theshanus Wrote: Fixed that now, but same errors :/
Did you forget to save, then? It shouldn't have printed the same exact error if that issue was fixed; it would be a completely separate error if there is a problem.
(This post was last modified: 06-20-2012, 12:02 AM by Your Computer.)
|
|
06-20-2012, 12:00 AM |
|
The Shanus
Member
Posts: 134
Threads: 15
Joined: Jun 2012
Reputation:
3
|
RE: Multiple triggers
(06-20-2012, 12:00 AM)Your Computer Wrote: (06-19-2012, 11:22 PM)theshanus Wrote: Fixed that now, but same errors :/
Did you forget to save, then? It shouldn't have printed the same exact error if that issue was fixed; it would be a completely separate error if there is a problem. Have a look at that edit, please. A couple of new errors to replace that one, but no clue how to fix them either. Apparently, playing it out of dev mode, there are no errors. I'll check again with dev mode on in the morning. However, the player does not turn once the monster spawns...
EDIT: Playing out of dev mode, everything works but the player turning to look at the monsters.
(This post was last modified: 06-20-2012, 12:22 AM by The Shanus.)
|
|
06-20-2012, 12:18 AM |
|
drunkmonk
Member
Posts: 109
Threads: 7
Joined: Jun 2012
Reputation:
4
|
RE: Multiple triggers
(06-19-2012, 10:56 PM)theshanus Wrote: (06-19-2012, 09:41 PM)FastHunteR Wrote: http://www.frictionalgames.com/forum/thread-10798.html
Number 18, wake up script Okay so these are the errors I'm now getting:
"main (26,1) : INFO : Compiling void OnPickup (string&in string&in)
main (34,3) : ERR : Expected ';' "
And my script as of now: void OnStart() { }
//////////////////////////// // Run when entering map
void OnEnter() { AddUseItemCallback("", "room101key", "room101", "UsedKeyOnDoor", true); AddUseItemCallback("", "room100key", "room100", "UsedKeyOnDoor", true); SetEntityCallbackFunc("room100key", "OnPickup"); SetEntityCallbackFunc("NOTETWO", "OnPickup"); AddUseItemCallback("", "hatch101key", "hatch101", "UsedKeyOnDoor", true); }
void UsedKeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked(asEntity, false, true); PlaySoundAtEntity("", asEntity, "room101", 0, false); PlaySoundAtEntity("", asEntity, "room100", 0, false); PlaySoundAtEntity("", asEntity, "hatch101", 0, false); RemoveItem(asItem); }
void OnPickup(string &in asEntity, string &in type) { if(asEntity == "room100key") { SetEntityActive("poofer1", true); ShowEnemyPlayerPosition("poofer1"); PlaySoundAtEntity("", "04_break.snt", "poofer1", 0, false); StartPlayerLookAt("poofer1",2,2,"") StopPlayerLookAt(); } if(asEntity == "NOTETWO") { SetSwingDoorLocked("room102",false,false); SetEntityActive("brute1",true); StartPlayerLookAt("brute1",2,2,""); StopPlayerLookAt(); } }
Can't tell what's wrong you are just missing a ";" beside your StartPlayerLookAt("poofer1",2,2,"")
|
|
06-20-2012, 01:21 AM |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
RE: Multiple triggers
(06-20-2012, 12:18 AM)theshanus Wrote: EDIT: Playing out of dev mode, everything works but the player turning to look at the monsters.
That's because you told the game to stop forcing the player to look towards the monster immediately after telling the game to force the player to look at the monster.
|
|
06-20-2012, 01:35 AM |
|
The Shanus
Member
Posts: 134
Threads: 15
Joined: Jun 2012
Reputation:
3
|
RE: Multiple triggers
(06-20-2012, 01:35 AM)Your Computer Wrote: (06-20-2012, 12:18 AM)theshanus Wrote: EDIT: Playing out of dev mode, everything works but the player turning to look at the monsters.
That's because you told the game to stop forcing the player to look towards the monster immediately after telling the game to force the player to look at the monster. Ah, I was unsure about the StopPlayerLookAt, as it had no arguments. Using AddTimer worked like a charm, many thanks.
|
|
06-20-2012, 09:35 AM |
|
|