- Joined
- May 11, 2010
- Messages
- 278
I know how to do MUI hashtable set-ups with data relating to a specific unit. How can i do something similar with arrays?
Basically, I'm planning to create a spell system that reads a number of data entries (like damage, range, impact delay etc.) specified in a trigger. It then takes this data and checks if the target is in range, applies damage etc.
As I said, i know how to link this data to a unit and create a system using hashtables, but I'd like to use arrays instead (for faster execution, and learning purposes). And it needs to be MUI. It also needs to be able to handle multiple spell casts started before the end of the previous spell.
If it's really stupid to do this using arrays, I'll use hashtables instead. Any constructive criticism of what i'm planning is welcome.
Basically, I'm planning to create a spell system that reads a number of data entries (like damage, range, impact delay etc.) specified in a trigger. It then takes this data and checks if the target is in range, applies damage etc.
As I said, i know how to link this data to a unit and create a system using hashtables, but I'd like to use arrays instead (for faster execution, and learning purposes). And it needs to be MUI. It also needs to be able to handle multiple spell casts started before the end of the previous spell.
If it's really stupid to do this using arrays, I'll use hashtables instead. Any constructive criticism of what i'm planning is welcome.
-
Actions
- Events
- Conditions
-
Actions
- Set Damage = 0.00
- -------- The damage the attack will deal. --------
- Set Range = MeleeRange
- -------- How far away the target can be and still be hit. --------
- Set ProjectileAbility = False
- -------- Set to true if the ability fires a projectile. --------
- Set PoiseDamage = 0
- -------- How much the enemy's poise will be reduced. When enemy poise reaches 0, the enemy will be stunned. --------
- Set Animation = attack
- -------- The animation the caster will play. --------
- Set DamageDelay = 0.50
- -------- The delay before damage is applied. --------
- -------- If this is set to 0, it will deal damage the instant the ability is activated. --------
- -------- Try to match this with the impact of the animation. --------
- Set Target = TargetofPlayer[(Player number of (Owner of (Triggering unit)))]
- -------- The target the attack will be aimed at. --------
- Set Caster = (Triggering unit)
- -------- The unit that casts the ability. --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ProjectileAbility Equal to False
-
Then - Actions
- Trigger - Run MeleeAbility <gen> (ignoring conditions)
-
Else - Actions
- Trigger - Run ProjectileAbility <gen> (ignoring conditions)
-
If - Conditions
- -------- Runs the triggers. Don't touch this. --------
- -------- Does the ability have any extra effects? --------
- -------- Add a "Run trigger" for a trigger with those effects here. --------