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
ClayPigeon Offline
Member

Posts: 214
Threads: 13
Joined: Mar 2012
Reputation: 8
#2
RE: Timer + Flying Jesus (easy problem)

void Cabinet_Jesus_Func(string &in asParent, string &in asChild, int alState)
{    
    AddTimer("", 2.0f, "Timer_01");
}

void Timer_01(string &in asTimer)
{
    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-18-2012, 05:46 PM by ClayPigeon.)
04-18-2012, 05:46 PM
Find
JetlinerX Offline
Senior Member

Posts: 599
Threads: 49
Joined: Jun 2011
Reputation: 19
#3
RE: Timer + Flying Jesus (easy problem)

I highly suggest you re-think this "scare" anyway.

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

04-19-2012, 02:16 AM
Website Find
Quotentote Offline
Member

Posts: 118
Threads: 23
Joined: Dec 2011
Reputation: 11
#4
RE: Timer + Flying Jesus (easy problem)

yea delete this script...problem solved =)

Cruel ways 2: Something went wrong
8.04.2012


04-19-2012, 03:02 AM
Find
Datguy5 Offline
Senior Member

Posts: 629
Threads: 25
Joined: Dec 2011
Reputation: 12
#5
RE: Timer + Flying Jesus (easy problem)

You can make this scare if you arent gonna release this story =) If your gonna make to some of your friends and see them get scared then this is ok.But if you are gonna release this PLEASE DONT PUT FLYING JESUSES IN IT!!!

04-19-2012, 04:56 PM
Find
ClayPigeon Offline
Member

Posts: 214
Threads: 13
Joined: Mar 2012
Reputation: 8
#6
RE: Timer + Flying Jesus (easy problem)

This is development support, he asked for some help with his script, why are you commenting negatively on his idea? It's his right to apply it wheter it's good or not.
04-19-2012, 07:01 PM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#7
RE: Timer + Flying Jesus (easy problem)

(04-19-2012, 07:01 PM)ClayPigeon Wrote: This is development support, he asked for some help with his script, why are you commenting negatively on his idea? It's his right to apply it wheter it's good or not.
As much as I hate this "scare", I agree.

Don't shoot him down guys... If you don't like it, just don't play his campaign. That's my way of dealing with it.
04-19-2012, 08:37 PM
Find




Users browsing this thread: 1 Guest(s)