show_objectives consufion
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.
- Spannerbag
- Posts: 535
- Joined: December 18th, 2016, 6:14 pm
- Location: Yes
show_objectives consufion
Hi,
I'm puzzled as to why show_objectives isn't working as I'd expect.
I have a scenario with multiple sides, side 1 is player, side 2 is initially null and the other sides are ai controlled.
My issue is that show_objectives doesn't seem to update side 1 objectives.
Here are the relevant code snippets:
Initial side setup:
side 1:
side 2:
Objectives setup:
Later in the scenario side 2 is populated with units and is transferred to player control.
(I use
This all works fine for side 2 but side 1 does not refresh?
I tried adding a second [show_objectives] for side 1 the turn after the changes to side 2 are applied:
No change.
Before I start spending a lot of time trying to bottom this out I have to ask: have I done something stupid?
Often, when I post something I realise the error shortly after so here's hoping that happens here!
Any advice greatly appreciated,
cheers!
-- Spannerbag
I'm puzzled as to why show_objectives isn't working as I'd expect.
I have a scenario with multiple sides, side 1 is player, side 2 is initially null and the other sides are ai controlled.
My issue is that show_objectives doesn't seem to update side 1 objectives.
Here are the relevant code snippets:
Initial side setup:
side 1:
controller=human
side 2:
controller=null
Objectives setup:
Code: Select all
[event]
name=start
[objectives]
side=1,2
[objective]...
Later in the scenario side 2 is populated with units and is transferred to player control.
(I use
side 1 turn end turn x
because at this point side 2 controller=null, so side turn 2 events do not fire)Code: Select all
[event]
name=side 1 turn {ON_DIFFICULTY 7 8 9} end
...
recall units
...
[modify_side]
side=2
controller=human
gold=130
income=2
hidden=no
[/modify_side]
...
[show_objectives]
[/show_objectives]
[/event]
I tried adding a second [show_objectives] for side 1 the turn after the changes to side 2 are applied:
Code: Select all
# Refresh side 1 objectives turn after side 2 controller change
[event]
name=side 1 turn {ON_DIFFICULTY 8 9 10}
[show_objectives]
side=1
[/show_objectives]
[/event]
No change.
Before I start spending a lot of time trying to bottom this out I have to ask: have I done something stupid?
Often, when I post something I realise the error shortly after so here's hoping that happens here!
Any advice greatly appreciated,
cheers!
-- Spannerbag
- Lord-Knightmare
- Discord Moderator
- Posts: 2363
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Re: show_objectives consufion
[show_objectives]
works when the starting objectives was changed due to some event/condition.Your initial objectives needs to have this added otherwise,
[show_objectives]
will do nothing.Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
- Spannerbag
- Posts: 535
- Joined: December 18th, 2016, 6:14 pm
- Location: Yes
Re: show_objectives consufion
Hi,
thanks for the reply, much appreciated.
Also, as often happens when I post a query I stumbled across a solution (see next post)
Thanks again,
cheers!
-- Spannerbag
thanks for the reply, much appreciated.
So, if I understand you, I need to addLord-Knightmare wrote: ↑May 3rd, 2021, 3:55 pm[show_objectives]
works when the starting objectives was changed due to some event/condition.
Your initial objectives needs to have this added otherwise,[show_objectives]
will do nothing.
[show_objectives]
sometime after setting up [objectives]
for the first time?Also, as often happens when I post a query I stumbled across a solution (see next post)
Thanks again,
cheers!
-- Spannerbag
- Spannerbag
- Posts: 535
- Joined: December 18th, 2016, 6:14 pm
- Location: Yes
show_objectives consufion *** resolved ***
Hi all,
no need to reply to my query as I managed to get it working.
Though I thought I'd tried this before, I just stripped out all the
Happy days
Cheers!
-- Spannerbag
no need to reply to my query as I managed to get it working.
Though I thought I'd tried this before, I just stripped out all the
side=...
clauses (including [objectives]
) and it worked.Happy days
Cheers!
-- Spannerbag