Is it possible to remove effects from Objects using [remove_object]?

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
User avatar
pipapopinguin
Posts: 35
Joined: November 3rd, 2019, 10:36 am

Is it possible to remove effects from Objects using [remove_object]?

Post by pipapopinguin »

Code: Select all

[event]
    id=remove_object_one
    first_time_only=no
    name=side turn
    [remove_object]
	ability=oneability
	object_id=objectone
    [/remove_object]
[/event]
I want to remove the object, with the id "objectone", that gives the unit "oneability"(its the id for the ability), by just starting an event at side turn. The wikipage says I should not use [filter] with [remove_object], so I assume that I just have to wrirte "ability=oneability". Maybe I am just filtering wrong, but this code just wont work. How can I fix it?
Last edited by WhiteWolf on May 16th, 2021, 11:54 am, edited 1 time in total.
Reason: added [code] for readability
Author of Corpse Mod 2, Breeze-Mod,Reflections and don't click here.
User avatar
WhiteWolf
Forum Moderator
Posts: 769
Joined: September 22nd, 2009, 7:48 pm
Location: Hungary

Re: Is it possible to remove effects from Objects using [remove_object]?

Post by WhiteWolf »

Moved to WML Workshop.

This code looks good to me, unless I too am missing something, it should work like this.
[remove_object] indeed takes no [filter] tag, so this event should remove the objectone object from every unit that has the oneability at the time when the event fires.

If it doesn't work, can you go into a bit more detail of what you're doing? Show how and when you apply the object in the first place, as maybe something is wrong with that?
May also be easier if you attach your entire scenario and utils where these happen.
Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
User avatar
IIIO_METAL
Posts: 202
Joined: January 18th, 2017, 5:03 pm
Location: japan

Re: Is it possible to remove effects from Objects using [remove_object]?

Post by IIIO_METAL »

The syntax is correct, so maybe the value is wrong?
Or is it possible that object_id is not set?
By the way, these two are my recent mistakes. :lol:
Creator of "Mountain Witch" & "Castle of evil spirit"
Post Reply