View Single Post
Jerrythabest Jerrythabest's Avatar

JCF Member

Joined: Apr 2005

Posts: 2,602

Jerrythabest is a forum legendJerrythabest is a forum legendJerrythabest is a forum legend

Feb 2, 2013, 12:26 PM
Jerrythabest is offline
Reply With Quote
Quote:
Originally Posted by cooba View Post
Can't believe I haven't thought of this before, but something like onFirstTick() would be ideal for this purpose (and other purposes).
In fact, it's used in plusSurvivor.j2as.

plusSurvivor uses the following:
Code:
bool isLoaded = false;
void onMain(){
    if(!isLoaded){
        isLoaded = true;
        //jjChat your commands here
    }
}
But I figure this shorter version would work equally well:
Code:
void onMain(){
    if (jjGameTicks == 0){
        //jjChat your commands here
    }
}

Quote:
Originally Posted by DJazz View Post
Can I disable a special move, like uppercut/superjump?
You can disable Spazz's doublejump with
Code:
void onPlayer(){
    p.alreadyDoubleJumped = true;
}
I wonder whether Players have a STATE just like other objects. In that case, access to that could be really powerful.
__________________