Jump to content
nanos GbR
BillBodkin

Creating checkpoints

Recommended Posts

Hey, i'm trying to make use of checkpoints, when attempting to call the class 'Checkpoint', it says it is not defined.

Do i need to import the call into the package, or am I doing something else wrong?

Share this post


Link to post
Share on other sites

Docs are broken. New docs coming soon.

In the meanwhile...

var chk = new Checkpoint(0, 0x301477DB, position, zero);
chk.radius = 1;

The first argument can also be 1, but I have not tested it.

Share this post


Link to post
Share on other sites

that still gives me the same error :/

Could it be im running it form the wrong place?

im just modding the main file form the chat package

 

if(message.toLowerCase() == "/cp"){
  /* var cp = new Checkpoint();
  cp.position = player.position;
  cp.visible = true; */
  var chk = new Checkpoint(0, 0x301477DB, player.position, zero);
  chk.radius = 1;
  return;
}

 

Share this post


Link to post
Share on other sites

ok, so in the main.js on the chat package, i added:

if(message.toLowerCase() == "/cp"){
  /* var cp = new Checkpoint();
  cp.position = player.position;
  cp.visible = true; */
  /* var chk = new Checkpoint(0, 0x301477DB, player.position, zero);
  chk.radius = 1; */
  jcmp.events.CallRemote('addWP', player.position);
  return;
}

and in the 'client_package' main.js i added: 

jcmp.events.AddRemoteCallable('addWP', (pos) => {
	var chk = new Checkpoint(0, 0x301477DB, pos, zero);
	chk.radius = 1;
});

but when i type /cp then server closes, not even crash, just close

Any ideas of where i messed up?

Desktop Screenshot 2017.08.30 - 18.19.15.70.png

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.