Space Engineers

Space Engineers

Khjin's TickTimers
43 条留言
Khjin  [作者] 3 月 10 日 上午 1:23 
Did some fixes, hopefully this will resolve any issue you guys are having.
Sebforce116 2024 年 11 月 27 日 下午 10:55 
I think Contact's broken pistons in this script, I don't know how to describe or what specifically, but it is definitely not working as intended. But Rotors and Hinges seem to work fine still.
COSTAS Milo 2023 年 5 月 4 日 上午 11:19 
Thank you very much
thank you for your reply . and your request
This allows to see the limits of the script
= does not allow to turn "on" an off timer with a Vtimer by the program block
with custum data code
it was worth a try
Khjin  [作者] 2023 年 5 月 4 日 上午 8:19 
Sorry if I get it wrong here but I'll try. So if you have an actual timer called ActualTimer and you want to turn it On and Trigger it using a virtual timer, you can do this:

@vtimer:60 <---- creates the virtual timer with 60 ticks delay
ActualTimer,OnOff_On <---- turns on the real timer
ActualTimer,TriggerNow <---- triggers the real timer

Your example is impossible since in there, an Off vtimer is trying to turn itself on which is impossible.
COSTAS Milo 2023 年 5 月 2 日 下午 1:59 
Thank you for your answer and your script.
I would like the Program Block switch "on" the timer currently off : to activate it
And" trigger now " it
name of timer for exemple: vtimer
So i put your exemple in program data in PB
@vtimer:60
@vtimer:30:OnOff_On
@vtimer,TriggerNow

Argument PB setup = error message
So how to write correctly the data ?
just switch on the timer with Tick Timers
Thank you very much
Khjin  [作者] 2023 年 5 月 1 日 下午 5:44 
Hello @COSTAS Milo, that example is the definition only and does not contain any actions. Please refer to the Actions section to add actual actions when running the script. It is expected to do nothing since it's only defining 3 timers. Cheers.
Peekofwar 2023 年 4 月 19 日 下午 2:03 
Discovered a new problem: Whenever I dock my hovercraft with connectors, the Tick Timers program stops working right and needs to be setup again...

I have a program that turns off the hover engines and all thrusters and changes the lighting configuration when you run "ParkMode", however after docking, the program only turns off the headlights and none of the engines or thrusters turn off. After undocking, it still needs to be re-setup.

I think it's related to groups, since the headlights aren't in a group and are called directly by name by the program.
Peekofwar 2023 年 4 月 17 日 下午 7:22 
Problem: "Lock" and "Unlock" aren't working for landing gear/magnetic plates. No errors, but the mag plate isn't responding to the commands.
Gigawatts 2023 年 3 月 16 日 下午 1:20 
invalid code detected 17
invalid code detected 41
Khjin  [作者] 2023 年 1 月 1 日 上午 5:25 
Sadly it can't be supported. The property only currently works for programs that are ran on demand. As a work around, you can use real timers to run the argument by triggering them.
Amazingdeath 2022 年 12 月 22 日 下午 7:30 
Will running an argument on a different programmable block ever be supported?
Peekofwar 2022 年 4 月 15 日 下午 4:43 
Problem: Once a target is provided, the program will not allow the velocity to change until it reaches that position (even if impossible) or until the script is recompiled. Calling the AdjustToLength or RotateToAngle functions does not override the current target.

This makes halting a mechanism such as pressing an Emergency Stop, or slight mis-timings problematic.
Peekofwar 2022 年 4 月 15 日 下午 3:08 
I think the RotateToAngle needs a second argument so that I can specify the absolute velocity that it moves at.

I need to be able to tell it how fast to move, but let it decide which direction to move. If I set the velocity in the line above, it will most likely end up ramming into the ground if it's in the wrong position. If I just tell it to move to a position, then it just cranks the velocity to the extreme and has a high chance of crashing into something.

For example, allow me to specify the RPM / Velocity after the angle / position:
Hinge,RotateToAngle,90,1
Piston,AdjustToLength,2.5,1
Khjin  [作者] 2022 年 2 月 22 日 下午 5:50 
Nope, that is not supported
Barro 2022 年 2 月 22 日 上午 10:10 
Is it possible to Run an Argument on a different Programable Block with this Script?
Gigawatts 2022 年 2 月 19 日 下午 4:32 
@Таймер_1:0:OnOff_On
Таймер_3,Start
@Таймер_2:60:OnOff_On
Сдвижная дверь Вход Лево 1 Exclude #Ignore,OnOff_Off
Сдвижная дверь Вход Право 1 Exclude #Ignore,OnOff_Off
Сдвижная дверь Вход Прямо 1 Exclude #Ignore,OnOff_Off
Сдвижная дверь Вход 1 Exclude #Ignore,Open_On
@Таймер_3:60:OnOff_On
Сенсор Вход Лево 1,OnOff_Off
Сенсор Вход Право 1,OnOff_Off
Сенсор Вход Прямо 1,OnOff_Off
Сдвижная дверь Вход Лево 1 Exclude #Ignore,Open_Off
Сдвижная дверь Вход Право 1 Exclude #Ignore,Open_Off
Сдвижная дверь Вход Прямо 1 Exclude #Ignore,Open_Off
Сдвижная дверь Вход 1 Exclude #Ignore,OnOff_On
Таймер_2,Start
Gigawatts 2022 年 2 月 19 日 下午 3:56 
@Khjin Yes. He does not work
Khjin  [作者] 2022 年 2 月 17 日 上午 12:04 
@Gigawatts have you tried "Start" ?
Gigawatts 2022 年 2 月 16 日 上午 3:01 
It only comes out on instant start. And here with argument "start" does not want. I bet 60 ticks
Gigawatts 2022 年 2 月 15 日 下午 8:50 
with start argument does not work
Amazingdeath 2022 年 2 月 7 日 上午 12:09 
Thank you for the insight. They are controlled by the custom turret block and I'll try turning off the block when I get on again. Thanks for the advice and hopefully that will work!
Khjin  [作者] 2022 年 2 月 7 日 上午 12:05 
Are the rotors being controlled by a turret controller? If so they might be conflicting. Try turning the controller off before performing any action on the rotors/hinges involved before applying actions. Hope this helps.
Amazingdeath 2022 年 2 月 6 日 下午 11:13 
Could use some help. Made a ball turret out of rotors and hinges after the new update and for some reason, no matter what I name the parts, the program refuses to execute any commands for the rotor and hinge. That being said the program is opening and closing doors, retracting pistons and all the likes, it just refuses to touch these damn rotors. I've gone through everything and all the names match up and I've even tried grouping them and it try to manipulate the group but it still wont work!!! I'm ripping my hair out! (Yes I've also been recompiling the program when changes are made too!)
DontFollowOrders 2022 年 2 月 6 日 上午 3:49 
It's already been reported and acknowledged, I just figured I'd mention it anyway because even if we didn't have this problem I would still be in the same predicament, where I have a massive workload of converting timers to your script. I built them before I learned about this
Fantastic work nonetheless, thanks for making TickTimers! :steamthumbsup:
Khjin  [作者] 2022 年 2 月 5 日 下午 8:28 
It may be possible although I haven't looked at it yet but it's going to require a custom parser to do it. Better report the problem and wait for a fix so everyone would benefit. Good luck with your builds!
DontFollowOrders 2022 年 2 月 5 日 上午 9:35 
Is there any way we can go about using existing timer blocks or even the toolbar definitions for them in SANDBOX_0_0_0.sbc to generate custom data for this script? Warfare 2 broke pages 2-0 of timer toolbars, so all of my builds are stuck between a rock and a hard place. I'd like to convert my timers over to TickTimers but there are a LOT of them.
Khjin  [作者] 2022 年 1 月 18 日 下午 6:13 
Yes, if you make any changes, you would have to recompile or rerun the setup command. This is to avoid the script being heavy due to having to re-scan all blocks from time to time.

Properties would be cool to support and I plan to do so in the near future. Thanks for the suggestion :steamhappy:
Peekofwar 2022 年 1 月 18 日 上午 1:53 
Something I noticed, is that if you change the name of a light, the script will still know that light until you restart the program... I guess it uses the name to grab an ID for the light. I just thought that was interesting.
Peekofwar 2022 年 1 月 18 日 上午 1:44 
Yeah, I figured it might be because it didn't support properties. I really want to be able to set intensity though. That would potentially allow me to make lights blink more like LEDs...
Khjin  [作者] 2022 年 1 月 17 日 下午 10:08 
@Peekofwar If you want a set of blocks affected, you can just group them instead and apply the action to the group.

I'm not familiar with Lua and this script is written to be as basic as I can get it (at least for me).

Regarding the question about the light, only actions are supported by this script, not properties. Intensity is a property. I might expand on supporting properties in the future whenever I find the time and motivation to update.

Hope this helps, cheers! :steamhappy:
Peekofwar 2022 年 1 月 16 日 下午 3:23 
Does the Intensity property not work on lights?

Exterior Light S1 03,Intensity,5
Peekofwar 2022 年 1 月 16 日 下午 2:50 
This may seem silly, but I'd love to have something like this, but with Lua code instead of virtual timers, where it interprets Lua written in Custom Data.
Peekofwar 2022 年 1 月 16 日 下午 2:48 
I've noticed that it cannot handle multiple blocks with the same name. I was hoping I could name a bunch of exterior lights "Exterior Light SA-1" and "Exterior Light SA-2" and have it simply effect all lights with those names. Sadly it doesn't seem to do so, and will only effect which ever one happens to be first.
Egglanoir 2021 年 1 月 19 日 下午 5:50 
I would probably just execute a string of vtimers that fires the flares once using a timer block. Then I'd just have to start and stop the timer block that calls itself
Khjin  [作者] 2021 年 1 月 19 日 下午 4:30 
True. But I do recommend caution. Do not loop-chain trigger now actions for vtimers as it will lag and eventually cause SE to kill the PB. Otherwise, go ham! :steamhappy:
Egglanoir 2021 年 1 月 19 日 上午 7:19 
This could be very useful in creating a neverending stream of flares that distracts missiles and point defense guns.
Khjin  [作者] 2020 年 12 月 7 日 下午 6:45 
Thanks for this pro100tv! I also searched a bit and found out that 60 ticks / sec should be the correct number. :steamhappy:
pro100tv 2020 年 12 月 5 日 上午 7:45 
"100 ticks = 1 sec" I've tested a bit and I think that 60 ticks = 1 second (I needed to trigger something after 480 seconds which turned out to be ~28800 ticks instead of 48000 :steamhappy:)
Lord_Ducksworth 2020 年 12 月 4 日 下午 6:27 
Hey thanks for getting back to me! Ya i tired the run and run with default arg before reaching out. I ended up just using a couple of timer blocks to act as middle men yesterday and it works great. This script cut down my timer blocks from 20 down to 4. cheers!
Khjin  [作者] 2020 年 12 月 4 日 下午 5:37 
Hello! Unfortunately, the script doesn't have full support for the Run action in programmable blocks. You can try adding "go" in the block's default argument and running RunWithDefaultArgument instead. You can also make an actual timer block and trigger it from there.

I'll check out if I can do something about this limitation. Cheers! :steamhappy:
Lord_Ducksworth 2020 年 12 月 3 日 下午 12:50 
This is exactly what i was looking for! Thank you very much!
I am in the process of converting a rocket i have been working on from timer based to using this script! Super exciting =D

I do have one quick question for you, I have been able to setup v-timers that control basic things like tanks and landing gears with no issues. Where i am stuck is on program blocks, i cant for the life of me figure out the syntax to get this script to run another program block. For instance, during the ignition v-timer i would like to reach out and tell the auto-aligner script to start with a "go" command.

I guess my question is this: How do I have this script send a run command such as "go" to another program block?

Thanks! =D
Khjin  [作者] 2020 年 11 月 30 日 下午 10:02 
Thanks! Yes, the script supports blocks on a subgrid. Cheers!
pro100tv 2020 年 11 月 30 日 下午 3:42 
That's great idea. Wish more people appreciate this type of scripts.
One question - Is it possible to trigger action for blocks on the subgrid?