1 -- if not r2.Actions then r2.Actions={} end
4 r2
._obsolete_Actions_createActionWithCondition
= function(name
, conditions
, actions
)
6 assert(type(conditions
) == "table")
12 local k
, condition
= next(conditions
, nil)
14 local condition_if
= r2
.newComponent("RtNpcEventHandlerAction")
15 condition_if
.Action
= "condition_if"
16 condition_if
.Parameters
= condition
17 if (previous
) then table.insert(previous
, condition_if
) end
18 if (first
== nil) then first
= condition_if
end
19 previous
= condition_if
.Children
20 k
, condition
= next(conditions
, k
)
24 local multi_actions
= r2
.newComponent("RtNpcEventHandlerAction")
25 multi_actions
.Action
= "multi_actions"
26 multi_actions
.Parameters
= ""
27 multi_actions
.Children
= actions
29 if (previous
) then table.insert(previous
, multi_actions
) end
30 if (first
== nil) then first
= multi_actions
end
33 -- table.insert(multi_actions.Children, actions)
40 --debugInfo("actions ok!!")