Home   Help Search Login Register  

Author Topic: Weird one.. I made a passive vehicle turbo script that works great, but anotherq  (Read 1015 times)

0 Members and 1 Guest are viewing this topic.

Offline Acecool

  • Members
  • *
Ok, I made a script that is run on a vehicle... basically turbos the car making it accelerate faster than it normally would and ALWAYS on the vehicle...

It disengages when the user starts slowing down, reengages when they speed up..

How can you see when someone is holding the FAST FORWARD button or TURBO button down, the one that makes the cars go faster?

I want to integrate that into this script :-)

Offline Gcfungus

  • Members
  • *
There's a script resouce in the editing department. It can detect keyboard input on certain keys, one of them being 'E', and if that's what you mean then you could use it.
The tutorial
Hope that helps  :good:
-=GC=-Fungus1999
The object of war is not to die for your country, but to make the other bastard die for his.
~George Patton

Offline Acecool

  • Members
  • *
Cool, I actually wanted to use shift for turbo, but oh well... I changed my script so its called like so:

This is for the Sports Car in Resistance :-)
init="[this,195,0.85,115,35,7.25] exec ""Scripts\Cars\TurboScript.sqs""";

The Car
195 Top speed that can be achieved with turbo
0.85 How much oomphf the turbo gives
115 Speed cut... when you are under this and you apply the brakes the turbo disengages
35 Turbo cut on.. this is the minimum speed you must be at for the turbo to kick in :-)
7.25 Speed cut - if you are above the 115mph speed cut speed then you have to slow down this much in about a second for the turbo to cut off (so taking turns doesnt kill it)



Also , let me tell you it is a LOT of fun driving the skoda when it is fast as heck lol....
Code: [Select]
class Item24
{
position[]={8064.514648,11.919685,5345.984375};
id=38;
side="EMPTY";
vehicle="Skoda";
skill=0.600000;
init="[this,135,0.35,75,35,3.25] exec ""Scripts\Cars\TurboScript.sqs""";
};
class Item25
{
position[]={8085.270996,11.919449,5345.972656};
id=39;
side="EMPTY";
vehicle="RapidY";
skill=0.600000;
init="[this,145,0.35,85,35,5.25] exec ""Scripts\Cars\TurboScript.sqs""";
};
class Item26
{
position[]={8088.960449,11.919472,5345.973633};
id=40;
side="EMPTY";
vehicle="RapidY";
skill=0.600000;
init="[this,170,0.55,100,35,6.25] exec ""Scripts\Cars\TurboScript.sqs""";
};
class Item27
{
position[]={8068.575684,11.919685,5345.984375};
id=41;
side="EMPTY";
vehicle="Skoda";
skill=0.600000;
init="[this,160,0.48,95,35,3.25] exec ""Scripts\Cars\TurboScript.sqs""";
};
class Item28
{
position[]={8072.634766,11.919685,5345.984375};
id=42;
side="EMPTY";
vehicle="Skoda";
skill=0.600000;
init="[this,180,0.74,110,35,3.25] exec ""Scripts\Cars\TurboScript.sqs""";
};
class Item29
{
position[]={8092.651855,11.919479,5345.974121};
id=43;
side="EMPTY";
vehicle="RapidY";
skill=0.600000;
init="[this,195,0.85,115,35,7.25] exec ""Scripts\Cars\TurboScript.sqs""";
};
« Last Edit: 08 Aug 2008, 23:48:37 by Acecool »

Offline dr. seltsam

  • Members
  • *
hi,

i made a little keyboard detector...
It uses a camera exploit that was found by a guy named hardrock.

I have no readme file yet, but it is easy to use. Put the folder - Keyboard - into your mission folder, then execute the following file:

0.1 exec "Keyboard\Keyboard_Check.sqs"

0.1 stands for 0.1 seconds time delay, you can make the check faster or slower, depending on how much performance you have left.
If you hit your keyboard buttons, the script will set several boolean values to true, if you release them, set them back to false:

Button:                                   Boolean:

forward                                   kb_W
fast forward                             kb_E
walk backwards                        kb_S
walk left                                  kb_A
walk right                                kb_D
turn left                                  kb_X
turn right                                 kb_C
crouch                                    kb_Q
lay down                                 kb_Y

The script can also detect several key combinations, but not all. In your script you can use an expression like:

? kb_E : do the turbo stuff

Download the demo mission for desert island. If you have questions, i will try to answer here.
:)  :)
« Last Edit: 08 Aug 2008, 23:59:45 by dr. seltsam »