You can use screen to world to get the center of your screen, not exactly the same as cursor target, but close.Code:_pos = screenToWorld [0.5,0.5];
tell me. If an alternative to the command "cursorTarget" for DayZ standalone. I'm trying to do something similar to AIM
You can use screen to world to get the center of your screen, not exactly the same as cursor target, but close.Code:_pos = screenToWorld [0.5,0.5];
_wPos = screenToWorld [0.5,0.5];
_pos = [(_wpos select 0) + random 5, (_wpos select 1) + random 5, 5];
_bullet = "B_22_Ball" createvehiclelocal _pos;
_bullet setVelocity [0, 0, -50000];
Try This
You can reduce the range it detects targets in by changing that number 20 to maybe like 5 or 10 if you need it to be more precise.Code:_CursorPos = screenToWorld [0.5,0.5]; _CursorTarget = nearestObjects [_CursorPos, ["SurvivorBase"], 20]; { _CursorTargetPos = getPos _x; _BulletPos = [(_CursorTargetPos select 0) + random 5, (_CursorTargetPos select 1) + random 5, 5]; _Bullet = "B_22_Ball" createvehiclelocal _BulletPos; _Bullet setVelocity [0, 0, -50000]; } foreach _CursorTarget;
Last edited by Mizzle420420; 11-12-2015 at 08:11 AM.
denis200191 (11-12-2015)
CursorTarget is disabled (commented out probably) in sa, you might be able to re-enable it through a .dll or some other memory manipulation.
Black (12-08-2015)
thanks for the advice. Thread can be closed
Closed upon request.
/Closed