I currently working on single player RPG, and... here is simple system that I created for map.
at the moment it s very-veeeeery simple, but anyway looks cool ingame
i have only rus WE, so you may not understand half of trigger text. sorry for that.
added comments (marked as //comment) hope it gonna help u.
unit attack another unit.
event "unit get attacked" runs exactly in moment, when attack animation start playing. (i mean it run before unit get damage, or arrow of attacking unit release)
so.
you can give order to attack enemy, your unit start aiming (trigger runs) and.. you push S button. unit canceled attack, but trigger create arrow on attacked unit anyway.
this is the point. when unit take another order while he fighting, trigger will turn special variable on, and main trigger gonna stop after "wait" action
ffhhhhhhh i finished
believe me, write this is mooooar difficult that read
ok, and finally ingame screenshot
at the moment it s very-veeeeery simple, but anyway looks cool ingame
i have only rus WE, so you may not understand half of trigger text. sorry for that.
added comments (marked as //comment) hope it gonna help u.
-
impact
-

События
-


Боевая единица - A unit Атакован
-


// event starts when any unit gets attacked
-
-

Условия
-


(Attacking unit) равно Raider 0002 <gen>
-


//unit type check - is unit get attacked by bow, or not//
-
-

Действия
-


Триггер - Turn on skip <gen>
-


//skip trigger very important. gonna show him later
-


Set skip = Нет
-


Set RANDOM = (Random integer number between 0 and 4)
-


Set distance = (Distance between (Position of (Attacked unit)) and (Position of (Attacking unit)))
-


Wait (0.40 + (distance / 4000.00)) seconds
-


//wait synhronize trigger with flying arrow. number 4000 depends on missle speed. (4000 good for 2500)
-


If (skip равно Да) then do (Skip remaining actions) else do (Do nothing)
-


//about this - later
-


Set currentattackedUNIT = (Attacked unit)
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



Если - Условия
-




(Ability being cast) равно power shot (враг)
-
-



То - Действия
-




Р˜РіСЂР° - Display to (All players) the text: (String(distance))
-
-



Р˜РЅР°С‡Рµ - Действия
-



//well, arrow can also impact when hero cast a spell\uses item and so on. to prevent this i do this: if ability been cast = ***, then skip remaning action (for each ability avaible for hero)
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





Если - Условия
-






((Facing of currentattackedUNIT) меньше или равно ((Facing of Raider 0002 <gen>) + 100.00)) and ((Facing of currentattackedUNIT) больше или равно ((Facing of Raider 0002 <gen>) - 100.00))
-
-





//you also can shoot enemies from behind. this condition check facing angle, and creates arrow on...pfffff... back of units.
-





То - Действия
-






Спецэффект - Create a special effect attached to the chest of currentattackedUNIT using Objects\Spawnmodels\Critters\Albatross\CritterBloodAlbatross.mdl
-






Спецэффект - Create a special effect attached to the chest of currentattackedUNIT using war3mapImported\IMPACTbehind.mdx
-






Skip remaining actions
-
-





Р˜РЅР°С‡Рµ - Действия
-
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





Если - Условия
-






RANDOM меньше или равно 1
-
-





То - Действия
-






//and finally arrows and blood splashes. i have 5 different arrow models (positions), 4 for..... god damnit. for fa... for NOT BEHIND, and 1 for behind.
-






Спецэффект - Create a special effect attached to the chest of currentattackedUNIT using war3mapImported\IMPACT1.mdx
-






Спецэффект - Create a special effect attached to the chest of currentattackedUNIT using Objects\Spawnmodels\Critters\Albatross\CritterBloodAlbatross.mdl
-
-





Р˜РЅР°С‡Рµ - Действия
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







Если - Условия
-








RANDOM равно 2
-
-







То - Действия
-








Спецэффект - Create a special effect attached to the chest of currentattackedUNIT using Objects\Spawnmodels\Other\HumanBloodCinematicEffect\HumanBloodCinematicEffect.mdl
-








Спецэффект - Create a special effect attached to the chest of currentattackedUNIT using Objects\Spawnmodels\Critters\Albatross\CritterBloodAlbatross.mdl
-








Спецэффект - Create a special effect attached to the chest of currentattackedUNIT using war3mapImported\IMPACT2.mdx
-
-







Р˜РЅР°С‡Рµ - Действия
-








If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-









Если - Условия
-










RANDOM равно 3
-
-









То - Действия
-










Спецэффект - Create a special effect attached to the chest of currentattackedUNIT using Objects\Spawnmodels\Critters\Albatross\CritterBloodAlbatross.mdl
-










Спецэффект - Create a special effect attached to the chest of currentattackedUNIT using war3mapImported\IMPACT3.mdx
-
-









Р˜РЅР°С‡Рµ - Действия
-










Спецэффект - Create a special effect attached to the chest of currentattackedUNIT using Objects\Spawnmodels\Critters\Albatross\CritterBloodAlbatross.mdl
-










Спецэффект - Create a special effect attached to the chest of currentattackedUNIT using war3mapImported\IMPACT4.mdx
-
-
-
-
-
-
-
-
-
-
-
skip
-

События
-


Боевая единица - Raider 0002 <gen> Отдал приказ (цель - объект)
-


Боевая единица - Raider 0002 <gen> Отдал приказ (цель - точка)
-


Боевая единица - Raider 0002 <gen> Отдал приказ (без указания цели)
-
-

Условия
-

Действия
-


Триггер - Turn off (This trigger)
-


Set skip = Да
-
-
unit attack another unit.
event "unit get attacked" runs exactly in moment, when attack animation start playing. (i mean it run before unit get damage, or arrow of attacking unit release)
so.
you can give order to attack enemy, your unit start aiming (trigger runs) and.. you push S button. unit canceled attack, but trigger create arrow on attacked unit anyway.
this is the point. when unit take another order while he fighting, trigger will turn special variable on, and main trigger gonna stop after "wait" action
ffhhhhhhh i finished
believe me, write this is mooooar difficult that read
ok, and finally ingame screenshot
Last edited:





