Only one question so far...
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.
- Great_Mage_Atari
- Posts: 932
- Joined: July 26th, 2011, 5:07 pm
Only one question so far...
So I want to use a [move_unit_fake] tag, yet I have no idea where to begin from. I have to move a unit from one point to another at the beginning of the scenario. Now, I understand the fundamentals pretty well, yet I am not sure. Here is an example from The Rise of Wesnoth:
Now, given I want to use my own unit in place of the character here, how do I go about putting in a sprite (let's just say a bowman). What do I need to add and take out of the [move_unit_fake] tag for it to be able to move the bowman to where I want?
Also, how do I use this when placing a unit on the map at startup (like if I wanted to put a bowman on a castle hex by making him move there)? Do I use the same method, or a different one? I need both questions answered if anyone is willing.
Code: Select all
[move_unit_fake]
type=$lady_store.type
side=1
gender=female
x=8,8,8,8,8,7,7,6,6
y=30,29,28,27,26,26,25,24,23,22
[/move_unit_fake]
{VARIABLE lady_store.x 6}
{VARIABLE lady_store.y 22}
Also, how do I use this when placing a unit on the map at startup (like if I wanted to put a bowman on a castle hex by making him move there)? Do I use the same method, or a different one? I need both questions answered if anyone is willing.
- DEATH_is_undead
- Posts: 960
- Joined: March 4th, 2007, 3:00 pm
- Location: Northern United States
Re: Only one question so far...
Where it says type=, but Bowman (At least the exact ID of the unit, I didn't check.)Great_Mage_Atari wrote: Now, given I want to use my own unit in place of the character here, how do I go about putting in a sprite (let's just say a bowman). What do I need to add and take out of the [move_unit_fake] tag for it to be able to move the bowman to where I want?
Also, how do I use this when placing a unit on the map at startup (like if I wanted to put a bowman on a castle hex by making him move there)? Do I use the same method, or a different one? I need both questions answered if anyone is willing.
You need to put every x,y the unit crosses in the x= and y=, as well, in the order he moves in.
3P MP Scenario - Great Dwarves Escape
The best way to learn is to follow. In order to learn WML, you have to follow other's work, and check their codes.
The best way to learn is to follow. In order to learn WML, you have to follow other's work, and check their codes.
- Great_Mage_Atari
- Posts: 932
- Joined: July 26th, 2011, 5:07 pm
Re: Only one question so far...
Hey thanks! Got it to work finally.