ACE3/addons/interaction/functions/fnc_push.sqf

27 lines
506 B
Plaintext
Raw Normal View History

2015-01-11 19:32:51 +00:00
/*
* Author: KoffeinFlummi
* Pushes a boat away from the player
2015-01-11 19:32:51 +00:00
*
* Arguments:
* 0: Boat <OBJECT>
2015-09-28 12:35:05 +00:00
* 1: Unit <OBJECT>
2015-01-11 19:32:51 +00:00
*
* Return Value:
* None
*
* Example:
2015-08-11 03:08:13 +00:00
* [Boats, Jose] call ace_interaction_fnc_push
*
* Public: No
2015-01-11 19:32:51 +00:00
*/
2015-01-11 23:13:47 +00:00
#include "script_component.hpp"
2015-01-11 19:32:51 +00:00
2015-09-28 12:35:05 +00:00
params ["_boat", "_unit"];
2015-01-11 19:32:51 +00:00
2015-09-28 12:35:05 +00:00
private "_newVelocity";
_newVelocity = vectorDir _unit;
_newVelocity set [2, 0.25];
_newVelocity = _newVelocity vectorMultiply 2;
2015-01-11 19:32:51 +00:00
2015-09-28 12:35:05 +00:00
["setVelocity", [_boat], [_boat, _newVelocity]] call EFUNC(common,targetEvent);