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:
  • 3 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Timer + Flying Jesus (easy problem)
strassenbelag Offline
Junior Member

Posts: 4
Threads: 2
Joined: Apr 2012
Reputation: 0
#1
Timer + Flying Jesus (easy problem)

Hey guys,

I want to make a script that wenn you open a cabinet a flying jesus (like here http://wiki.frictionalgames.com/hpl2/tut...iferorange)
comes out. But the problem is i dunno how to use timers, because if i open it he shouldn´t fly throw the cabinet door, so the timer should have sth like 0.5 seconds. I know that i have to use
void AddTimer(string& asName, float afTime, string& asFunction);

but don´t know how. can someone pls explain? thx Big Grin


Void OnStart()
{
SetEntityPlayerInteractCallback("Cabinet_Jesus", "Cabinet_Jesus_Func", false);
}




void Cabinet_Jesus_Func(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Jesus_2", true);
AddPropForce("Jesus_2", -30000, 0, 0, "World");
PlaySoundAtEntity("Scream_1", "scream_1.ogg", "Player", 0.0f, false);
}

(This post was last modified: 04-19-2012, 02:46 PM by strassenbelag.)
04-18-2012, 05:37 PM
Find


Messages In This Thread
Timer + Flying Jesus (easy problem) - by strassenbelag - 04-18-2012, 05:37 PM



Users browsing this thread: 1 Guest(s)