Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Gametee


Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Request cogwheel/elevatormachine
Author Message
masanoffi Offline
Junior Member

Posts: 3
Joined: Jul 2017
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Mudbill Offline
Posting Freak

Posts: 3,492
Joined: Apr 2013
Reputation: 166
Post: #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 all posts by this user Quote this message in a reply
masanoffi Offline
Junior Member

Posts: 3
Joined: Jul 2017
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Mudbill Offline
Posting Freak

Posts: 3,492
Joined: Apr 2013
Reputation: 166
Post: #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 all posts by this user Quote this message in a reply
masanoffi Offline
Junior Member

Posts: 3
Joined: Jul 2017
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Mudbill Offline
Posting Freak

Posts: 3,492
Joined: Apr 2013
Reputation: 166
Post: #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 all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)