Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
After player Died restart Map HeLpiE Help
nkmol Offline
Senior Member

Posts: 252
Threads: 19
Joined: Feb 2011
Reputation: 4
#9
RE: After player Died restart Map HeLpiE Help

it is the same as a normal command, you could see it as a command in command for now Tongue
you need the,
void callback
{
//scripting stuff
if//your if script
{
//script for the if
}
}

as an example, in one of my maps i made a simple if script Wink
void OnEnter()
{
    SetEntityConnectionStateChangeCallback("lever_small01_1", "LeverChange");
}

void LeverChange(string &in EntityName, int alState)
{
    AddDebugMessage("lever_small01_1" + "'s current state: " + alState, false);
    
    if (alState == -1)
    {
        PlaySoundAtEntity("Elec_light", "27_tunnel_elec.snt", "chandelier_simple_short_1", 0.5f, false);
        SetLightVisible("PointLight_2", true);
        SetLampLit("chandelier_simple_short_1", true, true);
    }
}

AND DON'T COPY THIS! xD
this is for a lever script, that will set some electric light on Tongue

if you get a error, first think about what could be the problem and when you can't solve it, ask it here. But first think by yourself (A)
(This post was last modified: 04-19-2011, 06:06 PM by nkmol.)
04-19-2011, 06:06 PM
Find


Messages In This Thread
RE: After player Died restart Map HeLpiE Help - by nkmol - 04-19-2011, 06:06 PM



Users browsing this thread: 1 Guest(s)