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

[DummySytem] Move Dummy Unit to Triggering unit

Status
Not open for further replies.
Level 6
Joined
Jun 28, 2016
Messages
70
Hello, i'v been on a project rpg recently & i'v been trying to create a system in order to create 1 Wings dummy unit (Type of unit with locust to nt select) FOR owner of Triggering unit (Triggering = type of Hero)-> to follow the triggering unit, for a periodic event that doesn't lag around 0.01 - 0.04 seconds of game time.

if this can be done by triggers ways i'l welcome any knowledge for this :D thx !
 
Level 6
Joined
Jun 28, 2016
Messages
70
it shows a custom model of a wings i only want to follow the unit like an attachement would but with sme special ability added to it & not to the unit
& by followng i mean move it evrytime at a periodic event facing current triggering facing angle.
 
Level 6
Joined
Jun 28, 2016
Messages
70
yes i did that, but my unit can also teleport to another area & then the trick will not move it "to the area" you understand.
 
Level 3
Joined
Jun 18, 2016
Messages
68
  • Wings
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 200.00 of (Position of (Wings))) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Picked unit)) Equal to (YOUR UNIT)
            • Then - Actions
              • Set Unit = (YOUR UNIT)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Distance between (Position of (Wings)) and (Position of (YOUR UNIT))) Greater than or equal to 200.00
                • Then - Actions
                  • Unit - Move (Wings) instantly to ((Position of (YOUR UNIT)) offset by 200.00 towards (Facing of (Wings)) degrees), facing (Position of (YOUR UNIT))
                • Else - Actions
            • Else - Actions
Try this, but i never try this before tho.
Remember to set another trigger for your Wings when wings spawn,
  • Set Wings = (Last Created Unit)
 
Level 12
Joined
May 22, 2015
Messages
1,051
Are the wings attached to the unit in the game? I am just wondering why this can't be a special effect added to the unit and then removed after the duration.

If the effect it adds is from an aura then you can still add it to the hero directly. There are ways to hide the aura icon.

What does the whole ability do?
 
Level 6
Joined
Jun 28, 2016
Messages
70
because i want the wings to change size very fluidly, & having to remodel it 10 times isn't interesting
Also the basic attachement model is way too smaller for the main triggering unit :)
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
First you save your hero and the wings to variables.
  • WingsStart
  • Events
  • Map initialization
  • Conditions
  • Actions
  • Set Hero = your hero
  • Set Loc = (Position of Hero)
  • Unit - Create 1 your wings for Player 1 (red) at Loc facing 0 degrees
  • Set Wings = Last created unit
  • Custom script: call RemoveLocation(udg_Loc)
Then you move the wings towards the hero.
  • WingsMove
  • Events
  • Time - Every 0.03 seconds of game time
  • Conditions
  • Actions
  • Set Loc = (Position of Hero)
  • Unit - Move Wings instantly to Loc, facing (Facing of Hero) degrees
  • Custom script: call RemoveLocation(udg_Loc)
 
Level 2
Joined
Dec 22, 2016
Messages
9
If the hero/main unit model is also made by yourself, couldn't you also define a location (similar to "weapon", "head", "chest", "origin", etc.), to which you can attach the wings as a special effect? Though this is probably much harder to do than just moving the wing-units to your hero via the 0.03 periodic trigger.
 
Level 3
Joined
Jun 18, 2016
Messages
68
First you save your hero and the wings to variables.
  • WingsStart
  • Events
  • Map initialization
  • Conditions
  • Actions
  • Set Hero = your hero
  • Set Loc = (Position of Hero)
  • Unit - Create 1 your wings for Player 1 (red) at Loc facing 0 degrees
  • Set Wings = Last created unit
  • Custom script: call RemoveLocation(udg_Loc)
Then you move the wings towards the hero.
  • WingsMove
  • Events
  • Time - Every 0.03 seconds of game time
  • Conditions
  • Actions
  • Set Loc = (Position of Hero)
  • Unit - Move Wings instantly to Loc, facing (Facing of Hero) degrees
  • Custom script: call RemoveLocation(udg_Loc)
Isn't that the wings will appear exactly on the unit every 0.03 seconds?
 
Status
Not open for further replies.
Top