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
Script Help Timers
TheIcyPickle Offline
Member

Posts: 80
Threads: 16
Joined: Feb 2011
Reputation: 0
#3
RE: Timers

Ah, sorry, I do have a V in void. But,
SetEntityCallbackFunc("key_study_1", "OnPickup");


Is my script in the OnStart. I picking up a key, then ZOOM in for 4 seconds, then back out.

So I think the
void OnPickup(string &in asEntity, string &in type) still works.


Do I need to AddTimer in the OnStart?

Oh I see what you meant.

I tried that, no luck, I still get a "unexpected end of file". And the area where it says its wrong is lines 2 and 79, and thats the very start and end of the hps.

It must be something else..

(08-10-2012, 06:53 PM)TheIcyPickle Wrote: Ah, sorry, I do have a V in void. But,
SetEntityCallbackFunc("key_study_1", "OnPickup");


Is my script in the OnStart. I picking up a key, then ZOOM in for 4 seconds, then back out.

So I think the
void OnPickup(string &in asEntity, string &in type) still works.


Do I need to AddTimer in the OnStart?

Oh I see what you meant.

I tried that, no luck, I still get a "unexpected end of file". And the area where it says its wrong is lines 2 and 79, and thats the very start and end of the hps.

It must be something else..
Here is my script once more

void OnStart()
{
SetEntityCallbackFunc("key_study_1", "OnPickup");

}



void OnPickup(string &in asEntity, string &in type)
{
SetMessage("Messages", "noise", 4.0);
AddTimer("FOV", 0, "FadePlayerFOVMulTo");
PlaySoundAtEntity("", "enemy_hallucination_disappear.snt", "Player", 0, false);
GiveSanityDamage(25, false);

void FadePlayerFOVMulTo(string &in asTimer)
{
if (timer_name == "FOV")
{
FadePlayerFOVMulTo(0.5, 2);
SetPlayerActive(false);
AddTimer("Normal1", 4, "FadePlayerFOVMulTo");
}
else if (timer_name == "Normal1")
{
FadePlayerFOVMulTo(1, 2);
SetPlayerActive(true);
}
}
(This post was last modified: 08-10-2012, 07:25 PM by TheIcyPickle.)
08-10-2012, 06:53 PM
Find


Messages In This Thread
Timers - by TheIcyPickle - 08-10-2012, 07:27 AM
RE: Timers - by EXAWOLT - 08-10-2012, 08:24 AM
RE: Timers - by TheIcyPickle - 08-10-2012, 06:53 PM
RE: Timers - by Steve - 08-10-2012, 07:44 PM
RE: Timers - by TheIcyPickle - 08-10-2012, 08:04 PM
RE: Timers - by Adny - 08-10-2012, 08:14 PM
RE: Timers - by TheIcyPickle - 08-10-2012, 08:21 PM



Users browsing this thread: 1 Guest(s)