Change unit alignemnt

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

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 » June 12th, 2017, 10:30 am

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
Moderator
Posts: 1850
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Change unit alignemnt

Post by Ravana » June 12th, 2017, 10:47 am

Unit has key alignment, you can overwrite it.

User avatar
Bitron
Moderator
Posts: 439
Joined: October 19th, 2015, 9:23 am
Location: Germany

Re: Change unit alignemnt

Post by Bitron » June 12th, 2017, 10:57 am

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 » June 12th, 2017, 11:33 am

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: 464
Joined: October 28th, 2012, 1:58 pm
Location: Somewhere in the Northlands, fighting dark forces

Re: Change unit alignemnt

Post by James_The_Invisible » June 12th, 2017, 12:21 pm

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 » June 12th, 2017, 12:29 pm

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 » April 3rd, 2018, 4:38 pm

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