• 🏆 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!

Missing trigger features in Newgen?

Status
Not open for further replies.
Level 6
Joined
May 31, 2008
Messages
218
I am trying to create a knockback sort of spell in a map and i'm using the newgen editor for several reasons. But now i realised that one thing can not be found within newgen, which is this:

Untitled-2-2.jpg
Untitled-1-3.jpg


The first image show how it is in newgen and the second in normal editor.

There are some options i really need that are missing, and am i the only one experiencing this in newgen? Cause i would be glad if someone with newgen checked this, and i am using newgen normally without having a second installation of wc3.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
The reason is because JNGP is out-dated, and does not use the newest version of the World Editor. Go to Help > About the WarCraft III Editor and you'll see the version is not the same as the most recent patch.
 
Level 6
Joined
May 31, 2008
Messages
218
Easiest thing to do would have a "handle" variable called "Handle" then every time you want to use it just do

  • Custom Script - set udg_Handle = GetTriggerUnit()
a list of these would be

GetTriggerUnit() <--- Triggering unit
GetEnumUnit() <--- Picked unit
GetFilterUnit() <-- Matching unit

K, now i did a try, that didn't work out to well.
  • KnockbackTarget
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • ((Ability being cast) Equal to (==) Stunning Voltage (EMPIRE)) or ((Ability being cast) Equal to (==) Superior Race (EMPIRE))
    • Actions
      • -------- Just for configuration/readability --------
      • Set rushangle = (Angle from (Position of (Target unit of ability being cast)) to (Position of (Casting unit)))
      • -------- Distance unit is knocked back per second --------
      • -------- .04 is how often the units are moved, so we multiply the distance by .04 --------
      • Set rushdistance = (150.00 x 0.10)
      • -------- How long the unit is knocked back for --------
      • Set rushtime = 1.50
      • -------- Store the values --------
      • Hashtable - Save rushdistance as (Key distance) of (Key (Target unit of ability being cast)) in rushtable
      • Hashtable - Save rushangle as (Key angle) of (Key (Target unit of ability being cast)) in rushtable
      • Hashtable - Save rushtime as (Key time) of (Key (Target unit of ability being cast)) in rushtable
      • Unit Group - Add (Target unit of ability being cast) to rush_group

  • KnockbackUnits
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in rush_group and do (Actions)
        • Loop - Actions
          • -------- Load all necessary variables stored in the Hashtable --------
          • Custom script: set udg_rushhandle = GetEnumUnit()
          • Set rushdistance = (Load (Key distance) of (Key rushhandle) from rushtable)
          • Set rushangle = (Load (Key angle) of (Key rushhandle) from rushtable)
          • Set rushremaintime = (Load (Key time) of (Key rushhandle) from rushtable)
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • rushremaintime Greater than (>) 0.00
              • Then - Actions
                • -------- Move the unit and update time remaining --------
                • Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by rushdistance towards rushangle degrees)
                • Hashtable - Save (rushremaintime - -0.10) as (Key time) of (Key rushhandle) in rushtable
              • Else - Actions
                • -------- Knockback is done, clean up --------
                • Hashtable - Clear all child hashtables of child (Key rushhandle) in rushtable
                • Unit Group - Remove (Picked unit) from rush_group

Do you see any faulty stuff? Cause i don't understand where the problem is.

(ignore the leaks, haven't fixed those)



Realised i had forgot to create the hashtable xD
 
Last edited:
Status
Not open for further replies.
Top