Help needed: giving units to players in MP scenario
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.
Help needed: giving units to players in MP scenario
Let's say that I wanted to do this for a MP scenario:
Give certain unit for every side depending on corresponding side's faction.
For example if player two was rebel I would give them a Wose. (in the point (x,y))
Where could I find the needed information or would someone have time to tell me how to do this. I'm not very familiar to WML see.
Thank you.
Give certain unit for every side depending on corresponding side's faction.
For example if player two was rebel I would give them a Wose. (in the point (x,y))
Where could I find the needed information or would someone have time to tell me how to do this. I'm not very familiar to WML see.
Thank you.
I don't think this is something that can reliably be done. You could check for the type of the side's leader (if the leader is one of Swordsman,Lieutenant,Pikeman,... the side would have to have Loyalists), but this isn't completely reliable, since for example in the default era, both Loyalists and Rebels have White Mage as a leader option. I can't think of any way to determine the side's faction as long as the player gets to choose it himself.
Theoretically, if the extra unit wouldn't need to be placed in the beginning, you could see what units the side recruits in addition to checking the leaders type, which would let you very, very likely determine the player's faction with a lot of [if]'s. This is completely theoretical rambling though, not a solution for you.
Theoretically, if the extra unit wouldn't need to be placed in the beginning, you could see what units the side recruits in addition to checking the leaders type, which would let you very, very likely determine the player's faction with a lot of [if]'s. This is completely theoretical rambling though, not a solution for you.
I haven't looked at Wesbowl's code for a long time, but it probably has a mechanism for determining this.
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
And I hate stupid people.
The World of Orbivm
Thanks for help.
I had already checked the Wesbowl's code without understanding it.
Then I managed to do a very-clumsy-but-working version and then I tried to understand the Wesbowl-code and managed that. Then I tidyed my own code and now it's much better. I ended to a lot like Wesbowl solution wich propably isn't a surprise.
zookeeper:(Why wasn't it a solution for me btw?)
I had already checked the Wesbowl's code without understanding it.
Then I managed to do a very-clumsy-but-working version and then I tried to understand the Wesbowl-code and managed that. Then I tidyed my own code and now it's much better. I ended to a lot like Wesbowl solution wich propably isn't a surprise.
zookeeper:(Why wasn't it a solution for me btw?)