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
GlobalVarIn trouble
bleakraven Offline
Junior Member

Posts: 8
Threads: 3
Joined: Oct 2012
Reputation: 0
#1
GlobalVarIn trouble

Hey there,

I'm trying to script an area where if the player remains in it, after 7 seconds a sound will play. Once the sound triggers, it won't ever happen again. If the player leaves the area before the sound plays, then it can be triggered again.

Here's what I have:

PHP Code: (Select All)
//LION SETPIECEvoid LionRoar(string &in asParent, string &in asChild, int state){        AddTimer("CountdownToRoar", 7, "LionIsRoaring");        AddDebugMessage("I see you.", false);        if (state == 1)        {         SetGlobalVarInt("InLion", 1);        }        else if (state == -1)        {         SetGlobalVarInt("InLion", 0);        }}
void LionIsRoaring(string &in asTimer){    if (GetGlobalVarIn("InLion") == 1)    {    PlayGuiSound("low_lion_growl.snt"1000);    RemoveEntityCollideCallback("Player""SurpriseLion_1");    RemoveTimer("CountdownToRoar");    AddDebugMessage("Roar."false);    }} 


However, I get a "No matching signatures for GlobalVarInt(string@&)" for my LionIsRoaring func.

Can anyone explain to me what I'm doing wrong or just help me code this in another way?

Cheers

PS: Sorry, idk how to format that nicely for you Confused
(This post was last modified: 10-29-2012, 05:36 PM by bleakraven.)
10-29-2012, 04:00 PM
Find


Messages In This Thread
GlobalVarIn trouble - by bleakraven - 10-29-2012, 04:00 PM
RE: GlobalVarIn trouble - by Unearthlybrutal - 10-29-2012, 04:09 PM
RE: GlobalVarIn trouble - by bleakraven - 10-29-2012, 04:20 PM
RE: GlobalVarIn trouble - by Unearthlybrutal - 10-29-2012, 04:23 PM
RE: GlobalVarIn trouble - by bleakraven - 10-29-2012, 04:24 PM
RE: GlobalVarIn trouble - by Unearthlybrutal - 10-29-2012, 04:34 PM
RE: GlobalVarIn trouble - by bleakraven - 10-29-2012, 05:35 PM
RE: GlobalVarIn trouble - by Unearthlybrutal - 10-29-2012, 06:39 PM



Users browsing this thread: 8 Guest(s)