They Are Billions

They Are Billions

Custom Levels for They Are Billions
Add custom levels to They Are Billions by subscribing to these workshop items!
Learn More
chabz Nov 22, 2018 @ 4:38pm
Variables and Funcations
I just saw we got an update to start using the variables and functions tab. Is there any material I can read to better understand? Can I take a variable and plug it into a "give entities" script? Say I wanted to check how many rangers someone has on day 10 and then I want to give them the same number of rangers as a gift. I am aware of the custom variable where i'd use the system function Count(EntityType) with the EntityType listed as Ranger and I know i'll need to call that variable later but I'm not sure how exactly to do it. Say my Custom User Variable was called "QuantityRanger" could you tell me where to plug that in to then generate that same # of rangers?

Thank you
Last edited by chabz; Nov 22, 2018 @ 4:38pm
< >
Showing 1-5 of 5 comments
Numantian Games  [developer] 1 Nov 23, 2018 @ 12:21am 
Hi, actually you cannot write ZXCode outside the ZXCode fields.
Anyway you could create several GiveResources actions with different conditions like:
Count(Ranger)>10 && Count(Ranger)<=20 // Give bonus 10 Rangers....
chabz Nov 24, 2018 @ 5:51pm 
Thank you for your response. Do you plan to expand the ZXCode to other sections of the editor or expand the available options in the ZXCode?
chabz Nov 25, 2018 @ 8:12pm 
Hello

I noticed there is a field for infected units that is called "Display Icon on Minimap." Can I make this field true or false using ZXCode? Can I also make this possible for "RuinTreasureA_TM" and the other ruins?

I was able to solve my ranger issue earlier using the information you provided me.

Thank you again
Last edited by chabz; Nov 25, 2018 @ 8:14pm
Numantian Games  [developer] 1 Nov 25, 2018 @ 11:57pm 
Hi! For the entities on the map you want to show an icon on the minimap, just set the check Show In Minimap in the entity properties, for example a unit, infected, or pickable item (wood, stone...).

And yes, the ZXCode and the scripts will be expanded with time following the community feedback and our own ideas.
chabz Nov 26, 2018 @ 5:03am 
Thanks again! Please consider expanding the ZXCode to include the "Display Icon on Minimap" as an option. I would love to be able to trigger an event that enables this setting through ZXCode instead of it being enabled throughout the entire game.
< >
Showing 1-5 of 5 comments
Per page: 15 30 50