Steve
Member
Posts: 178
Threads: 17
Joined: Jun 2012
Reputation:
7
|
RE: Machine puzzle and other things
try this
Spoiler below!
void OnStart()
{
AddUseItemCallback("Usedsteam", "SteamRod", "MachineScript_1", "Elevator", true);
AddUseItemCallback("Usedflow" ,"FlowRod", "MachineScript_2", "Elevator_1", true);
}
void Elevator (string &in asParent, string &in asChild, int alState)
{
SetEntityActive("SteamRod_static", true);
PreloadSound("rod_in.snt");
AddLocalVarInt("ElevatorWork", 1);
func_check();
}
void Elevator_1 (string &in asParent, string &in asChild, int alState)
{
SetEntityActive("FlowRod_static", true);
PreloadSound("rod_in.snt");
AddLocalVarInt("ElevatorWork", 1);
func_check();
}
void func_check()
{
if (GetLocalVarInt("ElevatorWork") == 2)
{
PreloadSound("13_flow_done.snt");
SetEntityConnectionStateChangeCallback("elevator_lever_1", "Map");
}
}
void Map (string &in asEntity, int alState)
{
if (alState == 1)
{
ChangeMap("00_Buda.map", "PlayerStartArea_1", "14_elevator_activate.snt", "elevator_move_normal.snt");
}
}
CURRENTLY WORKING ON:
Final Light = 40%
Need of voice actors.
|
|
11-04-2012, 08:15 PM |
|