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

[Solved] Creating Unit in a line

Status
Not open for further replies.
Level 13
Joined
Mar 24, 2013
Messages
1,105
Hello, I'm trying to create a line of units, but if I have the pathing for the unit on, they "push" each other making a deformed line.

  • PC
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) PC
    • Actions
      • Set PC_MaxIndex = (PC_MaxIndex + 1)
      • Set PC_Caster[PC_MaxIndex] = (Triggering unit)
      • Set TempLoc = (Position of PC_Caster[PC_MaxIndex])
      • Set TempReal2 = (Facing of PC_Caster[PC_MaxIndex])
      • Set TempLoc2 = (TempLoc offset by 256.00 towards (180.00 + TempReal2) degrees)
      • Set PC_Counter[PC_MaxIndex] = 100
      • Set PC_Group[PC_MaxIndex] = (Create Unit Group)
      • Unit - Create 1 Power Cog for (Owner of PC_Caster[PC_MaxIndex]) at TempLoc2 facing Default building facing (270.0) degrees
      • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
      • Unit Group - Add (Last created unit) to PC_Group[PC_MaxIndex]
        • Do Multiple ActionsFor each (Integer TempInteger) from 1 to 6, do (Actions)
          • Loop - Actions
            • Set TempReal = (150.00 x (Real(TempInteger)))
            • Set TempLoc3 = (TempLoc2 offset by TempReal towards (TempReal2 + 90.00) degrees)
            • Unit - Create 1 Power Cog for (Owner of PC_Caster[PC_MaxIndex]) at TempLoc3 facing Default building facing (270.0) degrees
            • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
            • Unit Group - Add (Last created unit) to PC_Group[PC_MaxIndex]
            • Custom script: call RemoveLocation(udg_TempLoc3)
            • Set TempLoc3 = (TempLoc2 offset by TempReal towards (TempReal2 - 90.00) degrees)
            • Unit - Create 1 Power Cog for (Owner of PC_Caster[PC_MaxIndex]) at TempLoc3 facing Default building facing (270.0) degrees
            • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
            • Unit Group - Add (Last created unit) to PC_Group[PC_MaxIndex]
            • Custom script: call RemoveLocation(udg_TempLoc3)
      • Custom script: call RemoveLocation(udg_TempLoc)
      • Custom script: call RemoveLocation(udg_TempLoc2)
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • PC_MaxIndex Equal to (==) 1
          • Then - Actions
            • Trigger - Turn on PC Loop <gen>
          • Else - Actions
 
flying units will still collide with other flying units... so the units still won't be in a perfect line...


I want them to block things, that's the reason the pathing cannot be None, which similar to flying in this case.

Just lower the collision size to something that allows both of your needs... else, you will need to turn off collision for the units, then spawn pathing blockers...
 
Level 13
Joined
Dec 21, 2010
Messages
541
flying units will still collide with other flying units... so the units still won't be in a perfect line...




Just lower the collision size to something that allows both of your needs... else, you will need to turn off collision for the units, then spawn pathing blockers...

pOke just said that he tried putting the collision size down to 0 but still no effect.
are you trying to make a fissure like spell?
Add the units the "Locust" ability, then make pathing blockers at their position..
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
Well sorry for the unnecessary confusion and posts, thanks for the replies, for some reason it cannot be targeted as (empty field) and retain its "pathing" properties.

Anyway: Solved.
 
Status
Not open for further replies.
Top