|
myddrun Wanderer
Joined: 31 Mar 2005 Posts: 58
|
Posted: Mon Oct 24, 2011 12:29 pm
How to intercept/modify a multi state trigger? |
I have a shape shifting character who can't cast spells while morphed so I have a 3 part multi state trigger that when my defence spells drop it will do the work for me.
alias mbp {morph black panther;#var set currentform "black panther"} etc
Spell expires message -> Action : morphs me to normal
2nd trigger message received -> Action : casts defence spell
3rd trigger message received -> Action : morph @currentform
The problem is that if I'm already in my normal mode it fails, obviously because it wont seen the morph to normal trigger patern as I can't morph to a form I already am. And if I'm in normal mode I dont want to be morphed automatically in step 3. Essentially I need to skip 1 & 3 if i'm not morphed.
The easiest way I suppose would be to have 2 triggers classes which are switched on and off or vice versa depending, but can I get away with just the 1? |
|
|
|
myddrun Wanderer
Joined: 31 Mar 2005 Posts: 58
|
Posted: Mon Oct 24, 2011 6:24 pm |
Code: |
#TRIGGER {Your bark-like armour flakes off } {morph normal}
#COND {{You transform into an elf.|You are already as normal}} {cast barkskin me}
#COND {thick layer of barkskin} {morph @currentform}
|
This is what I currently have. Not ideal as the first cond will always fire as will the second. |
|
|
|
myddrun Wanderer
Joined: 31 Mar 2005 Posts: 58
|
Posted: Mon Nov 07, 2011 11:24 am |
I think I'm going to break this down and use a variable for the next spell to be cast simply because I want to add in a manual cast for healing which again I can't do in animal form.
#Alias bl {morph normal;#var nextspell {breath of life}}
#TRIGGER {Your bark-like armour flakes off } {morph normal;#var nextspell {barkskin}}
#TRIGGER {{You transform into an elf.|You are already as normal}} {cast @nextspell}
Then to morph back I'll have a trigger for each defence/heal I cast.
#TRIGGER {thick layer of barkskin} {morph @currentform} |
|
|
|
|
|