Change/Clarification on how [object] works

Discussion and development of scenarios and campaigns for the game.

Moderator: Forum Moderators

Post Reply
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Change/Clarification on how [object] works

Post by Dave »

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:

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]
Now you have to use this instead:

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]
I've changed all the items in data/items.cfg over.

David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
Post Reply