Author Topic: How to disable self relays?  (Read 374 times)

CancelEvents doesn't work when it supposed to cancel self events, for that i do
SetEventEnabled ___ _
SetEventEnabled ___ X
on the relays
but it doesn't always work
For example in bot events:
0 OnBotAttacked Bot SetAim Attacker
1 OnBotAttacked Self Firerelay
2 OnRelay Self Firerelay
3 OnRelay Self BotAttack Fireweapons
4 6000 OnBotAttacked Self SetEventEnabled 1 2 3 _
5 6500 OnBotAttacked Self SetEventEnabled 1 2 3 X
it is supposed to disable the relays, but it doesn't even disable them.
And CancelEvents doesn't work for that.

Same, what you need to do is disable it using itself but re-enable using another brick

Code: [Select]
0 OnBotAttacked Bot SetAim Attacker
1 OnBotAttacked Self Firerelay
2 OnRelay Self Firerelay
3 OnRelay Self BotAttack Fireweapons
4 6000 OnBotAttacked Self SetEventEnabled 1 2 3 _
5 6500 OnBotAttacekd NAMED_BRICK fireRelay
Code: (NAMED_BRICK) [Select]
onRelay ORINIGAL BRICK setEventEnabled