Hey guys! I'm about to implement an aim ability, and I was wondering what you guys thought the best approach was.
I'm more of a trigger person, and I think I can accomplish this with triggers, but usually if something can be done in the data editor, it should (because it just seems more... clean and native), so here I am, asking if it can be done with data.
My unit will have an "aim" ability:
1. He clicks on the "aim" button, which will be in the command card. At this point, his weapon is disabled so he doesn't automatically attack enemies who are near.
2. He clicks on the unit he's aiming at.
3. His vision immediately is reduced a bit, to represent him focusing and not being alert to anything else.
4. The longer he waits, the more his vision is reduced, slowly. The enemy will always have a tiny circle of vision around him, so we can see it even if the range is reduced to what would normally not reveal him.
5. When he hits the "aim" button again, his gun will shoot the enemy, causing regular damage plus a lot extra. The longer he waited while aiming, the more damage it does. His vision goes back to normal.
Anyone have any idea how to do any of this in data?
Varying amounts of damage through data is pretty easy.
Just make a behavior like say... fungal growth. Set the Stats - Period to something short and often like .2 or .5 and then modify the Stats - Maximum Stack Count to something like 100, then make an effect that does damage based on how many stacks of the behavior are on the unit and set it as the Effect - Expire Effect, not the Effect - Periodic. Instant varying damage data win.
Edit: Oh and if you wanna cancel it early, use Effect - Final, not the Expire one.
Hey guys! I'm about to implement an aim ability, and I was wondering what you guys thought the best approach was.
I'm more of a trigger person, and I think I can accomplish this with triggers, but usually if something can be done in the data editor, it should (because it just seems more... clean and native), so here I am, asking if it can be done with data.
My unit will have an "aim" ability:
1. He clicks on the "aim" button, which will be in the command card. At this point, his weapon is disabled so he doesn't automatically attack enemies who are near.
2. He clicks on the unit he's aiming at.
3. His vision immediately is reduced a bit, to represent him focusing and not being alert to anything else.
4. The longer he waits, the more his vision is reduced, slowly. The enemy will always have a tiny circle of vision around him, so we can see it even if the range is reduced to what would normally not reveal him.
5. When he hits the "aim" button again, his gun will shoot the enemy, causing regular damage plus a lot extra. The longer he waited while aiming, the more damage it does. His vision goes back to normal.
Anyone have any idea how to do any of this in data?
Thanks!
- Verdagon
@Verdagon: Go
in my exp, varying amounts of damage are a butt to do through data. The best way to approach this would probably be:
1. When focus is used, apply a stacking behav to the target that decreases vision.
2. Change your button to focus2 (the next part of your ability)
3. When you use focus2, remove all stacks of focus and do damage based on how many stacks were on the target (this may have to be done with triggers.)
4. Change button back to focus.
@AnOddRadish: Go
Varying amounts of damage through data is pretty easy.
Just make a behavior like say... fungal growth. Set the Stats - Period to something short and often like .2 or .5 and then modify the Stats - Maximum Stack Count to something like 100, then make an effect that does damage based on how many stacks of the behavior are on the unit and set it as the Effect - Expire Effect, not the Effect - Periodic. Instant varying damage data win.
Edit: Oh and if you wanna cancel it early, use Effect - Final, not the Expire one.
Wow, never thought of that. This probably ended up helping me more than verdagon.