Change/Clarification on how [object] works
Moderator: Forum Moderators
Change/Clarification on how [object] works
Due to recent changes, the way [object] works is now slightly different with respect to which unit is assigned the object.
Basically the first unit that matches the [filter] tag is awarded the object. If no unit matches the [filter] tag, then the 'cannot_use_message' is displayed (unless silent=yes is set).
The implication of this is you have to make the [filter] tag inside the [object] tag specify the co-ordinates of the unit that gets the item. This often means you will have to place the x,y co-ordinates inside a [filter] for a move event and for the object itself.
For instance, previously something like this would implement a storm trident:
Now you have to use this instead:
I've changed all the items in data/items.cfg over.
David
Basically the first unit that matches the [filter] tag is awarded the object. If no unit matches the [filter] tag, then the 'cannot_use_message' is displayed (unless silent=yes is set).
The implication of this is you have to make the [filter] tag inside the [object] tag specify the co-ordinates of the unit that gets the item. This often means you will have to place the x,y co-ordinates inside a [filter] for a move event and for the object itself.
For instance, previously something like this would implement a storm trident:
Code: Select all
[event]
name=moveto
first_time_only=no
[filter]
x,y=10,18
side=1
[/filter]
[object]
[filter]
type=Merman
[/filter]
...
[/object]
[/event]
Code: Select all
[event]
name=moveto
first_time_only=no
[filter]
x,y=10,18
side=1
[/filter]
[object]
[filter]
type=Merman
x,y=10,18
[/filter]
...
[/object]
[/event]
David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming