User avatar
paw1776
Captain
Posts: 192
Joined: Thu Mar 26, 2009 5:29 am
Location: Melbourne, Australia
Contact: Website

Ship Replacements

Tue Jun 02, 2009 6:06 am

I was thinking of basing replacements of ships based on how many harbors the players own.

Would I be able to evaluate how many Harbors are say 5+ on the map owned by one side.

Not looking for exact code, but more of a hint on what to use.

I was thinking of using EvalRgnStuc, but not sure if I can do that for the whole map, or just regions.

User avatar
Pocus
Posts: 25673
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Tue Jun 02, 2009 9:18 am

You would have to run one such event per region tested. There is no command that get you the count of a particular structure on map, for now.

For each event triggered (you could test 30 harbors locations for example), the best way would be to raise the cuOccurs parameter of an event (which is never triggered by itself, it serves only as a variable). If the parameter reach 5, then another event triggers.
That's only a work-around, we would need variables that you can manipulate directly, but it is not done either.
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

Return to “Modding AGE engine games”

Who is online

Users browsing this forum: No registered users and 2 guests