TKC-Community
Hacking and Art => Armed Assault 3 => Armed Assault 2 => Topic started by: Laxbrousa on June 26, 2012, 11:41:57 pm
-
How do I change a vehicles max speed in game with Medics MrMedicv1.0_p2 I'm hoping there is a way to change the vehicles max speed while I'm in it thanks and please help
Also please give some examples that would work Thanks Again!
-
That would be pretty cool if you could, but I dont know.
-
Umm this must be possible because Zargabad Life has a speed upgrade and a nitrous upgrade witch makes any car that the person uses the upgrade on move faster
-
Yes I was thinking myself it is. I think its serverside.. Well i know its serverside that the speed limit of vehicles are.. justl ike any server the car has a speedlimit not just life servers so yh. sorry bro but im not certain.. might be :3?.
-
For info check onKeypress.sqf from any mission that offers speed/nitro upgrades.
-
Umm this must be possible because Zargabad Life has a speed upgrade and a nitrous upgrade witch makes any car that the person uses the upgrade on move faster
It's not a matter of changing a vehicle's "max speed", what you would want to do is make your own key event and add to your velocity.
As XJ said,
//Left Shift key
case 42:
{
_vcl = vehicle player;
if(_vcl == player)exitwith{};
_nos = _vcl getvariable "nitro";
if(isEngineOn _vcl and !isnil "_nos") then
{
_vel = velocity _vcl;
_spd = speed _vcl;
_fuel = fuel _vcl;
_vcl setVelocity [(_vel select 0) * 1.01, (_vel select 1) * 1.01, (_vel select 2) * 0.99];
_vcl setfuel (_fuel - 0.0003);
};
};
That's the code they use, it's not hard to figure out how to increase it and make your own nos.
-
either use velocity *
or calculate your pos and dir and add a vector forward to it + length.
( there is a working example in the mod pack i released on here a few month ago )
-
either use velocity *
or calculate your pos and dir and add a vector forward to it + length.
( there is a working example in the mod pack i released on here a few month ago )
Can you give me the link
-
either use velocity *
or calculate your pos and dir and add a vector forward to it + length.
( there is a working example in the mod pack i released on here a few month ago )
Can you give me the link
Can you spoon feed me too Medic?
-
Binding this to W key would work.
_dir = getdir vehicle player;
_pos = getPos vehicle player;
_pos = [(_pos select 0)+2*sin(_dir),(_pos select 1)+2*cos(_dir)];
vehicle player setpos _pos;
-
Binding this to W key would work.
_dir = getdir vehicle player;
_pos = getPos vehicle player;
_pos = [(_pos select 0)+2*sin(_dir),(_pos select 1)+2*cos(_dir)];
vehicle player setpos _pos;
there you go.
-
Binding this to W key would work.
_dir = getdir vehicle player;
_pos = getPos vehicle player;
_pos = [(_pos select 0)+2*sin(_dir),(_pos select 1)+2*cos(_dir)];
vehicle player setpos _pos;
there you go.
So like //W key:
{
_dir = getdir vehicle player;
_pos = getPos vehicle player;
_pos = [(_pos select 0)+2*sin(_dir),(_pos select 1)+2*cos(_dir)];
vehicle player setpos _pos;
-
Have a look at the bottom of this page
http://community.bistudio.com/wiki/User_Interface_Event_Handlers
//Remove the EventHandlers...
(findDisplay 46) displayRemoveAllEventHandlers "KeyDown";
(findDisplay 12) displayRemoveAllEventHandlers "KeyDown";
keydown_function =
{
switch (_this) do
{
//Key press W
case 17:
{
nul = [] execVM "scripts\speedhax.sqf";
};
};
};
//Add an EventHandler to the main display...
waituntil {!isnull (finddisplay 46)};
(findDisplay 46) displayAddEventHandler ["KeyDown","_this select 1 call keydown_function;false;"];
//Add an EventHandler to the map...
waituntil {!isnull (finddisplay 12)};
(findDisplay 12) displayAddEventHandler ["KeyDown","_this select 1 call keydown_function;false;"];