The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Timers... How do they work!?
JetlinerX Offline
Senior Member

Posts: 599
Threads: 49
Joined: Jun 2011
Reputation: 19
#1
Timers... How do they work!?

So, I have this:
void OnStart()
{
        AddEntityCollideCallback("Player", "attic_sound_scare1", "OnStart", true, 1);
        SetEntityPlayerInteractCallback("note_attic_desk", "OnPickup", true);
        AddEntityCollideCallback("Player", "mainatticscare", "OnPickup", true, 1);
}
void OnStart(string &in asParent, string &in asChild, int alState)
{
        PlaySoundAtEntity("", "amb_idle_whimp.snt", "attic_sound_scare1", 0.0f, true);
        PlaySoundAtEntity("", "insanity_baby_cry.snt", "attic_sound_scare1", 0.0f, true);
        PlaySoundAtEntity("", "door_level_cistern_close.snt", "attic_sound_scare1", 0.0f, true);
        PlaySoundAtEntity("", "general_thunder.snt", "attic_sound_scare1", 0.0f, true);
        PlaySoundAtEntity("", "break_stairs.snt", "attic_sound_scare1", 0.0f, true);
}
void OnPickup(string &in parent, string &in child, int state)
{
     if (parent == "Player" && child == "note_attic_desk")
     SetEntityActive("mainatticscare");
     {
        CreateParticleSystemAtEntity("", "ps_dust_impact", "Partdoor1", false);    
        CreateParticleSystemAtEntity("", "ps_door_damage_wood", "Partdoor1", false);
        CreateParticleSystemAtEntity("", "ps_dust_impact", "Partdoor2", false);    
        CreateParticleSystemAtEntity("", "ps_door_damage_wood", "Partdoor2", false);
        CreateParticleSystemAtEntity("", "ps_dust_impact", "Partdoor3", false);    
        CreateParticleSystemAtEntity("", "ps_door_damage_wood", "Partdoor3", false);
        CreateParticleSystemAtEntity("", "ps_dust_impact", "Partdoor4", false);    
        CreateParticleSystemAtEntity("", "ps_door_damage_wood", "Partdoor4", false);
        PlaySoundAtEntity("", "lurker_hit_Wood", "Player", 0, false);
        GiveSanityDamage(20, true);
        AddPlayerBodyForce(-40000, 25000, 0, false);
        FadePlayerRollTo(75, 3, 2);
        StartPlayerLookAt("level_celler_1", 2, 2, "");
        SetPlayerCrouching(true);
        AddTimer("", 2, "Timer1");
        AddTimer("", 10, "Timer2");
        GivePlayerDamage(10, "BloodSplat", false, false);
        SetLanternDisabled(true);
        PlaySoundAtEntity("", "player_bodyfall", "Player", 0, false);
        FadeRadialBlurTo(1, 0.5);
     }
}
void OnLeave ()
{
}
(That I am getting fatal errors on if someone would help on my other topic -_-)

But I have no idea how to work the two timers that I have in there, what goes in the places where I have "Timer1" and "Timer2"???

Thanks all!

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

08-17-2011, 08:59 PM
Website Find


Messages In This Thread
Timers... How do they work!? - by JetlinerX - 08-17-2011, 08:59 PM
RE: Timers... How do they work!? - by Khyrpa - 08-17-2011, 09:07 PM



Users browsing this thread: 1 Guest(s)