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
#1
cogwheel/elevatormachine

Hi
in my map, i have a elevator machine which put elevator working.
That needs 3 cogwheels, but cogwheel mounted 2 not working it dosen,t stick on the machine please help i wanted the machine working and my custom story ready for release.Big Grin
07-16-2017, 08:16 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: cogwheel/elevatormachine

Could you post some screenshots from your level and the script you tried? Remember that you need to use Sticky Areas to attach a cogwheel to the machine.

07-17-2017, 02:46 AM
Find
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
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#4
RE: cogwheel/elevatormachine

I would recommend an app like ShareX, but if that's too difficult:
1. Take a screenshot (you can use the PrintScreen key, paste it in Paint and save it).
2. Go to https://imgur.com and drop the image in there (you can drag it from a folder into the window).
3. Copy the link you get to your image and put it here.

(This post was last modified: 07-17-2017, 07:24 PM by Mudbill.)
07-17-2017, 07:23 PM
Find
masanoffi Offline
Junior Member

Posts: 7
Threads: 1
Joined: Jul 2017
Reputation: 0
#5
images

okay i will do that

http://imgur.com/a/qmWTv

http://imgur.com/a/5yUmR


http://imgur.com/a/b64iZ

are these images and script okay?
(This post was last modified: 07-18-2017, 06:01 PM by masanoffi.)
07-18-2017, 05:56 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#6
RE: cogwheel/elevatormachine

It's usually a good idea to get as much information into the images as possible, like entity names and other objects nearby. It looks like you based this scene off the original in the Machine Room? Did you add to the Sticky Area the name of the entity you want to attach?

07-18-2017, 10:37 PM
Find
masanoffi Offline
Junior Member

Posts: 7
Threads: 1
Joined: Jul 2017
Reputation: 0
#7
RE: problem with machine room

it worked the machine work now but more question to mudbil sorry i want the puzzle lever machine fork own puzzle how to chance and what i chance in script
07-25-2017, 08:26 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#8
RE: cogwheel/elevatormachine

I'm not 100% sure what you're asking, but you want to use the lever for another puzzle somewhere else?

Perhaps this will help you.




07-26-2017, 09:25 AM
Find
masanoffi Offline
Junior Member

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

not this, you remember in singleplayer are 5 levers called lever machine that i want to own
07-26-2017, 06:55 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#10
RE: cogwheel/elevatormachine

Oh, you mean the levers that you pull up or down to make up a total number?

That one should be very easy, and I think the video here explains it almost exactly in the last quarter.

(This post was last modified: 07-27-2017, 09:37 AM by Mudbill.)
07-27-2017, 09:37 AM
Find




Users browsing this thread: 4 Guest(s)