HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Spell Help - Corspe Explosion

02-20-2004, 01:10 AM#31
Shimrra
Alright, seems I missed something small... When it picks the unit to explode (the dead one) set it to a unit variable. Then try this: Unit Group - Pick every unit in (Units within 400.00 of (Target point of ability being cast)) and do (Unit - Set life of (Picked unit) to ((Current Life of Picked Unit - (Integer x (Maximum life of <UnittoExplode>))
02-20-2004, 01:12 AM#32
pappi.chullo
wat is the <unittoexplode>?
02-20-2004, 01:17 AM#33
Shimrra
It's the unit that is randomly selected from the dead ones. As I said above, make sure to set it to a variable (Unit Variable to be precise). Then use the unit variable instead of <UnittoExplode>.
02-20-2004, 01:17 AM#34
pappi.chullo
so make another variable correct?
02-20-2004, 01:18 AM#35
Shimrra
Yes. A unit variable.
02-20-2004, 01:19 AM#36
pappi.chullo
any array or value?
02-20-2004, 01:22 AM#37
Shimrra
Neither. It's not an array and it's value will be set in a trigger.
02-20-2004, 01:24 AM#38
pappi.chullo
ok so wat is integer?

it says Integer x (Maximum life of <UnittoExplode> )
02-20-2004, 01:26 AM#39
Shimrra
The integer that was set earlier. The one using the random number that was divided by 10. I think you called it CEInteger.
02-20-2004, 01:30 AM#40
pappi.chullo
ok i got that done... but i have a queston.

if the formula is 40 - 100 / 10, woudnt that be the same as 4-10?


shouldnt the 10 be replaced by a 100, so it will be .4 - 1.


or is it just my poor math skills :(
02-20-2004, 01:32 AM#41
Shimrra
I mean 40 to 100, not 40 minus 100, sorry for the misunderstanding... It selects and random from 40 - 100 for the percent. It divides by 10 to turn it into a usable integer for the health equation.
02-20-2004, 01:33 AM#42
pappi.chullo
no no no, when I put 40-100, i meant it to be 40 to 100. :)

but about wat it's divided by, it is 10 correct?
02-20-2004, 01:36 AM#43
Shimrra
Oops. It was my math that was off. Divide by one hundred. Sorry, and nice catch there! It's late and I had to write another essay for English class...
02-20-2004, 01:42 AM#44
pappi.chullo
heh

i think i have it complete. this is what the trigger is

---Events
Unit - A unit Begins casting an ability
---Conditions
(Ability being cast) Equal to Corpse Explosion
---Actions
Unit Group - Pick every unit in (Units within 400.00 of (Target point of ability being cast)) and do (If (((Picked unit) is dead) Equal to True) then do (Unit Group - Add (Picked unit) to CEgroup) else do (Do nothing))
Unit Group - Pick every unit in (Random 1 units from (Units within 400.00 of (Target point of ability being cast))) and do (Do nothing)
Set CEinteger = ((Random integer number between 40 and 100) / 100)
Unit Group - Pick every unit in (Units within 400.00 of (Target point of ability being cast)) and do (Unit - Set life of (Picked unit) to ((Percentage life of (Picked unit)) - (((Random real number between 40.00 and 100.00) / 100.00) x (Percentage life of CEunittoexplode)))%)
Unit Group - Remove all units from CEgroup

damn i tested it, and it does nothing :'(
02-20-2004, 01:47 AM#45
Shimrra
Just a minute, and I'll try to make it.