HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Help- Releasing stored power?

05-09-2006, 06:29 PM#1
n7r3x
Trigger:
Mind Surge Init
Collapse Events
Unit - A unit Learns a skill
Collapse Conditions
(Learned Hero Skill) Equal to Mind Surge
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Level of Mind Surge for (Learning Hero)) Equal to 1
Collapse Then - Actions
Set Caster = (Learning Hero)
Trigger - Turn on Mind Surge Loop <gen>
Unit - Add Brain Power to (Learning Hero)
Unit - Add Discharge Mind Surge to (Learning Hero)
Collapse Else - Actions
Unit - Set level of Discharge Mind Surge for (Learning Hero) to (Level of Mind Surge for (Learning Hero))

Trigger:
Mind Surge Loop
Collapse Events
Time - Every 2.00 seconds of game time
Collapse Conditions
(Level of Mind Surge for Caster) Greater than or equal to 1
(Caster is alive) Equal to True
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Level of Brain Power for Caster) Equal to 21
Collapse Then - Actions
Do nothing
Collapse Else - Actions
Unit - Set level of Brain Power for Caster to ((Level of Brain Power for Caster) + 1)

what am i trying to do is make a skill which stores up brain power. one skill to release it and one 21 levels dummy skill to keep track of the power stored L1 for 0% and 5% every next level. 100% at L21. would the above trigger work? what if the hero die or something. Any help welcomed.

p/s: show me how to release the power stored, thus reseting the level of the dummy skill
05-09-2006, 06:56 PM#2
Captain Griffen
Those would work, but for the second one get rid of the if/then/else and put the condition into the conditions of the trigger instead, using the condition Less than, rather than equal to. Not that important a change though.

How to release brain power...? Try to be more precise with what you want. Also, how many levels does Mind Surge have?
05-10-2006, 07:56 PM#3
n7r3x
Mind Surge has 4 levels. Discharge has 4 levels. the dummy skill to keep track of the power stored is 21 levels. level 1 for 0 % and level 21 for 100%.

so pratically you learn Mind Surge. but you get Discharge and Power. Power is unclickable. The level of Mind Surge is to tap the maximum Power stored and damage dealt. let's say L1 Mind Surge. you can only store til 50% Power and each 5% when Discharged only deals 50 damage. L4 enables 100% Power and each 5% deals 200 damage.

Trigger:
Mind Surge Discharge
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Discharge Mind Surge
Collapse Actions
Trigger - Turn off Mind Surge Loop <gen>
Set tempPoint = (Position of (Casting unit))
Set tempUnitGroup2 = (Units within 500.00 of tempPoint matching (((Matching unit) belongs to an enemy of (Owner of Caster)) Equal to True))
Collapse Unit Group - Pick every unit in tempUnitGroup2 and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Picked unit) is alive) Equal to True
Collapse Then - Actions
Unit - Cause Caster to damage (Picked unit), dealing ((((Real((Level of Brain Power for Caster))) - 1.00) x 0.05) x ((Real((Level of Mind Surge (real) for Caster))) x 50.00)) damage of attack type Spells and damage type Mind
Else - Actions
Unit - Set level of Brain Power for Caster to 1
Unit Group - Remove all units of tempUnitGroup2 from tempUnitGroup2
Custom script: call DestroyGroup(udg_tempUnitGroup2)
Trigger - Turn on Mind Surge Loop <gen>

is this trigger workable. and what's the possible leaks and bugs. if the caster dies all i need to do is pause/turn off mind surge loop?
05-10-2006, 08:04 PM#4
Captain Griffen
That's fine, except there is no point in turning off mind surge loop, you forget to remove the temp point (call RemoveLocation(udg_tempPoint) ), and damage type mind is none existant. Don't ask why they put it in there, as it merely uses magical damage, I think, but those extra damage types can be buggy. Better to use universal/physical/magical (ie: those that actually exist).
05-11-2006, 03:12 AM#5
n7r3x
al'rite. many thanks