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

[Trigger] Wisps not harvesting gold automatically.

Status
Not open for further replies.
Level 3
Joined
Jul 4, 2013
Messages
35
I'm currently editing a map. Despite my best efforts, I could never get wisps to harvest a gold mine automatically at the beginning for one of the player factions.

I've tried placing entangled gold mines in place of normal ones, and this DOES work, but the entangled gold mines will die permanently.

I've had several variations of this trigger, and none seem to work.

  • Get To Work
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Can't seem to get blue's wisps to auto gather gold. --------
      • Set NEMine1 = Gold Mine 0256 <gen>
      • Set NEMine2 = Gold Mine 0257 <gen>
      • Unit - Order Tree of Life 0255 <gen> to Night Elf Tree Of Life - Entangle (Instant) NEMine1
      • Unit - Order Tree of Eternity 0251 <gen> to Night Elf Tree Of Life - Entangle (Instant) NEMine2
      • Wait 5.00 seconds
      • Set TempGroup = (Units in Wisps 1 <gen>)
      • Unit Group - Order TempGroup to Right-Click NEMine1
      • Custom script: call DestroyGroup(udg_TempGroup)
      • Set TempGroup = (Units in Wisps 2 <gen>)
      • Unit Group - Order TempGroup to Right-Click NEMine2
      • Custom script: call DestroyGroup(udg_TempGroup)

Does anybody here know the solution to this issue?
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
The problem is that you're setting the placed gold mine to a variable. When the game starts, said gold mine no longer exists because it was replaced with the entangled version, thus making NEMine1 & 2 non existent.

The best solution off the top of my head is what you suggested. I just tested it out in a map myself and the entangled gold mines don't get destroyed instantly. What are the steps you took to place the entangled gold mine?
 
Level 3
Joined
Jul 4, 2013
Messages
35
Trying it without a variable didn't work either.

I placed the entangled gold mines in from the unit pallette. I had to make them placeable in the editor to actually do this. The entangled goldmines that are killed this way will die permanently. They will not revert to a regular goldmine, but wiped off the face of the map.


I suppose there is no true solution, then.
 
Level 11
Joined
Jun 2, 2013
Messages
613
There's a way, you just have to use this trigger:

  • Unit - Order (your unit) to Harvest Nearby Gold
EDIT:

You can also try this if the above doesn't work. Just edit the starting units for nightelf, assuming that's the race you want to use.
The game should run all generic scripts associated with creating starting units such as auto-harvest.

  • Melee Game - Create Night Elf starting units for Player 1 (Red) at (Player 1 (Red) start location) (Exclude Heroes)
 
Last edited:
Level 8
Joined
Dec 10, 2006
Messages
67
Does the system entangle a goldmine the same way it haunts one? By that, I mean does it simply create a new unit and put it at the location of the original target leaving the original still there but untargetable and unselectable until the new unit dies as opposed to morphing a unit of one type into one of another? This means the standard goldmine and the EGM would be two different units occupying the same location. This would explain why deliberately placed EGM's don't revert back to regular goldmines and why your variable assignments are meaningless. It would also mean that events like Unit Enters Rect or Unit Begins/Finishes Construction might be useable. Considering the way this game's programmers seem to be capable of both brillance and dunder-headedness at the same time, they might not. If this is the case, I have one last thought. Once again, I'm spitballing here but if you have the location of the original targeted unentangled mine, perhaps you can look for a new Entangled Goldmine near that location.
 
Last edited:
Level 3
Joined
Jul 4, 2013
Messages
35
There's a way, you just have to use this trigger:

  • Unit - Order (your unit) to Harvest Nearby Gold
EDIT:

You can also try this if the above doesn't work. Just edit the starting units for nightelf, assuming that's the race you want to use.
The game should run all generic scripts associated with creating starting units such as auto-harvest.

  • Melee Game - Create Night Elf starting units for Player 1 (Red) at (Player 1 (Red) start location) (Exclude Heroes)


This seems to have worked. Thank you for the help.
 
Status
Not open for further replies.
Top