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 Global Varint With Lever
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#3
RE: Global Varint With Lever

Of course:

It should be like this:

Map with lever
void OnStart()
{
SetEntityConnectionChangeStateCallback("Lever", "Func");
}

void Func (string &in asEntity, int alState)
{
if (alState == 1)
{
AddGlobalVarInt("Var", 1);
//You may put some sounds if you wish
}
}

Map where the lever takes effect:

void OnEnter()
{
if (GetGlobalVarInt("Var" == 1))
{
//Unlock your thing
}
}

EDIT: Ninja'd by Adrianis. Although I explain myself better.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
(This post was last modified: 01-25-2013, 02:02 PM by The chaser.)
01-25-2013, 02:02 PM
Find


Messages In This Thread
Global Varint With Lever - by No Author - 01-25-2013, 01:51 PM
RE: Global Varint With Lever - by Adrianis - 01-25-2013, 02:01 PM
RE: Global Varint With Lever - by The chaser - 01-25-2013, 02:02 PM
RE: Global Varint With Lever - by jens - 01-25-2013, 02:06 PM
RE: Global Varint With Lever - by No Author - 01-26-2013, 07:43 AM



Users browsing this thread: 1 Guest(s)