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
Valve help
H. Filipe Offline
Junior Member

Posts: 22
Threads: 6
Joined: Jun 2011
Reputation: 0
#5
RE: Valve help

(07-05-2011, 10:33 AM)teddifisk Wrote:
(07-05-2011, 01:49 AM)Tanshaydar Wrote: State Change is what you are looking for.
void SetEntityConnectionStateChangeCallback(string& asName, string& asCallback);

A callback called when ever the connection state changes (button being switched on, lever switched, etc).
Callback syntax: void Func(string &in EntityName, int alState)
alState: -1 = off, 0 = between, 1 = on

What do insert where??
Can anybody see why its not working???


////////////////////////////
// Run first time starting map
void OnStart()
{
SetEntityConnectionStateChangeCallback(LoL, EndaMer);
AddEntityCollideCallback("Player", "HaveLantern", "MayIGo", false, 1);
AddEntityCollideCallback("Player", "HaveLantern_1", "MayINot", false, 1);
}

void Func("button_simple_1", 1)
{
PlaySoundAtEntity("", "13_steam.snt", "Player", 0, true);
}

void MayINot(string &in asParent, string &in asChild, int alState)
{
if(HasItem("ZuLantern")==false)
{
SetMessage("NotWorking", "CisternDarkness", 0);
}
}

void MayIGo(string &in asParent, string &in asChild, int alState)
{
if(HasItem("ZuLantern")==true)
{
SetEntityActive("BlockBuster", false);
SetEntityActive("BlockBuster_1", false);
SetEntityActive("BlockBuster_2", false);
}
}

////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

You forgot the "" in SetEntityConnectionStateChangeCallback(LoL, EndaMer); is SetEntityConnectionStateChangeCallback("LoL", "EndaMer");
I think

E-mail: postal2DeusEx@hotmail.com
Xbox/Live Account: HUGO BOLT 0GTA0

Working on a Custom Story :)
07-08-2011, 01:04 PM
Find


Messages In This Thread
Valve help - by Henriksen - 07-01-2011, 11:57 AM
RE: Valve help - by Henriksen - 07-03-2011, 03:15 AM
RE: Valve help - by Tanshaydar - 07-05-2011, 01:49 AM
RE: Valve help - by Henriksen - 07-05-2011, 10:33 AM
RE: Valve help - by H. Filipe - 07-08-2011, 01:04 PM



Users browsing this thread: 1 Guest(s)