Jump to content

Help with GEMC/LUSCH Vehicle Power Script


Micky Doctorow
 Share

You are about to reply to a thread that has been inactive for 80 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I got a script that allows you to change the amount of power any GEMC or LUSCH Vehicle has from the creator of the LUSCH and GEMC car scripts but he is always busy and there is a small problem with the script where it will not recognize Reverse or Neutral. BeckHan replied this:

"[2024/01/16 03:36] BeckHan Ra: (Saved Tue Jan 16 00:32:08 2024)eh just add gear check, this ***** can be done by a 8 year old, as the rest of that code"

I am no scripter so asking the community for help; on this one. Here is the script, so if someone knows what BeckHan is talking about please fix it and post the script here.

 

float force = 5000;

default
{
link_message(integer sender, integer number, string message, key id)
{
if(message == "start"){llSetTimerEvent(0.1);}

if((message == "stop")||(message == "stop_eng")||(message == "engine"))
{llSetTimerEvent(0.0);}
}

timer()
{llApplyImpulse(<force, 0,0>, TRUE);}

}
 

 

- Sincerely Thanks,

- Micky The MADDOG

Link to comment
Share on other sites

Well, the attitude is certainly that of an 8-year old ...

You'll need to look through the other scripts to find out how to determine which gear, then in the above script, set force to 0.0 if in neutral, or -ve if in reverse.

Without the rest of the scripts nobody can help more that this much.

Link to comment
Share on other sites

The other scripts are no mod.

 

Not sure why he thought I would know what to do to finish making the script function right by shifting gears. But I'm sure someone may know, maybe someone with experience with GEMC/LUSCH/ZAMANI vehicles?

 

- M

 

Edited by Micky Doctorow
Link to comment
Share on other sites

Inside the link message event it's checking for certain messages. I guess there's probably a reverse message that comes in or something

You can probably figure out what message you need to handle by having the script say the message and then putting your car in reverse and seeing what is said.

  • Like 1
Link to comment
Share on other sites

My pal Scissors figured it out. So if anyone wants a copy for their vehicle here ya go. Adjust the Float Power accordingly.

 

//start_unprocessed_text
/*float force = 5000;
integer switch;
default
{
link_message(integer sender, integer number, string message, key id)
{
    if(message == "shift")
    {
        if(number == 0) /|/trans locked
        {
            switch = FALSE;
        }
        if(number == 1) /|/reverse 
        {
            switch = FALSE;
        }
        if(number == 2) /|/neutral 
        {
            switch = FALSE;
        }
        if(number == 3) /|/1st
        {
            switch = TRUE;
        }
        if(number == 4) /|/2nd
        {
            switch = TRUE;
        }
        if(number == 5) /|/3rd
        {
            switch = TRUE;
        }
        if(number == 6) /|/4th
        {
            switch = TRUE;
        }
    }
    if(message == "start")
    {
        if(switch == TRUE)
        {
            llSetTimerEvent(0.1);
        }
    }
    if((message == "stop")||(message == "stop_eng")||(message == "engine"))
    {
        if(switch == TRUE)
        {
            llSetTimerEvent(0.0);
        }
    }
}

timer()
{
    llApplyImpulse(<force, 0,0>, TRUE);}
}
*/
//end_unprocessed_text
//nfo_preprocessor_version 0
//program_version Firestorm-Releasex64 6.6.14.69596 - Scissorlips
//last_compiled 02/07/2024 03:46:23
//mono


float force = 5000;
integer switch;
default
{
link_message(integer sender, integer number, string message, key id)
{
    if(message == "shift")
    {
        if(number == 0) 
        {
            switch = FALSE;
        }
        if(number == 1) 
        {
            switch = FALSE;
        }
        if(number == 2) 
        {
            switch = FALSE;
        }
        if(number == 3) 
        {
            switch = TRUE;
        }
        if(number == 4) 
        {
            switch = TRUE;
        }
        if(number == 5) 
        {
            switch = TRUE;
        }
        if(number == 6) 
        {
            switch = TRUE;
        }
    }
    if(message == "start")
    {
        if(switch == TRUE)
        {
            llSetTimerEvent(0.1);
        }
    }
    if((message == "stop")||(message == "stop_eng")||(message == "engine"))
    {
        if(switch == TRUE)
        {
            llSetTimerEvent(0.0);
        }
    }
}

timer()
{
    llApplyImpulse(<force, 0,0>, TRUE);}
}

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 80 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...