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
Juby Away
Senior Member

Posts: 290
Threads: 2
Joined: May 2011
Reputation: 5
#11
RE: Script fail

You need to have an asType of "Collide" to call a collide function and an asType of "Timer" to call a timer function; the basic reasoning to why it will not work right now is because there isn't a defined asType. So, it should be

void OnStart()
{
AddEntityCollideCallback("Player", "HitDoor", "CollideCreepy", true, 0);
}
void CollideCreepy(string &in asParent, string &in asChild, int alState)
{
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, "TimerNoLook");
}
void TimerNoLook(string &in asTimer)
{
StopPlayerLookAt();
}

Insanity. Static.
(This post was last modified: 08-01-2011, 10:19 PM by Juby.)
08-01-2011, 10:16 PM
Find
Dizturbed Offline
Member

Posts: 160
Threads: 39
Joined: Jun 2011
Reputation: 0
#12
RE: Script fail

Nope, you dont.

08-01-2011, 10:49 PM
Find
Angerpull Offline
Member

Posts: 88
Threads: 24
Joined: Jun 2011
Reputation: 0
#13
RE: Script fail

I see nothing wrong with the code, it must be the names. Make sure everything is named correctly. Also what I like to do when I am scripting is adding double space between functions, it keeps it more organized and easier to read. Like this.

{
AddEntityCollideCallback(AUSDUIDIAUSG blab blah);
}

void blah(blah void and all the ponies had sex);
{
My function is potato.
}

Makes it better to read. Or do w/e you want.
08-02-2011, 01:07 AM
Find




Users browsing this thread: 1 Guest(s)