Placing units on a terrain type
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Placing units on a terrain type
I would like to place units, more simply one type, more ideally random from a list, to multiple locations on a map. Basically there are several points that are being guarded, so I would like to place units via a few lines of code. Using a specific terrain type like in EI would work, I can't figure it out from the code, although it is nicely commented. This can all be done manually, but I'm curious if there is a more powerful way to do this. Thanks
Re: Placing units on a terrain type
I am fairly sure there is a scenario in Descent Into Darkness where landing on a village spawns goblins. If I remember correctly, it is the second mission.
Re: Placing units on a terrain type
I think what he meant was more along the lines of this. If not sorry.
P.S. It's tested now, and it works.
P.S. It's tested now, and it works.
Sorta on a break from the forums ATM, have been for a while. If I was doing something for/with you and I haven't recently, that's why, I will be back soon hopefully.
Re: Placing units on a terrain type
Well, you should be able to use the SCATTER_UNITS macro to achieve that.
Re: Placing units on a terrain type
Thanks for the answers, I think the code snippet from TheScribe should do the trick.