• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Trigger help!!

Status
Not open for further replies.
Level 3
Joined
Aug 11, 2008
Messages
53
idk if im on the right side of the fourm. but ill cut to the chase. say like you press the "C" command and the unit just swings his sword either tho theres no mosnter to attack like in Dark INvastion II >_< i would like to know how to do that...can eny one help? :p
 
Level 16
Joined
Jul 21, 2008
Messages
1,121
Make spell which has hotkey C based on channel (instant) and make it play attack animation. Then, make a trigger which picks units in front of caster and damages eg. nearest.

This is simplified version of that trigger:

  • Damage
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
    • Actions
      • -------- Put your spell in conditions --------
      • -------- It would be good to disable hero attack if using this system --------
      • -------- To conditions below add something that will filter units which are supposed to be attacked --------
      • Set TempGroup = (Units within 35.00 of TempPoint matching (YouConditions)
      • Custom script: call RemoveLocation(udg_TempPoint)
      • -------- Now pick unit from tempgoup which would be attacked --------
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Set TempPoint = (Position of (Picked unit))
          • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at TempPoint facing Default building facing degrees
          • Custom script: call RemoveLocation(udg_TempPoint)
          • Unit - Cause (Last created unit) to damage (Picked unit), dealing 100.00 damage of attack type Hero and damage type Normal
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Custom script: call DestroyGroup(udg_TempGroup)
 
Level 3
Joined
Aug 11, 2008
Messages
53
Thanks ill try it!

EDIT:
alass it dint work >_< >_<.....can some one just make a map with the trigger and i can use that or something : / be alot of help lol
 
Last edited by a moderator:
Level 17
Joined
Nov 18, 2008
Messages
1,538
How can tempgroup target units within range of temppoint if temppoint isnt set before? Change it so tempgroup targets units within range of casting unit. and temppoint is set to position of casting unit. and then just remove dummy at end.
 
Level 3
Joined
Aug 11, 2008
Messages
53
Sry, lol :p thanks....ok i edited this so i dint haft to double post...i dint quite find what i was looking for >_< BUT! i did find a couple usefull thangs : /...still looking for help about the combat system like in Dark Invastion II xD
 
Last edited:
Status
Not open for further replies.
Top