changing all terrain hexes a unit passes over
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.
changing all terrain hexes a unit passes over
is it possible to change the terrain that a unit passes over as the unit passes over the hex.
so for instance if i have a unit that can move 5 hexes i want it to change all 5 hexes it passed into sand. how could i get it to turn only the hexes the unit touched into sand?
i'll try and illustrate what i mean X will be the hex O will be the unit and it's path.
starting point:
OXXXXXXX
XXXXXXXX
XXXXXXXX
XXXXXXXX
first hex passed over:
OXXXXXXX
XOXXXXXX
XXXXXXXX
XXXXXXXX
second hex passed over:
OXXXXXXX
XOOXXXXX
XXXXXXXX
XXXXXXXX
third hex passed over:
OXXXXXXX
XOOXXXXX
XXXOXXXX
XXXXXXXX
fourth hex passed over:
OXXXXXXX
XOOXXXXX
XXXOOXXX
XXXXXXXX
ending point:
OXXXXXXX
XOOXXXXX
XXXOOXXX
XXXXXOXX
so how do i get all those O's to change into sand considering (to the best of my knowledge) a moveto event only triggers for the last hex the unit hits?
so for instance if i have a unit that can move 5 hexes i want it to change all 5 hexes it passed into sand. how could i get it to turn only the hexes the unit touched into sand?
i'll try and illustrate what i mean X will be the hex O will be the unit and it's path.
starting point:
OXXXXXXX
XXXXXXXX
XXXXXXXX
XXXXXXXX
first hex passed over:
OXXXXXXX
XOXXXXXX
XXXXXXXX
XXXXXXXX
second hex passed over:
OXXXXXXX
XOOXXXXX
XXXXXXXX
XXXXXXXX
third hex passed over:
OXXXXXXX
XOOXXXXX
XXXOXXXX
XXXXXXXX
fourth hex passed over:
OXXXXXXX
XOOXXXXX
XXXOOXXX
XXXXXXXX
ending point:
OXXXXXXX
XOOXXXXX
XXXOOXXX
XXXXXOXX
so how do i get all those O's to change into sand considering (to the best of my knowledge) a moveto event only triggers for the last hex the unit hits?
Re: changing all terrain hexes a unit passes over
so i guess since no one has responded yet that what I've asked is impossible to do.
sorry about the double post.
sorry about the double post.
-
- Posts: 10
- Joined: June 5th, 2009, 3:38 pm
Re: changing all terrain hexes a unit passes over
That's a shame, cause it sounds like a really interesting idea.
- beetlenaut
- Developer
- Posts: 2825
- Joined: December 8th, 2007, 3:21 am
- Location: Washington State
- Contact:
Re: changing all terrain hexes a unit passes over
Yeah. The game doesn't store the exact hexes of a unit's path, and you can't make something happen while a unit is moving.Huston wrote:what I've asked is impossible to do.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
Re: changing all terrain hexes a unit passes over
I´m not the wisest person around about wml, but in the past i was in the need of the same WML filter, and i was told by zookeeper that he already suggested a wml filter that would make what you suggest work. It just seems nobody did the coding yet, but i think it´s it´s on the ¨wanted things¨ for a few years, it should be complicated if nobody implemented it yet because this is something that a lot of modders would benefit off.
Re: changing all terrain hexes a unit passes over
This is not possible yet, but has been on the wiki/FutureWML page for a long time.
I agree that it is a needed feature... I haven't had much spare coding time lately unfortunately.
I agree that it is a needed feature... I haven't had much spare coding time lately unfortunately.
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
Re: changing all terrain hexes a unit passes over
ok...thanks for the info guys.