From [store_unit] to [recall]

The place to post your WML questions and answers.

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.
Post Reply
Edenray
Posts: 29
Joined: July 9th, 2024, 2:49 pm

From [store_unit] to [recall]

Post by Edenray »

Hi, due to the nature of the campaign I am building I have had to store units including the player in a variable at certain points in the story, after which I have had to resort to manually storing for the rest of the campaign.
Is this a bug or am I misunderstanding how to retrieve a variable stored unit.
An example would be..

Code: Select all

[store_unit]
      id="Arlo Again"
     variable=arlo_stored_banditcamp
[/store_unit]
..followed by..

Code: Select all

[unstore_unit]
    variable=arlo_stored_banditcamp
    x,y=1,2
[/unstore_unit]
..which works, as opposed to..

Code: Select all

[recall]
    id="Arlo Again"
    x,y=1,2
[/recall]
..which doesn't appear to do anything.

In the next scenario I have to [unstore] each unit as [recall] doesn't appear to be reacting to the stored variable.
Do I have to list the variable as well as the id, or should [recall] be working in it's basic form?
Thanks for any help
User avatar
Ravana
Forum Moderator
Posts: 3573
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: From [store_unit] to [recall]

Post by Ravana »

Unstore/store and recall have nothing to do with each other.
Edenray
Posts: 29
Joined: July 9th, 2024, 2:49 pm

Re: From [store_unit] to [recall]

Post by Edenray »

Thank you for the reply :)
So in order for [recall] to work I have to end the level normally, as in, if I have had to store a unit in order for it to go 'off stage', I must unstore the next scenario, but then end that same scenario normally and it should work again?
I have several scenarios where a surviving unit leaves the map before the end of the 'battle', so I have stored the unit, but in the next after but one stage I want it to be able to be recalled again.
This is probably a school boy error that has lingered through out my build so far that I wish to eliminate.
Thanks for any help!
User avatar
Ravana
Forum Moderator
Posts: 3573
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: From [store_unit] to [recall]

Post by Ravana »

You could unstore your units to recall list.
Edenray
Posts: 29
Joined: July 9th, 2024, 2:49 pm

Re: From [store_unit] to [recall]

Post by Edenray »

Aha! That sounds very likely, thank you Ravana, I will take a look :)
gnombat
Posts: 1102
Joined: June 10th, 2010, 8:49 pm

Re: From [store_unit] to [recall]

Post by gnombat »

Maybe you want [put_to_recall_list]?
User avatar
lhybrideur
Posts: 566
Joined: July 9th, 2019, 1:46 pm

Re: From [store_unit] to [recall]

Post by lhybrideur »

I think what Ravana mentions is to use x,y=recall,recall in unstore_unit
Post Reply