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

Units not being removed

Status
Not open for further replies.
Level 3
Joined
Dec 6, 2005
Messages
67
Ok so i have 2 triggers
  • Bunker Marine Load
    • Events
      • Unit - A unit Is loaded into a transport
    • Conditions
      • (Unit-type of (Transporting unit)) Equal to Bunker
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Marine
        • Then - Actions
          • Set temp_point = (Position of (Transporting unit))
          • Unit - Create 1 Marine <bunker> for (Triggering player) at temp_point facing Default building facing degrees
          • Custom script: call RemoveLocation(udg_temp_point)
        • Else - Actions
  • Bunker Death
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Bunker
    • Actions
      • Set temp_point = (Position of (Dying unit))
      • Unit Group - Pick every unit in (Units within 100.00 of temp_point matching ((Unit-type of (Matching unit)) Equal to Marine <bunker>)) and do (Actions)
        • Loop - Actions
          • Unit - Remove (Picked unit) from the game
      • Custom script: call RemoveLocation(udg_temp_point)
now when the 'Bunker' dies the little dummy units 'Marine <bunker>' aren't dying... :/
 
Level 3
Joined
Dec 6, 2005
Messages
67
tried 200 and thats not working either... :/
i know that 100 seems small, but it should work, my dummy unit is a flying unit ('height:45' if it matters) and it is created directly above the center of the triggering unit, i can verify as the attack animation is just barely above the model (desired) but when the building dies the little .10 scale units are still standing...

edit: just for kicks tried 1000 and still no luck, lol its driving me crazy
oh and the dummy units have abilities: locust , invulnerable (neutral) but they should still be pickable right?
 
Level 3
Joined
Dec 6, 2005
Messages
67
nope, here's a copy of the map, maybe i'm just being stupid about it or something
 

Attachments

  • test.w3x
    1.8 MB · Views: 66
Level 3
Joined
Dec 6, 2005
Messages
67
oh and the dummy units have abilities: locust , invulnerable (neutral)
yep they have locust.... so i can't use locust then? Is there an alternative for making them unselectable?
 
Level 3
Joined
Dec 6, 2005
Messages
67
an easy way to add support for locust units? being able to select dummy units is really not acceptable, it'll screw up box selects of units and what not, so if at all possible i need the locust support
 
Level 3
Joined
Dec 6, 2005
Messages
67
not experienced with using hash tables.... so i looked at
http://www.hiveworkshop.com/forums/...ls-279/hashtables-and-mui-133407/#post1187483
so if i'm understanding this correctly i'd create a variable say 'bunkers' of type hashtable
then store the created units as 0-3 , bunkerHandleID in the hash table? (0-3 as bunker can hold up to 4 units)
when bunker dies or units unload i just delete unit saved in the hashtable at that key and then reset the info?

edit: there will be 2 different dummy units that can be spawned depending on the unit inside so i assume that storing each unit seperately will make it easier than a unit group to remove just the dummy type associated with the leaving unit?

okay so i gave some stuff a try and this is NOT working...
  • Untitled Trigger 001
    • Events
      • Time - Elapsed game time is 0.10 seconds
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Bunker)) and do (Actions)
        • Loop - Actions
          • Hashtable - Save 0 as 0 of (Key (Picked unit)) in bunkers
  • Bunker Load
    • Events
      • Unit - A unit Is loaded into a transport
    • Conditions
      • (Unit-type of (Transporting unit)) Equal to Bunker
    • Actions
      • Hashtable - Save ((Load 0 of (Key (Transporting unit)) from bunkers) + 1) as 0 of (Key (Transporting unit)) in bunkers
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Marine
        • Then - Actions
          • Set temp_point = (Position of (Transporting unit))
          • Unit - Create 1 Marine <bunker> for (Triggering player) at temp_point facing Default building facing degrees
          • Game - Display to (All players) the text: (Spawned unit being stored in: + (String((Load 0 of (Key (Transporting unit)) from bunkers))))
          • Hashtable - Save Handle Of(Last created unit) as (Load 0 of (Key (Transporting unit)) from bunkers) of (Key (Transporting unit)) in bunkers
          • Custom script: call RemoveLocation(udg_temp_point)
        • Else - Actions
the game message keeps saying units being stored in 0
 
Last edited by a moderator:
Level 3
Joined
Dec 6, 2005
Messages
67
Transporting Unit
When responding to an 'Is Loaded Into A Transport' unit event, this refers to the transport that loaded the unit.
nope its not marine, and my problem isn't the trigger firing, its a problem with the hash table
 
Status
Not open for further replies.
Top