• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] Newb Questions ?

Status
Not open for further replies.
Guys, I have a question, that may sound newb ... but: How do I create a Haunted Gold mine, with gold ???

Well, you see, I found that if I create a haunted gold mine, it doesn't have gold ...
Here is the code I used:
JASS:
set x = -4600.0
set y = 1200.0
set mine = CreateUnit(p, 'ugol', x, y, 270) //creates UDmine
But the mine created has no gold..

Then I though," I know I will use a dummy!", but didn't went well.. the stupid dummy can't summon the dam mine, on a real mine ...

So, How do I do this ?
 
Level 10
Joined
Sep 21, 2007
Messages
517
GUI:

  • Neutral Building - Set (goldmine) to 12500 gold
JASS: (may not be in best form or may be done in another way but im not a jasser, i only know little)

JASS:
call SetResourceAmount( null, 12500 )

null= the goldmine

12500 or w/e number is the amount you want to put in the goldmine or haunted goldmine.
 
Level 6
Joined
Jun 30, 2006
Messages
230
I'm trying to teach him stuff like this. He overuses variables on certain things, and doesn't use variables for stuff he should, like unit and spell ID's.

Anyways, does the gold mine thing work?
 
Level 12
Joined
Aug 20, 2007
Messages
866
Similar to the subject

Instead of making a mine the way WE does it, how could you make a unit react to other units, the same way a mine would?
Perhaps making it invulnerable and its HP representing its worth in resource? (this would go for maps that have multiple minable resources)

I was thinking making a certain kind of action to change ownership of the resource (ways to do it are innumerable, from a region, to a building, to a spell cast)

But the way it would be mined, wouldn't it be sorta like a unit is ordered to move or attack, or something onto the mine-able unit, and when he reaches his destination, becomes hidden, then reappears some seconds later (configurable) with (hopefully it's a peon model)

A sack of resource on his back with orders to go back to a town hall
And then floating text to show resources have been dropped off

I was thinking about how the haunted mine + acolytes could be recreated through triggering


If anybody'd like to make the JASS code for something like that and some pictures, it would be interesting
 
Level 5
Joined
Aug 16, 2007
Messages
149
isn't a haunted gold mine just a normal gold mine with a skin on it? So find the skin in war3.mpq and use the skin for a normal gold mine?
 
Level 12
Joined
Aug 20, 2007
Messages
866
@Me or Flame?

Uhh, I'm talking more so about the code for the acolytes on the sides

But I supposed that'd work for Flames question
 
Level 5
Joined
Aug 16, 2007
Messages
149
yeah I meant flame. And about yours, it worth in resource would probably be better as point-value and floating text above it.
 
Status
Not open for further replies.
Top