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:
  • 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
#1
Timers

Hello Frictional!


I am trying to zoom in the FOV of player for 4 seconds, then back out after 4 seconds.
This is literally my first go at timers, hopefully I was somewhere close, please correct me if you can!

My script:


oid 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 timer_name)
{
if (timer_name == "FOV")
{
FadePlayerFOVMulTo(0.5, 2);
SetPlayerActive(false);
AddTimer("Normal1", 4, "FadePlayerFOVMulTo");
}
else if (timer_name == "Normal1")
{
FadePlayerFOVMulTo(1, 2);
SetPlayerActive(true);
}

Bold is what I'm talking about
08-10-2012, 07:27 AM
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)