Object effects
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.
Object effects
Hello,
I'd like to include a couple of effects in an object:
1) The unit is automatically recalled in future scenarios. (Easiest way might be to change the unit's description whilst leaving user_description unaffected. Or can I assign a role to the unit?)
2) The unit gets an overlay marking the unit for future use.
Should I include this in the object WML or would it be easier to just have a moveto event for the same space?
I'd like to include a couple of effects in an object:
1) The unit is automatically recalled in future scenarios. (Easiest way might be to change the unit's description whilst leaving user_description unaffected. Or can I assign a role to the unit?)
2) The unit gets an overlay marking the unit for future use.
Should I include this in the object WML or would it be easier to just have a moveto event for the same space?
Re: Object effects
Well, you can filter for whatever you want in a [recall] already...you could even give the auto-recall units some dummy [object] and have a [recall] like this:Chris NS wrote:1) The unit is automatically recalled in future scenarios. (Easiest way might be to change the unit's description whilst leaving user_description unaffected. Or can I assign a role to the unit?)
Code: Select all
[recall]
side=1
[wml_filter]
[modifications]
[object]
id=mydummyobject
[/object]
[modifications]
[/wml_filter]
[/recall]
I don't quite follow. Where are you giving the [object] if not in a moveto event? And if you already have a moveto event, then is there a problem with doing unit modifications in it without an the [object]? And you could just put your stuff in the [then] tag too if you want it enclosed within the [object] tag.Chris NS wrote:Should I include this in the object WML or would it be easier to just have a moveto event for the same space?
Re: Object effects
The object is in a moveto event. However, there's a filter in the object restricting which units can take the object, so simply putting the effect in the [event] tag would be liable to apply the effect to a unit that can't take the object, which I don't want. Does that make sense?Where are you giving the [object] if not in a moveto event?
Anyway, now that I know that you can auto-recall this unit without having to do anything complex in the [object] tag, that just leaves adding the overlay. I'll experiment with the [object][effect] tag first and see if this gives me the effect I want.
Re: Object effects
Take a look at the solution by zookeeper here
http://www.wesnoth.org/forum/viewtopic.php?f=21&t=21536
http://www.wesnoth.org/forum/viewtopic.php?f=21&t=21536
That's ridiculous, dragons have no windows...
Re: Object effects
Yes, but there's no reason you'd need to make it work like that, so it's not a problem.Chris NS wrote:The object is in a moveto event. However, there's a filter in the object restricting which units can take the object, so simply putting the effect in the [event] tag would be liable to apply the effect to a unit that can't take the object, which I don't want. Does that make sense?Where are you giving the [object] if not in a moveto event?