Perhaps the easiest way to see it is just to plop a couple of them into a GUI trigger and then view the map script to see what they look like in custom script.
Depending on what you want, there is a more efficient way of doing this. If you only need to look up a region by name, not the name of a region, then you can use DataTableSetRegion(preset scope, string name, region value);
Then you can find the region by its name using DataTableGetRegion(preset scope, string name);
Using this method you can lookup regions by name without using a for loop. It's also easier to code. It does not allow you to lookup the string name of a given region though.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
@Nurdguy: Go
Oh. Isn't there already a function for that? RegionFromName(string name).
@Mugen245: Go
That's all in the DataTable trigger actions.
Perhaps the easiest way to see it is just to plop a couple of them into a GUI trigger and then view the map script to see what they look like in custom script.
@Nurdguy: Go
Depending on what you want, there is a more efficient way of doing this. If you only need to look up a region by name, not the name of a region, then you can use DataTableSetRegion(preset scope, string name, region value);
Then you can find the region by its name using DataTableGetRegion(preset scope, string name);
Using this method you can lookup regions by name without using a for loop. It's also easier to code. It does not allow you to lookup the string name of a given region though.