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

[General] Custom Undead Gold Mine

Status
Not open for further replies.
Level 9
Joined
Nov 27, 2014
Messages
1,966
I am having a situation here..
In a few recent tests, I have not been able to place a "custom" undead gold mine in WE..
By what I mean is this..

I can place it in WE..

screenie1-png.310097


Ingame, it just shows up as a default Haunted Gold Mine

In other words.. Its a gold mine based of the undead gold mine in which

-"Haunts" a gold mine, turning it into a "Haunted" Gold Mine
- Gather gold from a unit just like how acolytes do soo
- Once destroyed, leaves a gold mine


I recall a "Unit - Haunt" trigger.. but I suspect that still just create a Haunted Gold Mine (default one)
Perhaps this can only be done with triggers?

If so, how?


Thanks in advance
 

Attachments

  • Screenie1.PNG
    Screenie1.PNG
    1.1 MB · Views: 295
Level 2
Joined
Feb 17, 2017
Messages
26
I wonder, does this problem come when initializing a melee map?
=> There is a trigger that "haunts" goldmines directly when starting a melee map, but this trigger will obviously not take your custom skin. Obviously, the same would go for night elves.

What happens if you order an acolyte to haunt a goldmine?
=> If you just "copied" the haunt ability of the acolyte, I think this will trigger the default "haunt" and not give you the desired results.

Here is a way of how I may just have solved it:
- Create a custom unit from the default haunted gold mine and give it the model file you desire (In my case I used the altar of darkness just for the test)
- A simple trigger with the "A unit enters region" event (region being equal to playable map area), and a "triggering unit equal to haunted gold mine" condition and a "replace unit" action to replace the goldmines should do the trick.

Here is a comparison between 2 gold mines, the one on the left is the custom gold mine placed in the editor (with the altar of darkness model), that will appear as the default haunted mine in game, the gold mine on the right will action a trigger that will replace itself with the desired model:



hauntedmine-png.310110


Of course, don't forget to add actions in your trigger to control the ownership of the replaced unit, we don't want a gold mine you have haunted to be controlled by another player now, do we?
I wish I could show you the trigger but I don't know how to do it in the forum. If you need more details on how my trigger looks like, I could still give a screenshot instead.

Hope this helps

P.S.: While this trick works aesthetically, it doesn't take into account the goldmines' current amount of gold. So if an almost empty goldmine is haunted, the new haunted goldmine would have max gold again.
You can fix this with another trigger that would use a variable to save the goldmines amount of gold and set its value to the new goldmine's wealth.
 

Attachments

  • HauntedMine.png
    HauntedMine.png
    2.1 MB · Views: 301
Last edited:
Level 9
Joined
Nov 27, 2014
Messages
1,966
I wonder, does this problem come when initializing a melee map?
=> There is a trigger that "haunts" goldmines directly when starting a melee map, but this trigger will obviously not take your custom skin. Obviously, the same would go for night elves.

What happens if you order an acolyte to haunt a goldmine?
=> If you just "copied" the haunt ability of the acolyte, I think this will trigger the default "haunt" and not give you the desired results.

Here is a way of how I may just have solved it:
- Create a custom unit from the default haunted gold mine and give it the model file you desire (In my case I used the altar of darkness just for the test)
- A simple trigger with the "A unit enters region" event (region being equal to playable map area), and a "triggering unit equal to haunted gold mine" condition and a "replace unit" action to replace the goldmines should do the trick.

Here is a comparison between 2 gold mines, the one on the left is the custom gold mine placed in the editor (with the altar of darkness model), that will appear as the default haunted mine in game, the gold mine on the right will action a trigger that will replace itself with the desired model:



hauntedmine-png.310110


Of course, don't forget to add actions in your trigger to control the ownership of the replaced unit, we don't want a gold mine you have haunted to be controlled by another player now, do we?
I wish I could show you the trigger but I don't know how to do it in the forum. If you need more details on how my trigger looks like, I could still give a screenshot instead.

Hope this helps

P.S.: While this trick works aesthetically, it doesn't take into account the goldmines' current amount of gold. So if an almost empty goldmine is haunted, the new haunted goldmine would have max gold again.
You can fix this with another trigger that would use a variable to save the goldmines amount of gold and set its value to the new goldmine's wealth.

Thanks. Let me see what I can do with this..
 
Level 9
Joined
Nov 27, 2014
Messages
1,966
I wonder, does this problem come when initializing a melee map?
=> There is a trigger that "haunts" goldmines directly when starting a melee map, but this trigger will obviously not take your custom skin. Obviously, the same would go for night elves.

What happens if you order an acolyte to haunt a goldmine?
=> If you just "copied" the haunt ability of the acolyte, I think this will trigger the default "haunt" and not give you the desired results.

Here is a way of how I may just have solved it:
- Create a custom unit from the default haunted gold mine and give it the model file you desire (In my case I used the altar of darkness just for the test)
- A simple trigger with the "A unit enters region" event (region being equal to playable map area), and a "triggering unit equal to haunted gold mine" condition and a "replace unit" action to replace the goldmines should do the trick.

Here is a comparison between 2 gold mines, the one on the left is the custom gold mine placed in the editor (with the altar of darkness model), that will appear as the default haunted mine in game, the gold mine on the right will action a trigger that will replace itself with the desired model:



hauntedmine-png.310110


Of course, don't forget to add actions in your trigger to control the ownership of the replaced unit, we don't want a gold mine you have haunted to be controlled by another player now, do we?
I wish I could show you the trigger but I don't know how to do it in the forum. If you need more details on how my trigger looks like, I could still give a screenshot instead.

Hope this helps

P.S.: While this trick works aesthetically, it doesn't take into account the goldmines' current amount of gold. So if an almost empty goldmine is haunted, the new haunted goldmine would have max gold again.
You can fix this with another trigger that would use a variable to save the goldmines amount of gold and set its value to the new goldmine's wealth.

Thanks. Let me see what I can do with this..
 
Level 2
Joined
Feb 17, 2017
Messages
26
Oh... I thought I would teach something to someone today, but it was the other way around... Okay then... :D

Thank you for this, will do next time ;)
 
Status
Not open for further replies.
Top