Help : Total recall ?
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 : Total recall ?
Partial or total recall ?
1/ The disallow_recall=yes key prevents to player from recalling units from the previous scenario.
But, is it possible to prevent the player from recalling a specific type of units ?
For example if the player can recall Spearmen,Horseman and Bowman is there a way to prevent her/him from recalling spearmen ?
2/ Another question : Is it possible to erase the recall list ?
1/ The disallow_recall=yes key prevents to player from recalling units from the previous scenario.
But, is it possible to prevent the player from recalling a specific type of units ?
For example if the player can recall Spearmen,Horseman and Bowman is there a way to prevent her/him from recalling spearmen ?
2/ Another question : Is it possible to erase the recall list ?
Are you familiar with how [store_unit] works? If not, read it up on the wiki. Basically, to stop them from recalling a specific type of unit, store all of those units with kill=yes. Then, when the scenario is over, unstore them so they can use the units the next scenario.
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
You can do it with [store_unit]. [store_unit] will store units on the recall list as well as units on the battlefield.
You can use [filter] to target a specific type.
You must use kill=yes to prevent the player from accessing the unit (the units can be [unstore_unit]'ed later).
If you do this at the beginning of the scenario, you should not need to distinguish between units on the field vs on the recall list, but I think x,y=0,0 in the filter will only get units on the recall list.
You can use [filter] to target a specific type.
You must use kill=yes to prevent the player from accessing the unit (the units can be [unstore_unit]'ed later).
If you do this at the beginning of the scenario, you should not need to distinguish between units on the field vs on the recall list, but I think x,y=0,0 in the filter will only get units on the recall list.
Hope springs eternal.
Wesnoth acronym guide.
Wesnoth acronym guide.
Thanks your replies/help
Will try that.
Lets say you don't want to have the player's Horsemen recalled during a specific battle (they are on recon duty elsewhere).
Here is my intended scrip for partial recall of units :
In the scenario where you don't want Horsemen :
[event]
name=start
[store_unit]
[filter]
type=Horseman
side=1
[/filter]
variable=storedhorsemen
kill=yes
[/store_unit]
[/event]
And in the following scenario where you want the Horsemen back :
[event]
name=start
[unstore_unit]
variable=storedhorsemen
[/unstore_unit]
[/event]
Am I correct ? Thanks in advance for your help.
Will try that.
Lets say you don't want to have the player's Horsemen recalled during a specific battle (they are on recon duty elsewhere).
Here is my intended scrip for partial recall of units :
In the scenario where you don't want Horsemen :
[event]
name=start
[store_unit]
[filter]
type=Horseman
side=1
[/filter]
variable=storedhorsemen
kill=yes
[/store_unit]
[/event]
And in the following scenario where you want the Horsemen back :
[event]
name=start
[unstore_unit]
variable=storedhorsemen
[/unstore_unit]
[/event]
Am I correct ? Thanks in advance for your help.
No, I don't think it will. When you unstore them, you will have to do a {FOREACH} loop. I don't remember how to do that, but it's probably on the wiki somewhere. I'll look it up when I get back from school if no one has told you yet.
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
{FOREACH storedhorseman i}
[unstore_unit]
variable=storedhorseman[$i]
[/unstore_unit]
{NEXT i}
[unstore_unit]
variable=storedhorseman[$i]
[/unstore_unit]
{NEXT i}
Hope springs eternal.
Wesnoth acronym guide.
Wesnoth acronym guide.