HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Questions about some triggering...

11-22-2007, 07:57 PM#1
Bolm
Hello everybody!

I want to add a passive Ability, that every Unit, who got this ability, deals +50% damage from behind.
My first problem is, that I can not find the Comparison if the Unit got the Ability. (As Event I just used "General Unit is attacked")
My second problem here is, that I do not know how to add 50% of the Unit damage. (I could only find fixed numbers.)

(Sorry, if some questions are noobish, but I stopped mapping about 3 years ago. Now I played a so called RISK Map (Europe Rev3) and I am totally in creating an own Risk Map. :D)
11-23-2007, 12:09 AM#2
Pyrogasm
This might help you: Detecting a Backstab (GUI)
11-23-2007, 03:17 AM#3
TheDamien
A dummy inner fire with +50% attack damage and very low duration could be cast on the unit when it starts an attack from behind.
11-23-2007, 12:08 PM#4
Bolm
@Pyrogasm

With that one I figured out how to check for the ability. (The other stuff seems to be too complicated for me atm. I want to try it GUI first because I am a total JASS noob.)
edit
I now tried your Backstab stuff. I exactly copied your JASS stuff for the beginning and just rewrote the then-part. Anyways now every unit is buffed even if it is infront of the victim.

@TheDamien

Thanks for that idea. But I have a problem that there should be around 100 units at the same time running this trigger. (For my Risk Map and about every melee unit should have this 'backstabbing'.)

My Trigger atm:
Trigger:
Attack from Behind
Collapse Events
Unit - A unit Is attacked
Collapse Conditions
(Level of Attack from behind for (Attacking unit)) Greater than 0
(Facing of (Attacking unit)) Greater than ((Facing of (Attacked unit)) - 30.01)
(Facing of (Attacking unit)) Less than ((Facing of (Attacked unit)) + 30.01)
Collapse Actions
Unit - Create 1 Afb Buffer for (Owner of (Attacking unit)) at (Position of (Attacking unit)) facing 0.00 degrees
Set Afb_Buffer = (Last created unit)
Unit - Order Afb_Buffer to Human Priest - Inner Fire (Attacking unit)
Unit - Remove Afb_Buffer from the game
11-23-2007, 06:59 PM#5
Pyrogasm
Quote:
Originally Posted by Bolm
Trigger:
Conditions
(Facing of (Attacking unit)) Greater than ((Facing of (Attacked unit)) - 30.01)
(Facing of (Attacking unit)) Less than ((Facing of (Attacked unit)) + 30.01)
Does the tutorial say to detect the angles like that? No. Use the script I provided there and the way to check the angles that it says to use.
11-26-2007, 07:23 AM#6
Bolm
Well, Pyrogasm.

I disabled my trigger and exactly copied your trigger stuff. But then my Footmen (Dummy Unit) were buffed no matter if they stood in front of their enemy or not.
Now I use my own GUI Trigger because it seems to work flawless and with lots of units attacking at the same time. (and they are all being buffed of course)
11-26-2007, 07:26 AM#7
Tide-Arc Ephemera
Quote:
Originally Posted by Bolm
(The other stuff seems to be too complicated for me atm. I want to try it GUI first because I am a total JASS noob.)

Biiiiggg mistake... I learned GUI and now I'm stuck with incompetent triggers.
11-26-2007, 12:51 PM#8
Bolm
Perhaps it is. But atm I am contend with the GUI solution. ;)
(( Or is this one leaking or having any problems I am not aware of? ))