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 SetGlobalVarInt not working
serbusfish Offline
Member

Posts: 211
Threads: 75
Joined: Aug 2012
Reputation: 0
#1
SetGlobalVarInt not working

The scenario: you start in a map with a door that in the story is locked from the other side. You change map and get to the door in question and unlock it, go through it and now it is unlocked in the original map. This is what I did but it didnt work:

Quote:void OnStart()

{

SetGlobalVarInt("DRDoor",0);
CheckDRDoor();

}

void CheckDRDoor()

{
if(GetLocalVarInt("DRDoor") == 1)
{
SetLevelDoorLocked("level_wood_2", false);
}
}

In the second map once the door is unlocked I simply did


Quote:AddGlobalVarInt("DRDoor", 1);

But when I go back to the first map the door is still locked. The same type of script but a Local not GlobalVar worked in a different scenario so I thought it would work here to?

07-03-2016, 09:59 PM
Find


Messages In This Thread
SetGlobalVarInt not working - by serbusfish - 07-03-2016, 09:59 PM
RE: SetGlobalVarInt not working - by Darkfire - 07-03-2016, 10:50 PM
RE: SetGlobalVarInt not working - by serbusfish - 07-04-2016, 01:12 AM
RE: SetGlobalVarInt not working - by Lizard - 07-04-2016, 11:04 AM
RE: SetGlobalVarInt not working - by serbusfish - 07-04-2016, 01:55 PM
RE: SetGlobalVarInt not working - by Romulator - 07-04-2016, 02:00 PM
RE: SetGlobalVarInt not working - by serbusfish - 07-05-2016, 08:35 PM
RE: SetGlobalVarInt not working - by Darkfire - 07-04-2016, 04:30 PM
RE: SetGlobalVarInt not working - by Daemian - 07-06-2016, 01:59 AM
RE: SetGlobalVarInt not working - by Mudbill - 07-06-2016, 02:27 AM



Users browsing this thread: 1 Guest(s)