elif self.msgtype == 0x024B:
self.data = plEventCallbackMsg(self)
<?xml version="1.0" encoding="utf-8"?>
<plResponderModifier>
<plKey Name="SluiceOpen" Type="plResponderModifier" Location="1071;0" LocFlag="0x0000" />
<SynchParams flags="0x00000010">
<ExcludePersistentStates>Responder </ExcludePersistentStates>
<VolatileStates></VolatileStates>
</SynchParams>
<ModFlags>
<hsBitVector></hsBitVector>
</ModFlags>
<ResponderModParams CurState="0" Enabled="True" Flags="1" />
<States>
<plResponderState NumCallbacks="0" SwitchToState="1">
<Commands>
<Command>
<plEnableMsg>
<Sender>
<plKey Name="SluiceOpen" Type="plResponderModifier" Location="1071;0" LocFlag="0x0000" />
</Sender>
<Receivers>
<plKey Name="PowerBox1" Type="plLogicModifier" Location="1071;0" LocFlag="0x0000" />
</Receivers>
<MessageParams TimeStamp="0" BCastFlags="0x00000800" />
<Command>
<hsBitVector>kDisable </hsBitVector>
</Command>
<Types>
<hsBitVector></hsBitVector>
</Types>
</plEnableMsg>
<WaitOn value="-1" />
</Command>
<Command>
<plOneShotMsg>
<Sender>
<plKey Name="SluiceOpen" Type="plResponderModifier" Location="1071;0" LocFlag="0x0000" />
</Sender>
<Receivers>
<plKey Name="PowerBox1LeverDown" Type="plOneShotMod" Location="1071;0" LocFlag="0x0000" />
</Receivers>
<MessageParams TimeStamp="0" BCastFlags="0x00000800" />
<plOneShotCallbacks>
<Callback Marker="LeverDown" User="0">
<plKey Name="SluiceOpen" Type="plResponderModifier" Location="1071;0" LocFlag="0x0000" />
</Callback>
</plOneShotCallbacks>
</plOneShotMsg>
<WaitOn value="-1" />
</Command>
<Command>
<plAnimCmdMsg>
<Sender>
<plKey Name="SluiceOpen" Type="plResponderModifier" Location="1071;0" LocFlag="0x0000" />
</Sender>
<Receivers>
<plKey Name="SluiceBoxSwitchHandle" Type="plAGMasterMod" Location="1071;0" LocFlag="0x0000" />
</Receivers>
<MessageParams TimeStamp="0" BCastFlags="0x00000800" />
<Callbacks>
<plEventCallbackMsg>
<Sender>
<plKey NULL="True" />
</Sender>
<Receivers>
<plKey Name="SluiceOpen" Type="plResponderModifier" Location="1071;0" LocFlag="0x0000" />
</Receivers>
<MessageParams TimeStamp="0" BCastFlags="0x00000800" />
<EventCallback EventTime="0" Event="1" Index="0" Repeats="0" User="1" />
</plEventCallbackMsg>
</Callbacks>
<Command>
<hsBitVector>kContinue kSetForwards kAddCallbacks </hsBitVector>
</Command>
<AnimParams Begin="0" End="0" LoopBegin="0" LoopEnd="0" Speed="0" SpeedChangeRate="0" Time="0" />
<Anims AnimName="HandleDown" LoopName="" />
</plAnimCmdMsg>
<WaitOn value="0" />
</Command>
<Command>
<plAnimCmdMsg>
<Sender>
<plKey Name="SluiceOpen" Type="plResponderModifier" Location="1071;0" LocFlag="0x0000" />
</Sender>
<Receivers>
<plKey Name="MainSluice" Type="plAGMasterMod" Location="1071;0" LocFlag="0x0000" />
</Receivers>
<MessageParams TimeStamp="0" BCastFlags="0x00000800" />
<Callbacks>
</Callbacks>
<Command>
<hsBitVector>kContinue kSetForwards </hsBitVector>
</Command>
<AnimParams Begin="0" End="0" LoopBegin="0" LoopEnd="0" Speed="0" SpeedChangeRate="0" Time="0" />
<Anims AnimName="SluiceOpen" LoopName="" />
</plAnimCmdMsg>
<WaitOn value="1" />
</Command>
<Command>
<plAnimCmdMsg>
<Sender>
<plKey Name="SluiceOpen" Type="plResponderModifier" Location="1071;0" LocFlag="0x0000" />
</Sender>
<Receivers>
<plKey Name="SluiceGear1" Type="plAGMasterMod" Location="1071;0" LocFlag="0x0000" />
</Receivers>
<MessageParams TimeStamp="0" BCastFlags="0x00000800" />
<Callbacks>
</Callbacks>
<Command>
<hsBitVector>kContinue kSetForwards </hsBitVector>
</Command>
<AnimParams Begin="0" End="0" LoopBegin="0" LoopEnd="0" Speed="0" SpeedChangeRate="0" Time="0" />
<Anims AnimName="GearOpen1" LoopName="" />
</plAnimCmdMsg>
<WaitOn value="-1" />
</Command>
<Command>
<plAnimCmdMsg>
<Sender>
<plKey Name="SluiceOpen" Type="plResponderModifier" Location="1071;0" LocFlag="0x0000" />
</Sender>
<Receivers>
<plKey Name="SluiceGear2" Type="plAGMasterMod" Location="1071;0" LocFlag="0x0000" />
</Receivers>
<MessageParams TimeStamp="0" BCastFlags="0x00000800" />
<Callbacks>
</Callbacks>
<Command>
<hsBitVector>kContinue kSetForwards </hsBitVector>
</Command>
<AnimParams Begin="0" End="0" LoopBegin="0" LoopEnd="0" Speed="0" SpeedChangeRate="0" Time="0" />
<Anims AnimName="GearOpen2" LoopName="" />
</plAnimCmdMsg>
<WaitOn value="-1" />
</Command>
<Command>
<plEnableMsg>
<Sender>
<plKey Name="SluiceOpen" Type="plResponderModifier" Location="1071;0" LocFlag="0x0000" />
</Sender>
<Receivers>
<plKey Name="ResSluiceWater" Type="plSceneObject" Location="1071;0" LocFlag="0x0000" />
</Receivers>
<MessageParams TimeStamp="0" BCastFlags="0x00000800" />
<Command>
<hsBitVector>kEnable kDrawable </hsBitVector>
</Command>
<Types>
<hsBitVector></hsBitVector>
</Types>
</plEnableMsg>
<WaitOn value="-1" />
</Command>
<Command>
<plEnableMsg>
<Sender>
<plKey Name="SluiceOpen" Type="plResponderModifier" Location="1071;0" LocFlag="0x0000" />
</Sender>
<Receivers>
<plKey Name="PowerBox1" Type="plLogicModifier" Location="1071;0" LocFlag="0x0000" />
</Receivers>
<MessageParams TimeStamp="0" BCastFlags="0x00000800" />
<Command>
<hsBitVector>kEnable </hsBitVector>
</Command>
<Types>
<hsBitVector></hsBitVector>
</Types>
</plEnableMsg>
<WaitOn value="-1" />
</Command>
</Commands>
<WaitToCmdTable>
<Item Wait="0" Cmd="0" />
<Item Wait="1" Cmd="1" />
</WaitToCmdTable>
</plResponderState>
</States>
</plResponderModifier>
MainSluice:
logic:
actions:
- type: responder
name: SluiceOpen
responder:
states:
- cmds:
- type: enablemsg
params:
receivers:
- logicmod:PowerBox1
cmds:
- disable
waiton: -1
- type: oneshotmsg
params:
receivers:
- oneshotmod:PowerBox1LeverDown
callbacks:
- marker: LeverDown
receiver: respondermod:SluiceOpen
user: 0
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:SluiceBoxSwitchHandle
animname: HandleDown
callbacks:
- type: eventcallbackmsg
params:
receivers:
- respondermod:SluiceOpen
user: 1
event: 1
cmds:
- addcallbacks
- setforewards
- continue
waiton: 0
- type: animcmdmsg
params:
receivers:
- 006D:MainSluice
animname: SluiceOpen
cmds:
- setforewards
- continue
waiton: 1
- type: animcmdmsg
params:
receivers:
- 006D:SluiceGear1
animname: GearOpen1
cmds:
- setforewards
- continue
waiton: -1
- type: animcmdmsg
params:
receivers:
- 006D:SluiceGear2
animname: GearOpen2
cmds:
- setforewards
- continue
waiton: -1
- type: enablemsg
params:
receivers:
- scnobj:ResSluiceWater
cmds:
- drawable
- enable
waiton: -1
- type: enablemsg
params:
receivers:
- logicmod:PowerBox1
cmds:
- enable
waiton: -1
nextstate: 1
waittocmd:
- key: 0
msg: 0
- key: 1
msg: 1
curstate: 0
flags:
- detecttrigger
Jojon wrote:EDIT:
Ok, one (layman-, I'll point out) late night report, before I go to bed: It would seem that one can not pick arbitrary event numbers; you begin with 0 and go upwards. If you have (both event & user) 0, 1, 2, 4, 5 & 6, only the first three will be added to the command list - the rest will be skipped, because no event no.3 was spotted. This is per command, so for the next state we have to begin at 0 again, which causes a conflict, since the event numbers appear to be common to all commands in the responder. I assume there is some way to somehow limit the receiver of the callback to the same state it was sent from within -- maybe the "user" or "index" element have something to do with that, maybe even "NumCallbacks", I wouldn't know...
D'Lanor wrote:... head spins.
D'Lanor wrote:Anyway, to work around that limitation: do you really need multiple states within one responder? Can the same be done by adding a second responder?
(Note: doing this with a second responder will make it easier to hook things up later using the global Python scripts that exist for saving SDL states)
Users browsing this forum: No registered users and 7 guests