Jump to content
Sign in to follow this  
B.Johnson

Multiple switch positions for same action in building.

Recommended Posts

I am trying to make multiple locations in a building control the sam door or action.

For instance here i have a car lift. I am trying to make 2 separate switches to control the lift.

class Openlift1

{

displayName = "Lift";

position = "lift1switch","lift2switch";

radius = 2;

onlyforplayer = 0;

condition = "this animationPhase ""lift1"" < 0.5";

statement = "this animate [""lift1"",1]; this say ""lift""";

};

class Closelift1

{

displayName = "Lower lift";

position = "lift1switch","lift2switch";

radius = 2;

onlyforplayer = 0;

condition = "this animationPhase ""lift1"" >= 0.5";

statement = "this animate [""lift1"",0]; this say ""liftdrop""; this setDammage 0";

};

Share this post


Link to post
Share on other sites

Does listing two positions like that not work? If not, you can always just make 4 classes instead of 2. Inefficient maybe but it works.

Share this post


Link to post
Share on other sites

Config value position isn't meant to be an array (which it should be if this should work) but you can use inheritance to save some typing:

class Openlift1 {
displayName = "Lift";
position = "lift1switch";
radius = 2;
onlyforplayer = 0;
condition = "this animationPhase ""lift1"" < 0.5";
statement = "this animate [""lift1"",1]; this say ""lift""";
};
class Openlift2: Openlift1 {
position = "lift2switch";
};
class Openlift3: Openlift1 {
position = "lift3switch";
};

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×