Hey fellow hive members.
I'm considering if this, in theory, would be possible...
Create a dummy unit with a 2D planar model, textured as a 'new resource'.
Every 0.01 game seconds, move this dummy unit to the centre of players camera view, offset by 450x and 850y (to keep it about 100 units to the left of the current gold resource icon).
Set the custom value of this unit to 0.
Create a floating point message, just to the right of the dummy unit displaying that dummy unit's custom value.
Increasing the custom value whenever the player gains this 3rd resource.
Decreasing the custom value whenever the player spends this 3rd resource.
In my current map, I currently have 2 resources: Gold is used as Metal, and Lumber is used as Gas. Food is still Food (well Energy). The third resource, will be Cash/Capital/Gold. And is only used for researches and upgrades. The player generates Cash/Capital/Gold every 30 seconds, an x amount for each Industry building he has.
What do you think? Any inherrent problems I havn't thought about?
{EDIT}
Well I've managed to do it using this
Locking Camera to a Unit:
Creating Floating Texts:
Keeping Dummy 'Icons' In place, relating to unit's position.
Keeping texts in place, using unit location AND dummy unit's custom value.
What do you guys think?
I'm considering if this, in theory, would be possible...
Create a dummy unit with a 2D planar model, textured as a 'new resource'.
Every 0.01 game seconds, move this dummy unit to the centre of players camera view, offset by 450x and 850y (to keep it about 100 units to the left of the current gold resource icon).
Set the custom value of this unit to 0.
Create a floating point message, just to the right of the dummy unit displaying that dummy unit's custom value.
Increasing the custom value whenever the player gains this 3rd resource.
Decreasing the custom value whenever the player spends this 3rd resource.
In my current map, I currently have 2 resources: Gold is used as Metal, and Lumber is used as Gas. Food is still Food (well Energy). The third resource, will be Cash/Capital/Gold. And is only used for researches and upgrades. The player generates Cash/Capital/Gold every 30 seconds, an x amount for each Industry building he has.
What do you think? Any inherrent problems I havn't thought about?
{EDIT}
Well I've managed to do it using this
Locking Camera to a Unit:
-
lock camera
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Camera - Lock camera target for Player 1 (Red) to Footman 0005 <gen>, offset by (0.00, 0.00) using Default rotation
-
-
-
create floating texts
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Floating Text - Create floating text that reads (String((Custom value of Dummy Mithril 0000 <gen>))) at ((Position of Footman 0005 <gen>) offset by (225.00, 450.00)) with Z offset 0.00, using font size 8.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
-
Set floatingResources[1] = (Last created floating text)
-
Floating Text - Create floating text that reads (String((Custom value of Dummy Knowledge 0006 <gen>))) at ((Position of Footman 0005 <gen>) offset by (425.00, 450.00)) with Z offset 0.00, using font size 8.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
-
Set floatingResources[2] = (Last created floating text)
-
-
-
keep gold counters in place
-
Events
-
Time - Every 0.01 seconds of game time
-
-
Conditions
-
Actions
-
Unit - Move Dummy Mithril 0000 <gen> instantly to ((Position of Footman 0005 <gen>) offset by (175.00, 450.00))
-
Unit - Move Dummy Knowledge 0006 <gen> instantly to ((Position of Footman 0005 <gen>) offset by (375.00, 450.00))
-
-
-
keep floating texts in place and up to date
-
Events
-
Time - Every 0.01 seconds of game time
-
-
Conditions
-
Actions
-
Floating Text - Change the position of floatingResources[1] to ((Position of Footman 0005 <gen>) offset by (345.00, 575.00)) with Z offset 0.00
-
Floating Text - Change text of floatingResources[1] to (String((Custom value of Dummy Mithril 0000 <gen>))) using font size 8.00
-
Floating Text - Change the position of floatingResources[2] to ((Position of Footman 0005 <gen>) offset by (585.00, 575.00)) with Z offset 0.00
-
Floating Text - Change text of floatingResources[2] to (String((Custom value of Dummy Knowledge 0006 <gen>))) using font size 8.00
-
-
Last edited by a moderator: