I want to spawn Dwarf Zombie in a certain location...***RESOLVED***

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
Misaghhhh
Posts: 6
Joined: April 14th, 2023, 4:50 pm

I want to spawn Dwarf Zombie in a certain location...***RESOLVED***

Post by Misaghhhh »

Hi everyone, english is not my native language so i'm sorry if i'm making any grammar mistake.

I want to spawn Dwarf Zombie in a certain location but i dont know its id Name.

I know Dwarf Zombie is a variation of Walking Corpse...

but how can i spawn it by using this code:

{ANL_PLACE_UNIT 6 "defpl_Corpse_Walking" $x1 $y1}

what i must replace "defpl_Corpse_Walking" with so Dwarf Zombie spawn ?

Thanks. :)
Last edited by Misaghhhh on April 18th, 2023, 2:58 pm, edited 2 times in total.
User avatar
Straff
Posts: 87
Joined: September 27th, 2020, 2:53 pm

Re: I want to spawn Dwarf Zombie in a certain location

Post by Straff »

https://www.wesnoth.org/macro-reference.html

Code: Select all

 RECRUIT_UNIT_VARIATIONS SIDE TYPE VARIATIONS_VALUE

    Allows a side to seemingly recruit variations of a given unit, such as the the Walking Corpse.

    An example which makes side 2 have a 50% chance of getting a normal WC and a 50% chance of getting either a drake or dwarf variation:

        Select All

     {RECRUIT_UNIT_VARIATIONS 2 "Walking Corpse" none,none,drake,dwarf}


EDIT:
That should do the trick:

Code: Select all

{ANL_PLACE_UNIT 6 "defpl_Corpse_Walking" $x1 $y1}
{VARIATION dwarf}
User avatar
Misaghhhh
Posts: 6
Joined: April 14th, 2023, 4:50 pm

Re: I want to spawn Dwarf Zombie in a certain location

Post by Misaghhhh »

Thanks Straff, its exactly what i wanted. :D
Post Reply