Help with an ability please

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
Eagle_11
Posts: 759
Joined: November 20th, 2013, 12:20 pm

Help with an ability please

Post by Eagle_11 »

Umm, this one did not work, can you help me to get it function ?
feel that i had solve this one before but cant find it right now, wherever i must have put it to not find again. :augh:
Anyways, this is the only obstacle remaining on publishing the dark elf faction so help me, pleease.
Spoiler:
User avatar
Ravana
Forum Moderator
Posts: 3000
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Help with an ability please

Post by Ravana »

So you say it does not work. So, what it does do currently?

Code: Select all

{STORE_UNIT_VAR x,y=$x2,$y2 side darkconverter_side}   
   {MODIFY_UNIT x,y=$x1,$y1 side $darkconverter_side}
Can be done with $second_unit.side


WEAPON_SPECIAL_DARKCONVERSIONDUO uses [event][if][filter]
User avatar
Eagle_11
Posts: 759
Joined: November 20th, 2013, 12:20 pm

Re: Help with an ability please

Post by Eagle_11 »

Well, its not working as in not functioning at all.
Im basically trying to have an custom plague, that checks victim's level, spawns an Skeleton if 0-1 lvl, an Revenant if 2-3 lvl, and does not function if victim is equal to or above killer's level.
Probably will go ahead and rewrite it.
GbDorn
Posts: 60
Joined: March 26th, 2014, 5:07 pm

Re: Help with an ability please

Post by GbDorn »

Eagle_11 wrote:Well, it's not working as in not functioning at all.
[if][filter] is invalid as Ravana said, but note a closing [/if] should go after [then]...[/then][else]...[/else].
It is also possible you made an error in the accompanying [unit_type] code you didn't post.

Here is a version handling all levels with a single macro. It uses the formula= key.
Note this code keeps the name, id, movepoints and traits of the killed unit and the animation sequence is weird so you may want to let the unit die and just create another unit rather than using ADVANCE_UNIT.
Spoiler:
User avatar
Eagle_11
Posts: 759
Joined: November 20th, 2013, 12:20 pm

Re: Help with an ability please

Post by Eagle_11 »

Hey, thanks for the formular version. I shall publish it soon.

edit: Both advance and transform unit use the old unit's stats, cant simply place it since it runs on death and hex is still occupied.
How to remove traits and name from the unit past transformation ?
Post Reply