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
Request cogwheel/elevatormachine
masanoffi Offline
Junior Member

Posts: 7
Threads: 1
Joined: Jul 2017
Reputation: 0
#3
Video  RE: cogwheel/elevatormachine

here is the script
void OnStart()


{
AddEntityCollideCallback("cogwheel01_dyn", "cogwheel02", "CollideWrongWheel", false, 1);
AddEntityCollideCallback("cogwheel01_dyn", "cogwheel03", "CollideWrongWheel", false, 1);
AddEntityCollideCallback("cogwheel02_dyn", "cogwheel01", "CollideWrongWheel", false, 1);
AddEntityCollideCallback("cogwheel02_dyn", "cogwheel03", "CollideWrongWheel", false, 1);
AddEntityCollideCallback("cogwheel03_dyn", "cogwheel01", "CollideWrongWheel", false, 1);
AddEntityCollideCallback("cogwheel03_dyn", "cogwheel02", "CollideWrongWheel", false, 1);
//SetLocalVarInt("WheelOK", 3);
//SetLocalVarInt("CoalOK",3);
//SetLocalVarInt("GuideOK",1);
//SetLocalVarInt("SticksOK",1);
for(int i=1;i<=12;i++){
AddEntityCollideCallback("coal_"+i, "AreaBurner", "CollideCoalInBurner", true, 1);
SetPropEffectActive("coal_"+i, false, false);
}

//---- INTERACT CALLBACKS ----//
for(int i=1;i<=3;i++) for(int j=1;j<=3;j++)
AddUseItemCallback("guiding_rod0"+i+"0"+j, "guiding_rod0"+i, "ra0"+j, "UseRod", false);
}

void AttachWheel(string &in asArea, string &in asBody)
{
AddTimer(asArea, 0.5f, "TimerWheel");

AddLocalVarInt("WheelOK", 1);
AddLocalVarInt(asArea, 1); //asChild in CollideWrongWheel, to not display message as spoke is taken

//DO PARTICLE
SetLocalVarString("WheelSound", asBody);
PlaySoundAtEntity(GetLocalVarString("WheelSound"), "scrape_metal.snt", asArea, 0.1f, false);
PlaySoundAtEntity(GetLocalVarString("WheelSound"), "13_attach_wheel.snt", asArea, 0.2f, false);

AddDebugMessage("Attach "+asArea+"_dyn", false);

SetEntityActive("AreaSpokes", false); //Turns off the missing spokes message.
}
void TimerWheel(string &in asTimer)
{
StopSound(GetLocalVarString("WheelSound"), 0.5f);

SetEntityActive(asTimer+"_dyn", false);
SetEntityActive(asTimer+"_mounted", true);
}
/*Message that it is not the correct spoke for the wheel
*/
void CollideWrongWheel(string &in asParent, string &in asChild, int alState)
{
if(GetLocalVarInt(asChild) != 1){
SetMessage("Ch01Level13", "WheelNoFit", 0);

PlaySoundAtEntity("clank", "impact_metal_low", asChild, 0.05f, false);
}
}

how to post images please tell me?
(This post was last modified: 07-17-2017, 05:58 PM by masanoffi.)
07-17-2017, 05:39 PM
Find


Messages In This Thread
cogwheel/elevatormachine - by masanoffi - 07-16-2017, 08:16 PM
RE: cogwheel/elevatormachine - by Mudbill - 07-17-2017, 02:46 AM
RE: cogwheel/elevatormachine - by masanoffi - 07-17-2017, 05:39 PM
RE: cogwheel/elevatormachine - by Mudbill - 07-17-2017, 07:23 PM
images - by masanoffi - 07-18-2017, 05:56 PM
RE: cogwheel/elevatormachine - by Mudbill - 07-18-2017, 10:37 PM
RE: problem with machine room - by masanoffi - 07-25-2017, 08:26 PM
RE: cogwheel/elevatormachine - by Mudbill - 07-26-2017, 09:25 AM
RE: cogwheel/elevatormachine - by masanoffi - 07-26-2017, 06:55 PM
RE: cogwheel/elevatormachine - by Mudbill - 07-27-2017, 09:37 AM
RE: cogwheel/elevatormachine - by masanoffi - 07-27-2017, 07:50 PM
RE: cogwheel/elevatormachine - by Mudbill - 07-28-2017, 06:19 PM
RE: cogwheel/elevatormachine - by masanoffi - 08-05-2017, 11:06 AM
RE: cogwheel/elevatormachine - by Mudbill - 08-05-2017, 09:01 PM



Users browsing this thread: 2 Guest(s)