-
Notifications
You must be signed in to change notification settings - Fork 1
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
Adding Direct Vehicle Move waypoint #11
base: master
Are you sure you want to change the base?
Conversation
addons/waypoint/CfgWaypoints.cfg
Outdated
class Move_vehicle { | ||
displayName = CSTRING(Vehicle_Move_Name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vehicle Move
or Move Vehicle
, stringtable naming is inconsistent with class. Also use camelpascal case for this (VehicleMove or MoveVehicle)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually VehicleMove
or MoveVehicle
would be PascalCase
, not camelCase
.
* Return Value: | ||
* none | ||
* | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment does not follow the template, excess line between author and arguments.
(driver _vehicle) disableAI "Path"; | ||
(driver _vehicle) enableAI "Path"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this achieve? Does this reset pathfinding?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trying reset driver mostly in situationn where driver move vehicle super slowly after hitting object or moving super slowly in turning to waypoint
_driver setVariable ["lambs_danger_disableAI", true]; | ||
(group _driver) setVariable ["lambs_danger_disablegroupAI", true]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should save and restore values of these variables after the waypoint is completed.
addons/waypoint/script_component.hpp
Outdated
@@ -0,0 +1,15 @@ | |||
#define COMPONENT waypoint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally I think plural would be more in-place for component concerning (possibly) multiple waypoints.
#define COMPONENT waypoint | |
#define COMPONENT waypoints |
Keep in mind renaming folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, do not forget to change pboprefix and folder names too.
|
||
if !(local _group) exitwith {false}; | ||
|
||
//vehicle list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary comment, it's obvious what _vehicles = [];
means.
//vehicle list |
addons/waypoint/README.md
Outdated
## Waypoint | ||
|
||
Waypoints: | ||
- Vehicle Move - Order vehicle to move in strain line to target ignoring AI orders and situation. waypoint create pool of vehicles where group units are driver and create new group per vehicle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should keep one empty line before and after any list in Markdown. Plus some spelling fixes.
I'm not sure what that does mean, so if my suggestion doesn't apply, please fix that.
Waypoint creates pool of vehicles where group units are driver and create new group per vehicle
## Waypoint | |
Waypoints: | |
- Vehicle Move - Order vehicle to move in strain line to target ignoring AI orders and situation. waypoint create pool of vehicles where group units are driver and create new group per vehicle | |
## Waypoints | |
New Waypoints: | |
- Vehicle Move - Orders vehicles to move in straight line to the waypoint position, ignoring AI orders and situation. Splits the original group to one group per vehicle for the duration of the move. |
fast fixes from review Co-authored-by: Filip Maciejewski <[email protected]>
private _point1 = _vehicle getrelpos [2,0]; | ||
private _point2 = _vehicle getrelpos [3,0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please review your whole code for such cases, there's plenty of them. Please stick to camelCase/the same casing as on Biki.
private _point1 = _vehicle getrelpos [2,0]; | |
private _point2 = _vehicle getrelpos [3,0]; | |
private _point1 = _vehicle getRelPos [2,0]; | |
private _point2 = _vehicle getRelPos [3,0]; |
[{ | ||
//condition | ||
params ["_vehicle","_group"]; | ||
if !(waypointScript [_group,currentWaypoint _group] == QPATHTOF(functions\fnc_moveVehicleWP.sqf)) exitwith {true}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if next waypoint is the same? Will there be 2 competing scripts? I don't see a valid reason for checking waypointScript
. The only thing that should matter is active waypoint number (you could pass it as an argument to WUAE to have the old value for comparison).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but waypoint gonna end only when WUAE is complete, so new wuae gonna be created for next waypoint
and this is to complete WUAE after ZEUS change Waypointype
edit. In arma 2.18 gonna be a option to replace it by passing _ThisScript to WUAE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Relevant FT ticket: https://feedback.bistudio.com/T183544
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, can be resolved then.
A general comment from me would be to rethink how your waypoint function is composed.
|
_vehicle setvariable [QGVAR(ActiveVehicleMove),false]; | ||
},[_vehicle],0.2] call cba_fnc_waitAndExecute; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep a space after ,
. Also multiple occurrences.
_vehicle setvariable [QGVAR(ActiveVehicleMove),false]; | |
},[_vehicle],0.2] call cba_fnc_waitAndExecute; | |
_vehicle setvariable [QGVAR(ActiveVehicleMove), false]; | |
}, [_vehicle], 0.2] call cba_fnc_waitAndExecute; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see veteran spared his time writing such comments and will have you fix all the issues that will be automatically reported by updated HEMTT. 🤣
@CommandDDOS please switch to HEMTT 1.3, I've merged master to your PR branch. |
New Waypoint Vehicle Direct Move
Waypoint force vehicle drivers to move directly to waypoint position by setDriveOnPath
Waypoint create new groups for each driver in original group and assign them waypoint for better ability to control in zeus.