Jump to content
nanos GbR
MadMadGorak

Questions about checkpoints

Recommended Posts

So, I'm building a racing module, and I'm working to incorporate an in-game race builder. I'm working with adding checkpoints, and it sure would be helpful if the appearance of the checkpoints could be altered. For example, when editing a race, the user can select an existing checkpoint to edit. It would be nice if the selected checkpoint could be differentiated by a color in the world view (e.g. change from red to green).

I'm pretty sure that the answer is no, but is there currently any way to alter the color of a checkpoint? For example, in singleplayer, the wingsuit race checkpoints are white and red. Is this option not available in jcmp, or is there possibly an alternate model hash that I need to use?

Since I haven't been able to change the color of the checkpoint, I've just been drawing a bigger checkpoint around the selected checkpoint to help distinguish it. Is there any way to animate a checkpoint? Ideally, I'd instantiate an timer in my checkpoint manager to tween the rotation property of the focused checkpoint, but it seems like using setInterval in the client main.js seems to throw a blank error. Is it possible to use timer functions within the client component?

Is there a clear definition of what the 'type' property on a checkpoint actually does? I've only found the type with a value of 1 to place a visible checkpoint.

And for the love of god, can anyone tell my why it seems like one out of every 10 checkpoints I place turns out as a semicircle instead of a full circle? Image and code below:

...
placeCheckpoint = () => {
        if(this.mode === this.BUILD_MODE)
        {
            try{
                var chk = new Checkpoint(1, this.CHECKPOINT_MODEL_HASH, jcmp.localPlayer.position, jcmp.localPlayer.rotation);
                chk.radius = 6;
                this.builder.addCheckpoint(chk);
            }
            catch(err){
                jcmp.ui.CallEvent('gorakracer/ui/log', 'Error occurred:'+JSON.stringify(err));
            }
        }
    }
...

 

https://imgur.com/a/rKGrg

Thanks.

-Mad Mad

Share this post


Link to post
Share on other sites
3 hours ago, MadMadGorak said:

It would be nice if the selected checkpoint could be differentiated by a color in the world view (e.g. change from red to green).

If there's a feature you would like to see, you can submit a request for it here.

3 hours ago, MadMadGorak said:

is there currently any way to alter the color of a checkpoint?

Try changing type - otherwise not currently. There is another hash, but it apparently doesn't work.

3 hours ago, MadMadGorak said:

Is there any way to animate a checkpoint?

Not currently.

3 hours ago, MadMadGorak said:

Is it possible to use timer functions within the client component?

Not currently. This will likely be available in the future. For now, you can use timers in CEF and use events to get a similar functionality.

3 hours ago, MadMadGorak said:

Is there a clear definition of what the 'type' property on a checkpoint actually does?

Checkpoint.type is the type of checkpoint - 0 for land based, 1 is wingsuit.

3 hours ago, MadMadGorak said:

anyone tell my why it seems like one out of every 10 checkpoints I place turns out as a semicircle instead of a full circle?

That's a known issue.

Also, these types of questions would be great for the Discord because you'll get much faster responses (forums are a little slow).

Share this post


Link to post
Share on other sites

Haha, you say forums are a little slow- but you answered all of my questions in the time that it took me to get dinner and hit the gym. Thanks so much- for these answers and the ones you regularly post in the forums-- it's been a huge help.

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use.