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
Freeze player?
Hartmann Offline
Member

Posts: 52
Threads: 18
Joined: Jun 2012
Reputation: 0
#12
RE: Freeze player?

(07-30-2012, 02:12 PM)andyrockin123 Wrote: Alternatively, if you'd like the player to not move but still have control of the camera, you can use this:


SetPlayerMoveSpeedMul(0.0f);
SetPlayerRunSpeedMul(0.0f);void LightsOut_2(string &in asTimer)

AddEntityCollideCallback("Player", "KillTheLights", "LightsOut", true, 1);
AddEntityCollideCallback("Player", "KillTheLights_2", "LightsOut_2", true, 1);

StartPlayerLookAt("wall_door_frame_6", 10, 10, "");

AddTimer("StopLook_1", 6, "KillTheLights_2");
SetPlayerActive(false);
}

void LightsOut(string &in asParent, string &in asChild, int alState)
{
SetLampLit("candle_floor_1", false, true);
AddTimer("", 0.5, "Out2");
}

void Out2(string &in asTimer)
{
SetLampLit("candle_floor_2", false, true);
AddTimer("", 0.5, "Out3");
}

void Out3(string &in asTimer)
{
SetLampLit("candle_floor_3", false, true);
AddTimer("", 0.5, "Out4");
}

void Out4(string &in asTimer)
{
SetLampLit("candle_floor_4", false, true);
AddTimer("", 0.5, "Out5");
}

void Out5(string &in asTimer)
{
SetLampLit("candle_floor_5", false, true);
AddTimer("", 0.5, "Out6");
}

void Out6(string &in asTimer)
{
SetLampLit("candle_floor_6", false, true);
AddTimer("", 0.5, "Out7");
}

void Out7(string &in asTimer)
{
SetLampLit("candle_floor_7", false, true);
AddTimer("", 0.5, "Out8");
}

void Out8(string &in asTimer)
{
SetLampLit("candle_floor_8", false, true);
AddTimer("", 0.5, "Out9");
}

void Out9(string &in asTimer)
{
SetLampLit("candle_floor_9", false, true);
AddTimer("", 0.5, "Out10");
}

void Out10(string &in asTimer)
{
SetLampLit("candle_floor_10", false, true);
AddTimer("", 0.5, "Out11");
}

void Out11(string &in asTimer)
{
SetLampLit("candle_floor_11", false, true);
AddTimer("", 0.5, "Out12");
}

void Out12(string &in asTimer)
{
SetLampLit("candle_floor_12", false, true);
SetPlayerActive(true);
}

(07-30-2012, 02:23 PM)ZereboO Wrote: okay, try post your script
void OnStart()
{
AddUseItemCallback("", "key_1", "mansion_1", "KeyOnDoor", true);
AddUseItemCallback("", "key_2", "mansion_2", "KeyOnDoor_2", true);
AddUseItemCallback("", "key_3", "mansion_5", "KeyOnDoor_5", true);
SetEntityPlayerInteractCallback("key_3", "ActivateMonster", true);
SetEntityCallbackFunc("key_3", "OnPickup");
AddTimer("StopLook", 2, "LookAtDoor");
AddEntityCollideCallback("Player","Music", "StartMusic", true, 1);
AddEntityCollideCallback("Player", "KillTheLights", "LightsOut", true, 1);
AddEntityCollideCallback("Player", "KillTheLights_2", "LightsOut_2", true, 1);
AddTimer("StopLook_1", 6, "KillTheLights_2");
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0.0f, true);
RemoveItem("key_1");
}

void KeyOnDoor_2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_2", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_2", 0.0f, true);
RemoveItem("key_2");
}

void KeyOnDoor_5(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_5", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_5", 0.0f, true);
RemoveItem("key_3");
}

void StartMusic(string &in asParent, string &in asChild, int alState)
{
PlayMusic("03_paper_daniel02.ogg", true, 0.8, 2, 0, true);

}

void OnPickup(string &in asEntity, string &in type)
{
SetSwingDoorClosed("mansion_3", true, true);
AddPropImpulse("mansion_3", 0, 0, 10, "World");
AddTimer("StopLook", 1, "LookAtDoor");
PlaySoundAtEntity("", "unlock_door.snt", "mansion_5", 0.0f, true);
StartPlayerLookAt("mansion_3", 10, 10, "");
}
void LightsOut_2(string &in asTimer)
{
StartPlayerLookAt("wall_door_frame_6", 10, 10, "");
AddTimer("StopLook_1", 6, "KillTheLights_2");
SetPlayerActive(false);
}

void LightsOut(string &in asParent, string &in asChild, int alState)
{
SetLampLit("candle_floor_1", false, true);
AddTimer("", 0.5, "Out2");
}

void Out2(string &in asTimer)
{
SetLampLit("candle_floor_2", false, true);
AddTimer("", 0.5, "Out3");
}

void Out3(string &in asTimer)
{
SetLampLit("candle_floor_3", false, true);
AddTimer("", 0.5, "Out4");
}

void Out4(string &in asTimer)
{
SetLampLit("candle_floor_4", false, true);
AddTimer("", 0.5, "Out5");
}

void Out5(string &in asTimer)
{
SetLampLit("candle_floor_5", false, true);
AddTimer("", 0.5, "Out6");
}

void Out6(string &in asTimer)
{
SetLampLit("candle_floor_6", false, true);
AddTimer("", 0.5, "Out7");
}

void Out7(string &in asTimer)
{
SetLampLit("candle_floor_7", false, true);
AddTimer("", 0.5, "Out8");
}

void Out8(string &in asTimer)
{
SetLampLit("candle_floor_8", false, true);
AddTimer("", 0.5, "Out9");
}

void Out9(string &in asTimer)
{
SetLampLit("candle_floor_9", false, true);
AddTimer("", 0.5, "Out10");
}

void Out10(string &in asTimer)
{
SetLampLit("candle_floor_10", false, true);
AddTimer("", 0.5, "Out11");
}

void Out11(string &in asTimer)
{
SetLampLit("candle_floor_11", false, true);
AddTimer("", 0.5, "Out12");
}

void Out12(string &in asTimer)
{
SetLampLit("candle_floor_12", false, true);
SetPlayerActive(true);
}

////////////////////////////
// Run when leaving map
void OnLeave()
{
StopMusic(1,0);
}

void ActivateMonster(string &in item)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_7", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_8", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_10", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_11", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_12", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_13", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_14", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_15", 3, "Idle");

}
void LookAtDoor(string &in asTimer)
{
StopPlayerLookAt();
}

void Lightsout_2(string &in asTimer)
{
StopPlayerLookAt();
}
(This post was last modified: 07-30-2012, 02:33 PM by Hartmann.)
07-30-2012, 02:32 PM
Find


Messages In This Thread
Freeze player? - by Hartmann - 07-30-2012, 02:07 PM
RE: Freeze player? - by SilentStriker - 07-30-2012, 02:09 PM
RE: Freeze player? - by Hartmann - 07-30-2012, 02:12 PM
RE: Freeze player? - by Lizard - 07-30-2012, 02:17 PM
RE: Freeze player? - by Hartmann - 07-30-2012, 02:18 PM
RE: Freeze player? - by Lizard - 07-30-2012, 02:20 PM
RE: Freeze player? - by Hartmann - 07-30-2012, 02:22 PM
RE: Freeze player? - by Lizard - 07-30-2012, 02:09 PM
RE: Freeze player? - by Adny - 07-30-2012, 02:12 PM
RE: Freeze player? - by Hartmann - 07-30-2012, 02:32 PM
RE: Freeze player? - by SilentStriker - 07-30-2012, 02:18 PM
RE: Freeze player? - by Lizard - 07-30-2012, 02:23 PM
RE: Freeze player? - by Lizard - 07-30-2012, 02:39 PM
RE: Freeze player? - by Hartmann - 07-30-2012, 02:42 PM
RE: Freeze player? - by Lizard - 07-30-2012, 02:51 PM
RE: Freeze player? - by Hartmann - 07-30-2012, 03:10 PM
RE: Freeze player? - by Lizard - 07-30-2012, 03:18 PM
RE: Freeze player? - by Hartmann - 07-30-2012, 03:38 PM
RE: Freeze player? - by Lizard - 07-30-2012, 03:39 PM
RE: Freeze player? - by Hartmann - 07-30-2012, 03:43 PM
RE: Freeze player? - by Lizard - 07-30-2012, 03:48 PM
RE: Freeze player? - by Hartmann - 07-30-2012, 03:55 PM



Users browsing this thread: 3 Guest(s)