[Solved]Help i don't know how to use Timers - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html) +--- Thread: [Solved]Help i don't know how to use Timers (/thread-6920.html) |
[Solved]Help i don't know how to use Timers - Danny Boy - 03-16-2011 Help i don't know how to use Timers! CreateTimer(std:tring asName, float afTime, std:tring asCallback, bool abGlobal); i know this is the code but i simply do not know what: asName... i have to give a name to the timer? or what this name is for? asCallback... what is this? abGlobal... its to put true or false right? please help RE: Help i don't know how to use Timers - Viperdream - 03-16-2011 Example: I want a timer that activates when I enter the map This is what I do: Code: void MonsterSpawnTimer(string &in asTimer) If you still don't understand it, check this out: http://wiki.frictionalgames.com/hpl2/tutorials/script/entihscript_beginner RE: Help i don't know how to use Timers - Danny Boy - 03-17-2011 well that does not work =/ i wanted to the player wend enters a area the door closes in a noise and creapy way, so the player looks behind him to see what happned... i wanted a timer to to make him stop looking at the door... and wend i have put the timer he does not look at the door eny more =/ what is the prob? here is the code if it helps: void OnStart() { AddEntityCollideCallback("Player", "ScaryAreaone", "CollideScaryArea", true, 1); } void CollideScaryArea(string &in asParent, string &in asChild, int alState) { SetSwingDoorLocked("SuperDoor", true, true); PlaySoundAtEntity("", "break_wood", "SuperDoor",0,false); PlaySoundAtEntity("", "react_pant", "Player",0,false); PlayGuiSound("insanity_monster_roar01.ogg", 1.0f); GiveSanityDamage(25, true); StartPlayerLookAt("SuperDoor", 7, 6, ""); AddTimer("Peek a Boo", 02.0f, "CollideScaryArea"); { StopPlayerLookAt(); } } RE: Help i don't know how to use Timers - Viperdream - 03-17-2011 Code: void CollideScaryArea(string &in asParent, string &in asChild, int alState) RE: Help i don't know how to use Timers - Danny Boy - 03-18-2011 Hey its works now thank you very much! |