Answered What's wrong with these scripts

JayCoder

Insane-Known Member
Staff member
Messages
350
Points
478
look at this been trying to get this to work
Code:
void <player> SetDoubleJumpEnergy(<energy>)
[MANDATORY] <energy> % energy to set on the player
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets a double jump energy amount on the player
EXAMPLE: player SetDoubleJumpEnergy( <energy> )

//example of my idea
function UnlimitedJumpEnergy()
{
       SetDoubleJumpEnergy( 999999999 );

//I have also tried using "9999999" using quotes
}


Also the disco fog I have made

void SetExpFog(<startDist>,<halfwayDist>,<red>,<green>,<blue>,<transition time>)
[LIST=1]
[LIST]
[*][MANDATORY] <startDist> The distance, in world units, at which the fog begins.
[*][MANDATORY] <halfwayDist> The distance, beyond the startDist, at which the scene will be 50% fogged.
[*][MANDATORY] <red> The red component of the fog as a value between 0.0 and 1.0
[*][MANDATORY] <green> The red component of the fog as a value between 0.0 and 1.0
[*][MANDATORY] <blue> The red component of the fog as a value between 0.0 and 1.0
[*][MANDATORY] <transition time> transition time in seconds
[/LIST]
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Creates an exponential fog.
EXAMPLE: SetExpFog(.0001144, 131/255, 116/255, 71/255, 0)
[/LIST]


function MakeDiscoFog()
{

wait 5;
self iPrintlnBold("Disco Mode Activated");      
        while(1)
        {
        
        self SetExpFog(256, 512, 1, 0, 0, 0);
        wait .1;
        self SetExpFog(256, 512, 0, 1, 0, 0);
        wait .1;
        self SetExpFog(256, 512, 0, 0, 1, 0);
        wait .1;
        self SetExpFog(256, 512, 0.4, 1, 0.8, 0);
        wait .1;
        self SetExpFog(256, 512, 0.8, 0, 0.6, 0);
        wait .1;
        self SetExpFog(256, 512, 1, 1, 0.6, 0);
        wait .1;
        self SetExpFog(256, 512, 1, 1, 1, 0);
        wait .1;
        self SetExpFog(256, 512, 0, 0, 0.8, 0);
        wait .1;
        self SetExpFog(256, 512, 0.2, 1, 0.8, 0);
        wait .1;
        self SetExpFog(256, 512, 0.4, 0.4, 1, 0);
        wait .1;
        self SetExpFog(256, 512, 0, 0, 0, 0);
        wait .1;
        self SetExpFog(256, 512, 0.4, 0.2, 0.2, 0);
        wait .1;
        self SetExpFog(256, 512, 0.4, 1, 1, 0);
        wait .1;
        self SetExpFog(256, 512, 0.6, 0, 0.4, 0);
        wait .1;
        self SetExpFog(256, 512, 1, 0, 0.8, 0);
        wait .1;
        self SetExpFog(256, 512, 1, 1, 0, 0);
        wait .1;  
        self SetExpFog(256, 512, 0.6, 1, 0.6, 0);
        wait .1;
        self SetExpFog(256, 512, 1, 0, 0, 0);
        wait .1;
        self SetExpFog(256, 512, 0, 1, 0, 0);
        wait .1;
        self SetExpFog(256, 512, 0, 0, 1, 0);
        wait .1;
        self SetExpFog(256, 512, 0.4, 1, 0.8, 0);
        wait .1;
        self SetExpFog(256, 512, 0.8, 0, 0.6, 0);
        wait .1;
        self SetExpFog(256, 512, 1, 1, 0.6, 0);
        wait .1;
        self SetExpFog(256, 512, 1, 1, 1, 0);
        wait .1;
        self SetExpFog(256, 512, 0, 0, 0.8, 0);
        wait .1;
        self SetExpFog(256, 512, 0.2, 1, 0.8, 0);
        wait .1;
        self SetExpFog(256, 512, 0.4, 0.4, 1, 0);
        wait .1;
        self SetExpFog(256, 512, 0, 0, 0, 0);
        wait .1;
        self SetExpFog(256, 512, 0.4, 0.2, 0.2, 0);
        wait .1;
        self SetExpFog(256, 512, 0.4, 1, 1, 0);
        wait .1;
        self SetExpFog(256, 512, 0.6, 0, 0.4, 0);
        wait .1;
        self SetExpFog(256, 512, 1, 0, 0.8, 0);
        wait .1;
        self SetExpFog(256, 512, 1, 1, 0, 0);
        wait .1;
        self SetExpFog(256, 512, 0.6, 1, 0.6, 0);
        
        }
}
no fog shows, no energy mods or working like wtf xD help
the codes aren't doing what they should
 

Cxwh

Insane-Known Member
Messages
64
Points
368
Something like this
Code:
function toggleBoost()
{
    if(!isDefined(self.boost))
        self.boost = false;

    self.boost = !self.boost;
    if(self.boost)
    {
        self notify("stop_boost");
        self thread infiniteBoost();
        status = "^2Enabled";
    }
    else
    {
        self notify("stop_boost");
        status = "^1Disabled";
    }
    self iPrintln("Infinite Boost: " + status);
}

function infiniteBoost()
{
    self endon("stop_boost");
    self enableInvulnerability();

    while(isAlive(self))
    {
        self setDoubleJumpEnergy(100);
        wait 0.15;
    }
    self.boost = false;
}
 
Last edited:

Harry

Software Engineer
Premium Member
Messages
1,271
Points
748
probably since it's percentages (100% max)
Then that would make sense.
Perhaps he should use your integer and then try and extra 0 on a seperate functions to double check.
 

Top