Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add targetUnitLevel description to the xsObjectHasAction #7

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/general/xs/functions.json
Original file line number Diff line number Diff line change
Expand Up @@ -1100,19 +1100,19 @@
"name": "targetPlayerID",
"type": "int",
"required": false,
"desc": "Check if the action is being performed on a unit (eg. attacking) of this player"
"desc": "Check if the action is being performed on a unit (eg. attacking) of this player. Can use -1 to ignore this filter."
},
{
"name": "targetType",
"type": "int",
"required": false,
"desc": "Check if the action is being performed on a unit of this type. Values 9xx refer to classes"
"desc": "Check if the action is being performed on a unit of this type. Values 9xx refer to classes. Can use -1 to ignore this filter."
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tbh, when testing it never worked with 9xx class values, only with specific id.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a bug, yes - its meant to work iirc

},
{
"name": "targetUnitLevel",
"type": "int",
"required": false,
"desc": "Unknown"
"desc": "Check if the action is being performed on a unit with this `Interface Kind` (look in the A.G.E.), eg: 3 - villagers, 4 - most military units. Can be used as an alternative to `targetType`. If both are used, will pick units that match either. Can use -1 to ignore this filter."
}
],
"desc": "Checks and returns if any unit matching the set filters of the given player has the specified action."
Expand Down
6 changes: 3 additions & 3 deletions docs/general/xs/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -961,9 +961,9 @@ Parameters:
1. `#!cpp int playerID`: The player to check unit actions for
2. `#!cpp int unitType`: The type of unit to check actions for. Values 9xx refer to classes
3. `#!cpp int actionId`: The type of action to check for
4. (Optional) `#!cpp int targetPlayerID`: Check if the action is being performed on a unit (eg. attacking) of this player
5. (Optional) `#!cpp int targetType`: Check if the action is being performed on a unit of this type. Values 9xx refer to classes
6. (Optional) `#!cpp int targetUnitLevel`: Unknown
4. (Optional) `#!cpp int targetPlayerID`: Check if the action is being performed on a unit (eg. attacking) of this player. Can use -1 to ignore this filter.
5. (Optional) `#!cpp int targetType`: Check if the action is being performed on a unit of this type. Values 9xx refer to classes. Can use -1 to ignore this filter.
6. (Optional) `#!cpp int targetUnitLevel`: Check if the action is being performed on a unit with this `Interface Kind` (look in the A.G.E.), eg: 3 - villagers, 4 - most military units. Can be used as an alternative to `targetType`. If both are used, will pick units that match either. Can use -1 to ignore this filter.

Checks and returns if any unit matching the set filters of the given player has the specified action.

Expand Down