• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

GUI Mining and Lumber system for heroes.

Status
Not open for further replies.
I decided to redo my lumber and mining system for my map and I'm looking for some experise from anyone who has already did this effectively before.

Basically I only want players who have purchased a pickaxe to be able to mine rocks, and players who have purchased a hatchet to be able to cut down trees.
I have ranged heroes too that I want to only be able to attack rocks and trees at a very short range.
Any ideas?

This is for a map similar to LOAP so it doesn't really have to be super complex, and also I will be constructing the system.
All I am really looking for is some suggestions for the best way.
What I am NOT looking for is comments about the nature of GUI. Do us all a favor and KEEP IT TO YOURSELF! Thanks in advance.
Also anything helpful will result in +REP. =]
 
Make the rocks/trees units and make a damage detection system. Once a unit of type rock/tree gets damage, if the damage source owns a pickaxe ((Damage source) has an item of type Pickaxe) Equal to True), then save +1 to the damage source via a hashtable
  • Set Gold = (Load (Key(gold)) of (Key(Damage source)) from Hashtable
  • Hashtable - Save (Gold + 1) as (Key(gold)) of (Key(Damage source)) in Hashtable
Make the trees/rocks targeted (Combat - Targeted as) as "Ancient" and add to your units the "Ancient" in the Stats - Targets Allowed, so that not every unit can target your trees/rocks.
 
Status
Not open for further replies.
Back
Top