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);
}
}