• 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.

[General] Multiple Resources

Status
Not open for further replies.

sentrywiz

S

sentrywiz

Would any of you know a way to make multiple resources?

And since I can't use standard UI to show these resources, can I make a multiboard for each player that will be shown and updated only for that player?

Thank you in advance.
 

sentrywiz

S

sentrywiz

I made an oil resource system a while back (in signature), never got around to expanding it to multiple resources. I might do so now.

Well oil in games reminds me of C&C games. But that is one resource.

How about managing 4 resources? In other words, I want 4 separate trees that show differently but can be each mined and give different resources.
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
But does your Oil System replace certain trees/destructibles?
(Sorry I am too lazy to click links.)

You can show "private" multiboards.
There are 2 ways.
1. Create 12 multiboards and show them to their respective players. (easy mode)
2. Create 1 multiboard and edit the content during GetLocalPlayer() cases. (hardmode)

I recommend you to do the first.
Just make a multiboard variable as an array.
Loop from 1 to 12 and create a multiboard and save it in that integer's slot.
Also create the fields of the multiboards inside the loop.

About the resources... You might want to consider different gathering ways.
For example, my peasant is chopping down a tree, gets 5 wood, then mines the rock, gets 5 stone... but the game thinks that I have either 10 wood OR 10 stone.

There are lots of things that might go wrong.
 

sentrywiz

S

sentrywiz

Well I want to mod age of empires. So I'd need 4 resources, and multiple ways of obtaining food. The other 3 are just ways of getting lumber, but I fear the map will be laggy because I can't use destructibles I must use units and populating the map with units instead of trees will be insane.
 

sentrywiz

S

sentrywiz

You can use destructibles, you just need to trigger the gathering system. Use an ability or attack of some kind.

There is no event "Destructible" is attacked. Only destructible dies. Which I can't use. What do you suggest?
 

sentrywiz

S

sentrywiz

Make an ability that can only be cast on destructables.
Make a trigger when a unit is ordered to use that ability and check if the destructable is one that is allowed. If it isn't then order the unit to stop.
When a unit starts the effect of that ability, you are "attacking" the destructable.

I see.

Didn't know there was "target destructible of ability being cast"

Thanks
 
Status
Not open for further replies.
Top