• Need to set up some complex logic- but how?
    5 replies, posted
Hey guys For a while I've been working on a map of mine, gradually adding details to it. To cut to the chase, I've set up four generator rooms with their own fusebox, and an ampere meter in each one. I want those ampere meters to show the same value in each rooms, depending on how many generators are running. Because a circuit breaker cuts all the power, I want the ampere meters in each room actually start measuring once the circuit breaker is flipped on. This would require me to send an output to check how many generators are turned on, but I'm not sure how. To go into technical details on what I have now: I split the fusebox model I use apart into two separated models so I have both the fusebox, and the meter dials individually. To move the dial I'm using multiple func_door_rotating entities with different distances. I chose this over animating in 3DS Max because I have no clue yet, and because I change plans really easily it seems to much of a hassle. [media]https://www.youtube.com/watch?v=64fy3Qy4LEk&feature=youtu.be[/media]
I think you need to look at using a math_counter and logic relay entites so if one generator is on it actives 1 func_door_rotating if 2 are on itll activate a different func_door_rotating
I'd do something like this: 1 x logic_case 1 x math_counter Math counter is added to or subtracted each time a generator is turned on / off Each time it's changed, send a getValue input to the counter after updating the value. Add an onGetValue output from the math counter, to the InValue input of your logic_case. No parameter necessary. For each case of the logic_case, use it to open each "level" of your meters. have the initial value of the case be 1, so you can have 5 cases in total. Set up in a setup that case01 closes all of your func_door_rotatings, case02 closes all but opens the first one, case03 opens the first two and closes the last two, etc. For your individual ammeters, use your circuit breaker button to lock / unlock all of the func_door_rotatings for that ammeter. On use, fire the getValue input on the math_counter. This will then test the logic_case, and open / close the corresponding doors. Hopefully that should work
One thing I need to counter though is the fact that the meter dial needs to be parented to the next func_door_rotating. How would I do that? My only guess would be to time how long it takes for each door to fully open.
I must've misunderstood what you meant. Why not have 4 func_door_rotatings parented to each other in order, with the same rotation values, such that they essentially "add up".
Simple, the problem is because the meter I use has a non-linear scale: [T]http://i.imgur.com/V09lu88.jpg[/T] To counter that I let the meter dial parent over to the next func_door_rotating in order once the door is fully opened.
Sorry, you need to Log In to post a reply to this thread.