• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Money to Mana

Status
Not open for further replies.
Level 1
Joined
Apr 10, 2015
Messages
2
Hey everyone, I have recently started making a map and I am interested in the banking system in Europe at War Victoria version where you deposit money into the bank and take it out etc. I was hoping someone could explain to me how that works so i could put it in my map please would be a huge help! :)
 
Level 9
Joined
May 21, 2014
Messages
580
What kind of money are you using? Lumber and Gold?

if that was the case, then create n number of array variables with size 12 to accommodate all players, where n is the number of resources that you want to manage.

Then when the player deposits, then just store the number of deposited number in the array variable with the proper index.

Let's say Red Player deposited 500 Gold.
Then do: set SampleArray[PlayerNumberOfRedPlayer] = SampleArray[PlayerNumberOfRedPlayer] + 500
Then decrease the current Player Property Gold of the Red Player.

Or when he takes it out 500 Gold, then:
set SampleArray[PlayerNumberOfRedPlayer] = SampleArray[PlayerNumberOfRedPlayer] - 500
Then increase the current Player Property Gold of the Red Player.
 
Level 1
Joined
Apr 10, 2015
Messages
2
Well you would be depositing gold into the bank.
and from what I can see the creators of the map have given the bank abilities (deposit and withdraw) and deposit increases the mana of the bank by 500g (the amount of mana represents the amout of gold stored.) and by clicking the withdraw ability the amount decreases by 500 and the players gold increases by 500.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Set mana regeneration to 0. (And regeneration type to None.)
Set max mana to... something.
When Withdraw is cast, you add gold to inventory and the ablity cost mana.
When Deposit is cast, you add mana to the bank and the ability cost gold (this is the Charge Gold and Lumber ability).
 
Level 9
Joined
May 21, 2014
Messages
580
Well you would be depositing gold into the bank.
and from what I can see the creators of the map have given the bank abilities (deposit and withdraw) and deposit increases the mana of the bank by 500g (the amount of mana represents the amout of gold stored.) and by clicking the withdraw ability the amount decreases by 500 and the players gold increases by 500.

Ah I see. :) What Wietlol has suggested solves your problem. You just have to add conditions when if the mana is 0, or already at max or something... to simulate correctly the withdrawal amount.
 
Status
Not open for further replies.
Top