Capture event doesnt work any longer etc.

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
Ruglud
Posts: 135
Joined: August 22nd, 2012, 1:45 pm

Capture event doesnt work any longer etc.

Post by Ruglud »

Hi guys,

1. since the update to 1.12 my event doesnt work any longer. Hope you can help me with necessary changes.
The code is used to make my planes more realistic. They shall not be able to occupy villages.

Code: Select all

[event]
        name=capture
        first_time_only=no
        [filter]
            type="BFW Dewoitine"
        [/filter]
        [capture_village]
            x,y=$x1,$y1
            side=$owner_side
        [/capture_village]
        [allow_undo]
        [/allow_undo]
    [/event]
2. I give heal-ability to one unit, and I want to define the units which benefit from that ability. For example: Tanks shall not be able to benefit from a medic heal, only infantry. How can I write this and in which file?
Wenn Unrecht zu Recht wird, wird Widerstand zur Pflicht!

Nerdguygaming.tumblr.com
User avatar
Ravana
Forum Moderator
Posts: 3003
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Capture event doesnt work any longer etc.

Post by Ravana »

1)
Make sure your [filter] still matches.
Because of #23695 [Gna.org] you might want either

Code: Select all

      [filter_condition]
			[variable]
				name=side_number
				not_equals=$owner_side
			[/variable]
		[/filter_condition]
or remove [allow_undo]

2)
You can put it to any file you want as long as you include that file properly. Check if you want to heal unit can be done with [affect_adjacent][filter].
User avatar
Ruglud
Posts: 135
Joined: August 22nd, 2012, 1:45 pm

Re: Capture event doesnt work any longer etc.

Post by Ruglud »

1.) Thanks to you, my first problem is solved! :)

2.) Maybe you have some coding example for me, like above? It helps me to understand.
Wenn Unrecht zu Recht wird, wird Widerstand zur Pflicht!

Nerdguygaming.tumblr.com
User avatar
Ruglud
Posts: 135
Joined: August 22nd, 2012, 1:45 pm

Re: Capture event doesnt work any longer etc.

Post by Ruglud »

Thank you again, Ravana! That was helpful.
It seems I have to name you in credits or something, for helping me countless times. ;)
Wenn Unrecht zu Recht wird, wird Widerstand zur Pflicht!

Nerdguygaming.tumblr.com
Post Reply