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

More Resouces

Status
Not open for further replies.
Level 13
Joined
Sep 24, 2007
Messages
1,023
Could anyone point me to a place where I could find a way to create a system that uses more resources beyond the 2 already.

Thanks in advance I am asking here so I can get a few possibly and pick the one which I like the most.
 
Level 4
Joined
Jan 3, 2009
Messages
64
Hey, good idea, if you know about multiboards you can create a "fake
resource", like let gold and lumber on the info board and create another resource there and put in the unit description how much it costs, but you will need to do a lot of triggers.
 
Level 13
Joined
Sep 14, 2008
Messages
1,407
Well first of all you will need an integer for every player (so most likly an array) which counts the additional resource.

Then you need a trigger which "creates" the resource e.g. when "mine" is attacked -> add set rescouce[Player number of...] = ... + 1

Then you need the triggers which run when a unit is trained and checks if the player has the minimum of the needed resource.
 
Level 6
Joined
Mar 22, 2009
Messages
276
You must have planned this well, like on how the resources will be gathered. And that will be the Event of your trigger.
Who can gather/collect this resources and where, now that's the condition.

I suggest you to learn about Hashtables. It will be used in storing the resources amount. What you need is variable that will handle the amount of the resources. Probably its an integer.

Multiple resources is already used in some games like Gods and Empires.

I made a test map to give you an idea on how to do it.
Note: It does not contain the complete solution to your problem. Some of the things needed will be or can be added by you.
 

Attachments

  • more resources.w3x
    14.2 KB · Views: 63
Level 10
Joined
Aug 15, 2008
Messages
720
You must have planned this well, like on how the resources will be gathered. And that will be the Event of your trigger.
Who can gather/collect this resources and where, now that's the condition.

I suggest you to learn about Hashtables. It will be used in storing the resources amount. What you need is variable that will handle the amount of the resources. Probably its an integer.

Multiple resources is already used in some games like Gods and Empires.

I made a test map to give you an idea on how to do it.
Note: It does not contain the complete solution to your problem. Some of the things needed will be or can be added by you.


There is also very nice game called "Genesis of Empires 1&2" ; also Heroes and Empires and lots of more.

And yes, hashtables are very epic - if you want best MUI and best systems on GUI Triggering, hashtables are for you!
 
Status
Not open for further replies.
Top