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
Nothing is working.
i3670 Offline
Posting Freak

Posts: 1,308
Threads: 74
Joined: Oct 2011
Reputation: 36
#4
RE: Nothing is working.

Apjjm: sent download link to mapfile in pm
beecake: done that, didn't work.

Portcullis script
Spoiler below!

void OnStart()
{
ConnectEntities("D", "lever_simple01", "castle_portcullis_1", true, -1, "PortOpen1");
ConnectEntities("E", "lever_simple02", "castle_portcullis_2", true, -1, "PortOpen2");
ConnectEntities("F", "lever_simple03", "castle_portcullis_3", true, -1, "PortOpen3");
}
///Ports///
void PortOpen1(string &in asConnectionName, string &in asMainEntity, string &in asConnectEntity, int alState)
{
if (alState == 1)
{
SetMoveObjectState("castle_portcullis_1", 1);
SetLeverStuckState("lever_simple01", 0, true);
}
else if(alState == -1)
{
SetMoveObjectState("castle_portcullis_1", 0);
}
}

void PortOpen2(string &in asConnectionName, string &in asMainEntity, string &in asConnectEntity, int alState)
{
if (alState == 1)
{
SetMoveObjectState("castle_portcullis_2", 1);
SetLeverStuckState("lever_simple02", 0, true);
}
else if(alState == -1)
{
SetMoveObjectState("castle_portcullis_2", 1);
}
}

void PortOpen3(string &in asConnectionName, string &in asMainEntity, string &in asConnectEntity, int alState)
{
if (alState == 1)
{
SetMoveObjectState("castle_portcullis_3", 1);
SetLeverStuckState("lever_simple03", 0, true);
}
else if(alState == -1)
{
SetMoveObjectState("castle_portcullis_3", 1);
}
}

///Ports End///



Graveyard script
Spoiler below!

void OnStart()
{
AddEntityCollideCallback("Player", "GraveArea_1", "Grave1", true, 1);
AddEntityCollideCallback("Player", "GraveArea_2", "Grave2", true, 1);
AddEntityCollideCallback("Player", "GraveArea_3", "Grave3", true, 1);
AddEntityCollideCallback("Player", "GraveArea_4", "Grave4", true, 1);

SetLocalVarInt("Var1", 0);

SetEntityPlayerLookAtCallback("GraceAreaCorpse_1", "CorpseDisappear1", true);
SetEntityPlayerLookAtCallback("GraceAreaCorpse_2", "CorpseDisappear2", true);
}

void Grave1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("GraceAreaCorpse_1", true);

AddLocalVarInt("Var1", 1);
func5();
}

void Grave2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("GraceAreaCorpse_2", true);

AddLocalVarInt("Var1", 1);
func5();
}

void Grave3(string &in asParent, string &in asChild, int alState)
{
AddLocalVarInt("Var1", 1);
func5();
}

void Grave4(string &in asParent, string &in asChild, int alState)
{
AddLocalVarInt("Var1", 1);
func5();
}

void func5()
{
if(GetLocalVarInt("Var1") == 4)
{
SetEntityActive("coffin_dirty_3", true);
SetEntityActive("Flask_03", true);
}
}

void CorpseDisappear1(string &in asEntity, int alState)
{
if (alState == 1)
{
SetPropActiveAndFade("graveyard_corpse03_1", false, 0.5f);
StartScreenShake(0.1f, 0, 0.1, 0.1);
PlayGuiSound("sanity_flick.snt", 0.5f);
PlayGuiSound("scare_wall_scratch_single.snt", 1);
PlayGuiSound("react_breath.snt", 1);
}
}

void CorpseDisappear2(string &in asEntity, int alState)
{
if (alState == 1)
{
SetPropActiveAndFade("graveyard_corpse02_1", false, 0.5f);
StartScreenShake(0.1f, 0, 0.1, 0.1);
PlayGuiSound("sanity_flick.snt", 0.5f);
PlayGuiSound("scare_wall_scratch_single.snt", 1);
PlayGuiSound("react_breath.snt", 1);
}
}
///Graveyard End///



Tunnel script
Spoiler below!

void OnStart()
{
AddEntityCollideCallback("Player", "WhisperArea_1", "WhisperTunnel_1", true, 1);
AddEntityCollideCallback("Player", "WhisperArea_2", "WhisperTunnel_2", true, 1);
AddEntityCollideCallback("Player", "WhisperArea_3", "WhisperTunnel_3", true, 1);
}

///Spike Tunnel///
void WhisperTunnel_1(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "05_event_bottles.snt", "Player", 1.0f, false);
}

void WhisperTunnel_2(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "insanity_whisper.snt", "Player", 1.0f, false);
}

void WhisperTunnel_3(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "insanity_whisper.snt", "Player", 1.0f, false);
}

///Spike Tunnel End///


Lab script
Spoiler below!

void OnStart()
{
SetEntityInteractionDisabled("glass_container_1", true);

ConnectEntities("Ignite", "ValveIgnite", "Valve_1_AreaBottle", false, 0, "TurnOnAcidLab");
}

////////LAB///////
void TurnOnAcidLab(string &in asConnectionName, string &in asMainEntity, string &in asConnectEntity, int alState)
{
if(alState == 1)
{
for(int i=1;i<=4;i++) {
CreateParticleSystemAtEntity(asName+"Fire"+i, "ps_fire_candle.ps", "Valve_"+i+"_AreaBottle", false);

FadeLightTo("Valve_"+i+"_Light", -1, -1, -1, -1, 0.4f, 1);

SetWheelStuckState("Valve_"+i, 0, true);
}

PlaySoundAtEntity("IgniteSound", "general_fire_burning_low", "Valve_1_AreaBottle", 1, false);

SetWheelStuckState("ValveIgnite", 1, true);
}
else if(alState == -1)
{

}
}

///////LAB END//////


I don't have multiple OnStarts, it's just from when I split up the script.

"What you think is irrelevant" - A character of our time

A Christmas Hunt
09-05-2012, 10:08 PM
Find


Messages In This Thread
Nothing is working. - by i3670 - 09-05-2012, 09:06 PM
RE: Nothing is working. - by Apjjm - 09-05-2012, 09:11 PM
RE: Nothing is working. - by FlawlessHappiness - 09-05-2012, 09:18 PM
RE: Nothing is working. - by i3670 - 09-05-2012, 10:08 PM
RE: Nothing is working. - by Apjjm - 09-06-2012, 04:02 PM
RE: Nothing is working. - by i3670 - 09-06-2012, 07:51 PM



Users browsing this thread: 3 Guest(s)