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
[SOLVED] RemoveTimer doesn't work
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#6
RE: RemoveTimer doesn't work

Ok sorry Smile Ill post the whole script Wink

void OnStart()
{


AddUseItemCallback("", "crowbar_guestroom", "mansion_7", "UsedCrowbarOnDoor", true);
AddEntityCollideCallback("crowbar_guestroom_joint", "crowbar1_script", "CollideAreaBreakDoor", true, 1);


AddTimer("", 30, "cry_1_timer");

}


void UsedCrowbarOnDoor(string &in asItem, string &in asEntity)
{
AddTimer("", 0.2, "TimerSwitchShovel");
RemoveItem("crowbar_guestroom");
}


void TimerSwitchShovel(string &in asTimer)
{
PlaySoundAtEntity("","puzzle_place_jar.snt", "mansion_7", 0, false);
SetEntityActive("crowbar_guestroom_joint", true);
}


void CollideAreaBreakDoor(string &in asParent, string &in asChild, int alState)
{
AddPlayerSanity(5);
SetSwingDoorLocked("mansion_7", false, true);
AddPropImpulse("mansion_7", 0, 0, -50, "World");
SetSwingDoorDisableAutoClose("mansion_7", true);
SetSwingDoorClosed("mansion_7", false, false);
SetMoveObjectState("mansion_7", 1);
PlaySoundAtEntity("","break_wood_metal", "crowbar1_area", 0, false);
CreateParticleSystemAtEntity("", "ps_hit_wood", "crowbar1_area", false);
SetEntityActive("crowbar_guestroom_joint", false);
SetLocalVarInt("Door", 1);
SetEntityActive("crowbar_guestroom_broken", true);

AddTimer("", 1, "girl_scream_timer");
}

///SCARES

void girl_scream_timer(string &in asTimer)
{
PlaySoundAtEntity("", "12_girl_scream", "level_wood_1", 0, false);
AddTimer("", 2, "girl_flee_timer");
}

void girl_flee_timer(string &in asTimer)
{
SetSwingDoorLocked("mansion_5", false, true);
SetSwingDoorDisableAutoClose("mansion_5", true);
AddPropImpulse("mansion_5", 0, 0, 20, "");
AddTimer("", 1, "girl_flee_stop_timer");
}

void girl_flee_stop_timer(string &in asTimer)
{
PlaySoundAtEntity("", "door_level_wood_open", "level_wood_1", 0, false);
SetGlobalVarInt("Cellar", 1);
RemoveTimer("girl_cry");
StopSound("12_girl_cry", 0);
}

///TIMERS

void cry_1_timer(string &in asTimer)
{
PlaySoundAtEntity("", "12_girl_cry", "mansion_5", 0.5f, false);
AddTimer("girl_cry", 40, "cry_1_timer");
}

EDIT: And no it doesn't work Sad

Trying is the first step to success.
(This post was last modified: 05-22-2012, 07:40 AM by FlawlessHappiness.)
05-20-2012, 08:01 PM
Find


Messages In This Thread
RE: RemoveTimer doesn't work - by Putmalk - 05-20-2012, 07:29 PM
RE: RemoveTimer doesn't work - by Statyk - 05-20-2012, 07:36 PM
RE: RemoveTimer doesn't work - by Cranky Old Man - 05-20-2012, 07:54 PM
RE: RemoveTimer doesn't work - by Statyk - 05-20-2012, 07:59 PM
RE: RemoveTimer doesn't work - by Cranky Old Man - 05-24-2012, 12:49 PM
RE: RemoveTimer doesn't work - by FlawlessHappiness - 05-20-2012, 08:01 PM
RE: RemoveTimer doesn't work - by Your Computer - 05-24-2012, 10:32 AM
RE: RemoveTimer doesn't work - by Acies - 05-24-2012, 10:32 AM



Users browsing this thread: 3 Guest(s)