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

Submerging and attack orders

Status
Not open for further replies.
Level 6
Joined
May 15, 2009
Messages
191
Hello everyone! requesting aid again.

I'm making a boss fight that involves a steady stream of reinforcements coming to the boss. And I'm facing two problems, one for each type of reinforcements.

The first type is naga-myrmidons, this time simply called "vanguard". These Vanguards are sitting submerged in a pool near the boss, the the region called boss2_reinforcements. What the trigger is supposed to do is, pick one of the initial 20 Vanguards, order that one to un-submerge and then do an attack move to the boss's position - But nothing really happens, I made a game-text to check that the units were properly added to the group, which they are. But no unsubmerging takes place.


  • Vanguard Reinforcements
    • Events
      • Time - Every 12.00 seconds of game time
    • Conditions
    • Actions
      • Set Tempp1 = (Position of BossUnit[2])
      • Set UnitType[1] = Submerged Vanguard
      • Unit Group - Pick every unit in (Units in Boss2 Reinforcements <gen> matching (((Unit-type of (Matching unit)) Equal to UnitType[1]) and (((Matching unit) is alive) Equal to True))) and do (Actions)
        • Loop - Actions
          • Unit Group - Add (Picked unit) to Tempug
      • Set TempU1 = (Random unit from Tempug)
      • Game - Display to (All players) the text: (String((Number of units in Tempug)))
      • Custom script: call IssueImmediateOrder(udg_TempU1, "unsubmerge" )
      • Wait 1.00 seconds
      • Unit - Order TempU1 to Attack-Move To Tempp1
      • Custom script: call DestroyGroup(udg_Tempug)
      • Custom script: call RemoveLocation(udg_Tempp1)
      • Custom script: call RemoveLocation(udg_Tempp2)


Secondly, some random Murloc spawn aswell, these work fine - except that once they've reached the boss's position (provided they don't find any targets) they just head back to their spawn area and sit around, any way to work around this?
 
Level 6
Joined
May 15, 2009
Messages
191
I did change the Guard Return time to like 1000 seconds. And the range to 10000 aswell.

And no, the units do not unsubmerge, but I can't see any other way to do this with custom scripts, and the command is not in the standard GUI. I got the custom order string from another thread.
 
Level 4
Joined
Jul 9, 2007
Messages
50
ive just tested what u tried and had the same problem - the myrmidons wont unsubmerge
the problem was that the submerge ability requires an upgrade. delete that requirement and it works. however, if u make them neutral hostile they unsubmerge at the start of the game so you should pause them at map ini and unpause them just before you give the unsubmerge order.

also, there is a problem in your trigger: you destroy Tempug so you cannot add units to it anymore when the trigger fires the second time. just do:
set Tempug = Units in Boss2reinforcements matching ...
set tempU1 = Random unit from tempGroup
call DestroyGroup(udg_Tempug)
 
Level 6
Joined
May 15, 2009
Messages
191
Thx for the triggering (and object data, I feel silly). Turns out that the Alternate Form Unit was also completely off the hook - that was another problem...

Anyway, thx. +rep and here's the final result. And while the units do unsubmerge now, there's the problem of them not following attack orders, even if they do have Amphibious Movement. Any ideas?


  • Vanguard Reinforcements
    • Events
      • Time - Every 12.00 seconds of game time
    • Conditions
    • Actions
      • Set Tempp1 = (Position of BossUnit[2])
      • Set UnitType[1] = Submerged Vanguard
      • Set Tempug = (Units in Boss2 Reinforcements <gen> matching (((Unit-type of (Matching unit)) Equal to UnitType[1]) and ((((Matching unit) is dead) Not equal to True) and ((Unit-type of (Matching unit)) Equal to UnitType[1]))))
      • Game - Display to (All players) the text: (String((Number of units in Tempug)))
      • Set TempU1 = (Random unit from Tempug)
      • Custom script: call DestroyGroup(udg_Tempug)
      • Unit - Unpause TempU1
      • Custom script: call IssueImmediateOrder(udg_TempU1, "unsubmerge" )
      • Unit - Order TempU1 to Attack-Move To Tempp1
      • Custom script: call RemoveLocation(udg_Tempp1)
      • Custom script: call RemoveLocation(udg_Tempp2)


Although, if the "Return to Spawn upon not finding a target" could be fixed, I'd be fine. I can just make a Spawn Unit trigger, and have them play the animation. I'll find a way to work around this issues of submerging.
Any ideas on the whole Attack-Move thing?
 
Level 4
Joined
Jul 9, 2007
Messages
50
what do you mean by the dont follow attack orders? dont they "attack-move" to tempp1 now? when i triggered it i used "wait 1 second" as u did in your initial post between unsubmerging and attacking

for the other thing:
// set the value "canFlee" in the object editor for your unit to false
// this way my myrmidons didnt run back anymore
EDIT: now it doesnt work anymore, but when i set "guard range" to 0 "guard return range" to 1000000 and "guard return time" to 1000000 in gameplay constants it works

EDIT: btw you dont need the last line (call RemoveLocation(udg_Tempp2) ) as you dont use Tempp2 in your trigger
and you should set Tempp1 after the wait i mentioned before
 
Last edited:
Level 6
Joined
May 15, 2009
Messages
191
Thx for the ideas on gameplay constants - but were you using Neutral Hostile units?

In any case, I decided not to go with submerge, but instead just spawn the units and make them play the Resurface animation that Naga have - should have probably thought of that before I bothered you guys.
In any case, thank you for all the help, +rep.
 
Status
Not open for further replies.
Top