[remove_object] bug?

Having trouble with the game? Report issues and get help here. Read this first!

Moderator: Forum Moderators

Forum rules
Before reporting issues in this section, you must read the following topic:
Post Reply
vghetto
Posts: 755
Joined: November 2nd, 2019, 5:12 pm

[remove_object] bug?

Post by vghetto »

Hi,

Say you have a unit with a bunch of custom defined [advancement] options that are not inside the [modifications] block, and the unit also has some unrelated [object]s defined inside the [modifications] block.

If you call [remove_object] on one of the objects, the entire [advancement] options list gets wiped out except for the base unit's default amla, if defined.
User avatar
octalot
General Code Maintainer
Posts: 786
Joined: July 17th, 2010, 7:40 pm
Location: Austria

Re: [remove_object] bug?

Post by octalot »

I can't find anything in the Wiki saying that putting [advancement] into SingleUnitWML is expected to work. Have you tried using EffectWML's apply_to=new_advancement?
vghetto
Posts: 755
Joined: November 2nd, 2019, 5:12 pm

Re: [remove_object] bug?

Post by vghetto »

I was writing the [advancement] blocks directly into unit.advancement via [set_variables] followed by [unstore_unit].

I rewrote it to use apply_to=new_advancement instead. This time [remove_object] didn't wipe out the list :)
thanks
Post Reply