HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Sniper Shot Trigger

08-17-2004, 05:05 AM#1
Aelita Lyoko
I am making a Snipers map when i am not working on my Hero Arena. The problem comes in here.

I made an item that allows the "sniper" to shoot further than the Sniper Shot spell will go. The trigger pauses the sniper that is using the item for 3 seconds for aiming, then the shot is taken. The amount of mana each sniper has is considered its "ammo". What i want to do is trigger it so that the item uses up all the mana of the sniper. However, if mana is low, or not full, there is a damage reduction. Like, the sniper has 4/10 mana. So, that would mean that the damage reduction of the shot would be 60%. This is the table of the how the damage/mana goes:

10% mana = 50 damage
20% mana = 60 damage
30% mana = 70 damage
and so on...
100% mana = 150 damage

If someone could help me with this trigger, i would greatly appreciate it (positive reputation points will be in order as well).
08-17-2004, 06:52 AM#2
MightyScourge
I would suggest waiting for the 1.17 patch to come out. It will have a new trigger action, Damage Unit, which would make everything super-duper-uber-ultra-easy. When the ability is used, catch wit with a "Unit begins casting an ability event". Check to make sure it's the right ability ("sniper shot" or whatever), then refer to the casting unit for the mana count (current mana of unit, it will be a real value). Store it to a variable, reduce the casting unit's mana to zero, and damage the "target of an ability" unit by the same amount of mana as the sniper had (with the mana amount shifted to your scale, looks like multiply by ten and add 40). Or you could not use a variable and plug a bunch of functions into each other, which is always fun.

Damage (target of casting ability) with (((mana of casting unit) * 10.00) + 40.00)
Reduce mana of (casting unit) to 0.00
08-17-2004, 08:53 AM#3
Aelita Lyoko
Well, it is not an ability being casted. It is an item being used event.

Right now, i need to go to bed. It is a quarter to 4 A.M. here, and i need to get up at 10 so i can go out for my final hour of driving so i can get my license.

However, plugging about 100 different conditions and 200 actions will be fun. Make ms look like i know what i am doing, when i don't. ;)

EDIT: Well, i found out how to damage a unit with trigger. I just used the set life action and i used a negitive integer. So, all is good. I won't need to wait till 1.17, i hope. ^_^
08-18-2004, 12:16 AM#4
Gurrgel
Quote:
Originally Posted by Aelita Lyoko
EDIT: Well, i found out how to damage a unit with trigger. I just used the set life action and i used a negitive integer. So, all is good. I won't need to wait till 1.17, i hope. ^_^

That works, however, you won't be given any experience or bounty for a kill with this trigger, that thing will be solved by the new 1.17 trigger.