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

gold and lumber questions

Status
Not open for further replies.
gold and lumber questions "PLEASE CAN SOMEONE HELP ME"

How to save gold and lumber with cache?
How to add maybe in a shop item or ability to create ancient gold with 1,000,000 gold or with the same way lumber?
How to save the ancient gold with game cache or with the same way lumber?

Can you guys please help me!?
I will need this soon for a rpg map so please HELP ME!
 
Last edited by a moderator:
Level 23
Joined
Apr 16, 2012
Messages
4,041
create a gamecache variable, then you can use

JASS:
call StoreInteger(mygamecache, "missionkey", "id", GetPlayerState(PLAYER_STATE_RESOURCE_GOLD))
call StoreInteger(mygamecache, "missionkey", "id2", GetPlayerState(PLAYER_STATE_RESOURCE_LUMBER))

it depends on how you want to represent the ancient gold. If you want the simplest approach, you can just store it inside variable(number of ancient golds player has) and then save it the same way as above.

In the shop you can sell unit which is called Ancient gold, and then in your map script, you will basically check for units that enter playable map area, and if it is Ancient gold, add to player. The same can be done if he wants to sell it
 
create a gamecache variable, then you can use

JASS:
call StoreInteger(mygamecache, "missionkey", "id", GetPlayerState(PLAYER_STATE_RESOURCE_GOLD))
call StoreInteger(mygamecache, "missionkey", "id2", GetPlayerState(PLAYER_STATE_RESOURCE_LUMBER))

it depends on how you want to represent the ancient gold. If you want the simplest approach, you can just store it inside variable(number of ancient golds player has) and then save it the same way as above.

In the shop you can sell unit which is called Ancient gold, and then in your map script, you will basically check for units that enter playable map area, and if it is Ancient gold, add to player. The same can be done if he wants to sell it
Thank edo you are my sensei !^^
 
Status
Not open for further replies.
Top