armory/blender/arm/logicnode/event/LN_on_timer.py
Moritz Brückner 96aa0ee890 Use custom sockets for default data types
This allows to listen for socket updates for the live patch system
2021-07-10 21:46:44 +02:00

18 lines
604 B
Python

from arm.logicnode.arm_nodes import *
class OnTimerNode(ArmLogicTreeNode):
"""Activates the output when a given time elapsed (optionally repeating the timer).
@input Duration: the time in seconds after which to activate the output
@input Repeat: whether to repeat the timer"""
bl_idname = 'LNOnTimerNode'
bl_label = 'On Timer'
arm_version = 1
def init(self, context):
super(OnTimerNode, self).init(context)
self.add_input('ArmFloatSocket', 'Duration')
self.add_input('ArmBoolSocket', 'Repeat')
self.add_output('ArmNodeSocketAction', 'Out')