Browse Source

Allow triggering MSBs from Responders.

pull/183/head
Adam Johnson 5 years ago
parent
commit
0c82e80e48
Signed by: Hoikas
GPG Key ID: 0B6515D6FF6F271E
  1. 28
      korman/nodes/node_messages.py

28
korman/nodes/node_messages.py

@ -831,6 +831,34 @@ class PlasmaTimerCallbackMsgNode(PlasmaMessageWithCallbacksNode, bpy.types.Node)
return msg
class PlasmaTriggerMultiStageMsgNode(PlasmaMessageNode, bpy.types.Node):
bl_category = "MSG"
bl_idname = "PlasmaTriggerMultiStageMsgNode"
bl_label = "Trigger MultiStage"
output_sockets = OrderedDict([
("satisfies", {
"text": "Trigger",
"type": "PlasmaConditionSocket",
"valid_link_nodes": "PlasmaMultiStageBehaviorNode",
"valid_link_sockets": "PlasmaConditionSocket",
"link_limit": 1,
})
])
def convert_message(self, exporter, so):
# Yeah, this is not a REAL Plasma message, but the Korman way is to try to hide these little
# low-level notifications behind higher level abstractions, so here you go. A notify message
# that only targets plMultiStageBehMod. You're welcome!
msg = self.generate_notify_msg(exporter, so, "satisfies")
# The MultiStageBehMod needs to receive the avatar key that whatdonetriggeredit. We don't know
# this information at export-time, but plResponderModifier::IContinueSending will interpret
# a collision event as "ohey, let's add the avatar key for MSBs" - nice.
msg.addEvent(proCollisionEventData())
return msg
class PlasmaFootstepSoundMsgNode(PlasmaMessageNode, bpy.types.Node):
bl_category = "MSG"
bl_idname = "PlasmaFootstepSoundMsgNode"

Loading…
Cancel
Save