![]() ![]() ![]() I assume that the bool IsCountingDown under the fields there is something that I can use like a boolean variable. They are quite similar, but there are some subtle differences. I'm more used to java than I am used to C#. GetActionWithName("DecreaseOverride").Apply(mainThrusters ) //////// Decrease the thrust after the timer is done counting.įor (int i = 0 i < mainThrusters.Count i++) GetActionWithName("IncreaseOverride").Apply(mainThrusters ) ///////// Increase the thrust of the thrusters while the timer is counting down.įor(int i = 0 i < mainThrusters.Count i++) ITerminalAction startTimer = timer.GetActionWithName("Start") Var timer = GridTerminalSystem.GetBlockWithName("Timer Block") List mainThrusters = group.BlocksVar list = GridTerminalSystem.BlockGroups ////////// Put the main thrusters into a list by grouping. Here is my code (the part that i'm having trouble with is bolded and underlined): In this case, the thrusters will use the DecreaseOverride method after the timer has finished counting. Now, I'm trying to sort of link the action of overriding the accelleration with a timer block. I think once I get this figured out, I can maybe sort of figure out the rest. Is there perhaps a way to make a sepearte list for just those two thrusters? Or perhaps a way to assign those two thrusters to a specific index within the list? ITerminalAction increaseThrust = mainThrusters.GetActionWithName("IncreaseOverride") GridTerminalSystem.GetBlocksOfType(mainThrusters) įor(int i = 0 i < increaseCount i++) List mainThrusters = new List()I got the thrust to override for a single thruster at the index of the list of thrusters, which is cool, but not exactly what I was looking for. Would anyone mind helping me out with this? My programming experience is extremely limited. These two thrusters are the forward thrusters of my ship. Usually my bases have a "computer core" of around 8 or 10 timer blocks which operate the main airlock or hangar-door system, but I've been slowly replacing those with Programmable blocks for efficiency reasons.I'm trying to increase the override for 2 of the 8 of my thrusters on my ship. This also helps lock the doors and prevent accidental decompression. ![]() You can disable or enable things like doors to lock them, so I've commonly set up my airlock systems more efficiently by telling the timers to open and close both doors at the same time and simply switching which one is Enabled. I'd toggle between those two depending on the vents, so both would attempt to trigger at the same point and only one would actually do so. Essentially I had a timer with 0 time which would open it immediately, and another timer with the full time to wait for the pressurisation. So I used the vents in the hangar to tell me whether or not I needed to wait before opening the outer door. If the hangar was pressurised, I didn't want to wait the full 3 seconds for the airlock to be certain everything was pressurised. Essentially if the main hangar doors were open, the airlock from the base into the hangar needed to cycle fully. One system I was quite proud of was an airlock system designed to play nicely with a pressurised hangar bay. You can use vents to disable and enable parts of a mechanism and create intelligent airlock systems. You can tell a timer to trigger itself as one of its own actions and it will loop endlessly. all I do is set the time delay to 0 and it's now a multi-button. I use them to group dissimilar actions together and trigger them simultaneously. Generally you need more than one to get the good stuff happening. You can do a hell of a lot of clever things with timer-blocks. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |