Change unit alignemnt

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
Szturmowiec
Posts: 44
Joined: June 5th, 2017, 6:06 pm

Change unit alignemnt

Post by Szturmowiec »

Hello everyone,

I've got a problem with unit's alignment. I want to change the unit alignment to chaotic after it is recruited, but can't achieve that. Please help
That was the hell of a firefight. And the ammunition depleted so fast... I'm pinned down by those damned machine guns and don't know what to do next.
User avatar
Ravana
Forum Moderator
Posts: 2949
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Change unit alignemnt

Post by Ravana »

Unit has key alignment, you can overwrite it.
User avatar
Bitron
Developer
Posts: 453
Joined: October 19th, 2015, 9:23 am
Location: Germany

Re: Change unit alignemnt

Post by Bitron »

You could either use [modify_unit]-tag (see here) or the macro {MODIFY_UNIT FILTER VAR VALUE}
User avatar
Szturmowiec
Posts: 44
Joined: June 5th, 2017, 6:06 pm

Re: Change unit alignemnt

Post by Szturmowiec »

Ok, thanks, but I've already changed my plans, so I don't need to use it right now. :whistle:
That was the hell of a firefight. And the ammunition depleted so fast... I'm pinned down by those damned machine guns and don't know what to do next.
User avatar
James_The_Invisible
Posts: 534
Joined: October 28th, 2012, 1:58 pm
Location: Somewhere in the Northlands, fighting dark forces
Contact:

Re: Change unit alignemnt

Post by James_The_Invisible »

Just for the record, since 1.13.2, you can change it also via [object][effect].
User avatar
Szturmowiec
Posts: 44
Joined: June 5th, 2017, 6:06 pm

Re: Change unit alignemnt

Post by Szturmowiec »

That's what I tried, and since it is available from 1.13 it explains why it didn't work for me...
That was the hell of a firefight. And the ammunition depleted so fast... I'm pinned down by those damned machine guns and don't know what to do next.
User avatar
LordAndrew
Posts: 23
Joined: April 1st, 2018, 3:09 am
Location: Russia

Re: Change unit alignemnt

Post by LordAndrew »

all the work for you did :lol:

Code: Select all

[modify_unit]
[filter]
x,y=$x1,$y1
[/filter]
alignment=$your_alignment
[/modify_unit]
Post Reply