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 fail
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#10
RE: Script fail

Try the following to debug your code. You want to look at the debug messages to see what is happening to the code. E.g if all 3 are showing up, then the error is in the function calls in the callback. If 2 are showing up somwhere in the callback an exception is being produced. If only 1 shows up then your collision callback isn't being triggered. If none show up, the hps file is not being loaded.
void OnStart()
{
AddEntityCollideCallback("Player", "HitDoor", "Creepy", true, 0);
AddDebugMessage("OnStart Finished",false);
}
void Creepy(string &in asParent, string &in asChild, int alState)
{
AddDebugMessage("Callback Triggered",false);
CreateParticleSystemAtEntity("", "ps_hit_wood", "HitArea", false);
CreateParticleSystemAtEntity("", "ps_hit_wood", "HitArea_1", false);
PlayGuiSound("hit_wood1.ogg", 7.0f);
PlayGuiSound("hit_wood1.ogg", 7.0f);
PlaySoundAtEntity("", "21_scream9", "Creep", 0, false);
StartPlayerLookAt("cellar_wood01_slow_1", 10.0f, 10.0f, "");
AddTimer("Timer", 1.0f, "NoLook");
AddDebugMessage("Callback Finished",false);
}
void NoLook(string &in asTimer)
{
StopPlayerLookAt();
}

Remember, everything is case sensitive Wink.
(This post was last modified: 08-01-2011, 10:53 PM by Apjjm.)
08-01-2011, 09:48 PM
Find


Messages In This Thread
Script fail - by Dizturbed - 08-01-2011, 09:05 PM
RE: Script fail - by Rapture - 08-01-2011, 09:11 PM
RE: Script fail - by Dizturbed - 08-01-2011, 09:17 PM
RE: Script fail - by Your Computer - 08-01-2011, 09:21 PM
RE: Script fail - by Dizturbed - 08-01-2011, 09:25 PM
RE: Script fail - by Your Computer - 08-01-2011, 09:29 PM
RE: Script fail - by Dizturbed - 08-01-2011, 09:30 PM
RE: Script fail - by Your Computer - 08-01-2011, 09:34 PM
RE: Script fail - by Rapture - 08-01-2011, 09:36 PM
RE: Script fail - by Apjjm - 08-01-2011, 09:48 PM
RE: Script fail - by Juby - 08-01-2011, 10:16 PM
RE: Script fail - by Dizturbed - 08-01-2011, 10:49 PM
RE: Script fail - by Angerpull - 08-02-2011, 01:07 AM



Users browsing this thread: 1 Guest(s)