Member
Join Date: May 2014
Posts: 33
|
I have an ability that adds flight for a certain amount of time to a character. I have a pick for the ability and I have it so it can change the character's speed, however this is ground speed I'm pretty sure. What's the best way to add flight while an ability is active and change the Flight speed for a character to a certain amount?
|
#1 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
Give it an activation ("Activation Information" in the editor, check the first box), and if the abilActive field is active, apply a Value tag to the xFly pick.
|
#2 |
Member
Join Date: May 2014
Posts: 33
|
Here's what I have. It compiles fine (no errors), and it's based off the code for adjust speed, however it doesn't seem to add anything..
doneif (tagis[Helper.Disable] <> 0) doneif (field[abilActive].value = 0) hero.child[xFly].field[Bonus].value = 60 |
#3 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
Quote:
First, when you post code, you should post what phase and priority you are running it at. Second, the Bonus field isn't the right field for this. Try adding to abValue field instead. Third, be careful with setting things = to a static number. It overwrites anything which comes before, so if something else would give a higher value it will be lowered to 60. It's almost always better to add to a field value, or to do a maximum so that the highest value is preserved. |
|
#4 |
Member
Join Date: May 2014
Posts: 33
|
Ok perfect, I'm making progress! This is set to the "Post-Attributes" phase (Priority 100). I've changed the code to this:
doneif (tagis[Helper.Disable] <> 0) doneif (field[abilActive].value = 0) hero.child[xFly].field[abValue].value += 60 Now I am showing Flight (60 feet) in my specials. Is there any way to get this to show Speed: 30 / Flight (60 feet) under the Basics portion of the In Game? If not, that's ok, because it's showing correctly in Specials when the ability is activated. |
#5 |
Member
Join Date: May 2014
Posts: 33
|
Double posted, sorry
|
#6 |
|
|