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

Weird bug, unit not going to the place

Status
Not open for further replies.
Level 1
Joined
Jun 13, 2008
Messages
132
  • Event: Generic unit dies
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If: Conditions
      • (Unit-type of (Dying unit)) Igual a Effect ( Panda split 1 )
    • Then: Acciones
      • Set TempPoint = (Position of (Triggering unit))
      • Set TempInteger = (Level of Position ( Trigger ) for (Dying unit))
      • For each (Integer IntegerLoop[1]) from 1 to 3, do (Actions)
        • Bucle: Acciones
          • Set TempPoint2 = (TempPoint offset by 900.00 towards ((Real(IntegerLoop[1])) x 120.00) degrees)
          • Unit - Create 1 Effect ( Panda split 2 ) for (Owner of (Triggering unit)) at TempPoint facing Vista building predeterminada degrees
          • Unit - Order (Last created unit) to Move to TempPoint2
          • Unit - Add Spellbook ( Position ) to (Last created unit)
          • Unit - Set level of Position ( Trigger ) for (Last created unit) to TempInteger
          • Unit - Add a (Random real number between 1.00 and 2.00) second Genérico expiration timer to (Last created unit)
          • Custom script: call RemoveLocation (udg_TempPoint2)
      • Custom script: call RemoveLocation (udg_TempPoint)
    • Other: Actions

Everything works except for "order last created unit to move to TempPoint2", I've tested "TempPoint2" creating units there, and these are correct, but the units do not move.

My units have the locust ability, they can walk and have move speed.

I've deleted every trigger in my map to test if something else was causing this error to occur, but nothing.

What could it be?
 

~El

Level 17
Joined
Jun 13, 2016
Messages
557
Locust tends to be unregistered by triggers. I suggest to add them after creation.

Seconding this. Locusted units are unfortunately exempt from most triggers, you can't even loop through them with a region or a rect.

The only way to be able to manipulate locusted units that I know of, is if you manually store the unit handle to the locust in a global array somewhere, and then use that.
 
Locust tends to be unregistered by triggers.
Can you elabroate what unregistered by triggers means?

you can't even loop through them with a region or a rect.

The only way to be able to manipulate locusted units that I know of, is if you manually store the unit handle to the locust in a global
The created unit is stored into a global, bj_lastCreatedUnit, which is then used. And if there is no other trigger interferring here, not sure if this is the issue.
 
Last edited:

~El

Level 17
Joined
Jun 13, 2016
Messages
557
Can you elabroate what unregistered by triggers means?

They don't appear in damage events, order events, rect enumerations and other things, making it hard to work with them.

The created unit is stored into a global, bj_lastCreatedUnit, which is then used. And if there is no other trigger interferring here, not sure if this is the issue.

Hmm, now that you mention it, yeah, that's strange.

My guess is that adding the Locust ability makes the unit stop for one reason or another.

1. Unit created
2. Unit ordered to move to point
3. Unit given Locust causing it to stop

This is entirely conjecture, but it might be worth reordering those steps.
 
Order events work fine also for aloced units. For damage event it needs to be specified, but can be added, too. But yes, rect- and range enums don't get aloc units, and one would need to enum through PlayerUnits when wanting to catch them in a group. But maybe it has not much to do with being unregistered from a trigger, hm.
 

Attachments

  • OrderEvent AlocUnit.w3x
    13.5 KB · Views: 13
Status
Not open for further replies.
Top