Execute_ModifyStatRangeWithObjectTag
Description
Adds a stat value to all nearby game objects that have a matching ObjectTag, within the specified range from the BaseObject.
Parameters
| Parameter | Description |
|---|
| BaseObject | The entity used as the origin point for the range check |
| S1 | Stat name to modify on matching objects |
| S2 | ObjectTag that target objects must have |
| F1 | Amount of stat to add (negative values are allowed) |
| F2 | Maximum 2D distance (radius) from the BaseObject's location |
Examples
| Description | BaseObject | Command | S1 | S2 | F1 | F2 |
|---|
| Add 10 Hungry to all "FoodItem" objects within 300 of Self | Self | ModifyStatRangeWithObjectTag | Hungry | FoodItem | 10 | 300 |
| Subtract 5 Energy from all "Machine" objects within 500 of Target | Target | ModifyStatRangeWithObjectTag | Energy | Machine | -5 | 500 |
| Add 1 Cleanliness to all "Furniture" objects within 200 of Self | Self | ModifyStatRangeWithObjectTag | Cleanliness | Furniture | 1 | 200 |