Function that returns # of objects of a specific ID or Type?
- Shadow Wolf TJC
- Regular
- Posts: 1047
- Joined: 16 Apr 2011, 05:12
- Location: Raleigh, NC
Function that returns # of objects of a specific ID or Type?
I'm trying to figure out how to program scripts to perform certain actions depending on how many of a certain object ID, like, say, Hardened Sensor Towers, are present within a certain area, like, say, the entire map. This would not only allow AIs to make more flexible, more situational, choices, but would also be useful in, say, allowing modders to increase the number of HQs that a player can have on the field at a time, AND allow them to disable the design screen and minimap whenever the player has no HQs on the map (as opposed to disabling them whenever one of their HQs is destroyed).
Creator of Warzone 2100: Contingency!
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100
- Shadow Wolf TJC
- Regular
- Posts: 1047
- Joined: 16 Apr 2011, 05:12
- Location: Raleigh, NC
Re: Function that returns # of objects of a specific ID or T
Thanks. I'm now able to create scripts that can tell how many of a certain object are left. In fact, thanks to you, I was able to develop a new piece of code that would allow modders to increase the limit on how many HQs they can have on the map at any given time. See ticket 3465 for more information.
Creator of Warzone 2100: Contingency!
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100
Re: Function that returns # of objects of a specific ID or T
See also: viewtopic.php?f=35&t=9316
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
-- https://warzone.atlassian.net/wiki/display/GO