SOLVED: Walking Corpses SUBMERGED Upon Spawning?

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
Posts: 378
Joined: November 17th, 2010, 6:24 pm
Location: An icy dungeon beneath Antarctica

SOLVED: Walking Corpses SUBMERGED Upon Spawning?

Post by Pewskeepski »


I have an event in the scenario I'm currently working on that causes a random amount of walking corpses to spawn on deep water hexes (Wot). The problem, however, is that the player can see them, even though they're all in deep water, with deep water adjacent hexes, and I want them to make use of their submerge ability as soon as they've spawned. Basically, I want them to spawn in a submerged state and not be seen by the player until they move to terrain that reveals them (shallow water, in this case).

I've exhausted some ideas, but I can't find much about making units submerged upon spawning, so I figured I'd ask here. I'm using Wesnoth 15.9.

Here's the code:

Code: Select all

        num_items={ON_DIFFICULTY 40 50 60}


            {RANDOM (swimmer,drake,none)}

            {LOYAL_UNIT 2 (Walking Corpse) $undead_spawn.x $undead_spawn.y}

    {CLEAR_VARIABLE undead_spawn}
Edit: SOLVED! Turns out, Walking Corpses and Soulless don't have the SUBMERGE ability, only Skeleton units :|
"Everything is better with penguins."
Creator of Burning Souls, The Fall of Wesnoth (abandoned) and Adventures of Knighthood (now available on BfW 1.15!)
Post Reply