Author Topic: GravKarts, a speedkart varient.  (Read 3184 times)

This is pretty much all the code in Gravity Jeep.

$GravityJeepTypemasks=$typemasks::fxbrickobjecttype | $typemasks::interiorobjecttype | $typemasks::terrainobjecttype | $typemasks::StaticObjectType;

datablock wheeledvehicledata(GravityJeepVehicle : JeepVehicle){
 cameraRoll=true;
 cameramaxdist=8;
 cameraoffset=0;
 uiname="Gravity Jeep";
};

function GravityJeepVehicle::onadd(%this,%obj){
 %obj.isshiftinggravity=1;
 %obj.grav="0 0 -0.5";
 shiftgravitycheck(%obj);
 parent::onadd(%this,%obj);
}

function shiftgravitycheck(%obj){
 if(!%obj.isshiftinggravity)
  return;
 %pos=%obj.getposition();
 %ray=containerraycast(%pos,vectoradd(%pos,vectorscale(%obj.getupvector(),"-4 -4 -4")),$GravityJeepTypemasks,%obj);
 %normal=getwords(%ray,4,6);
 if(%normal!$="")
  %obj.grav=vectorscale(%normal,"-0.5 -0.5 -0.5");
 %obj.setvelocity(vectoradd(%obj.getvelocity(),vectoradd("0 0 0.5",%obj.grav)));
 schedule(25,0,shiftgravitycheck,%obj);
}

A simple replacement of words should do it. I think. I'll try.

I have a GravityKart model done
-snop-
It just needs the gravity part to work
so, is the gravitykart ever going to be released?

It works!





It's a little buggy though. On that wall it was still going down, but very slowly. Taking an image seems to speed it up.

Sounds don't work. No horn or engine sounds.
Download: https://www.mediafire.com/?hunh4brbbg1fgh8

If filipe makes an add-on that overwrites this, I'll allow it.
« Last Edit: January 07, 2014, 09:38:27 PM by Crispy_ »

Hey thanks crispy. Do you mind if I make a topic in the add-ons section, along with my tracks in the future?
If not I understand.

Sure. I could even make a gamemode if you want. There are no cart variants btw.

If you want that gamemode do you still want a color-selector and a starting line thing?

Sure. I could even make a gamemode if you want. There are no cart variants btw.

If you want that gamemode do you still want a color-selector and a starting line thing?
Sure that would be great!
I would need time to heavily modify mute city and bb, thank a lot.

I'll start work on that.

My blockland appears to be crashing. All well. Just having the karts spawned should be good enough. You said you already have tracks, so just place vehicle spawns if you haven't already


The GravityKart is working now, just some things left to fix and then I'll release it on RTB


Why does the car seem to twitch when going upside down, is it me lagging?

Why does the car seem to twitch when going upside down, is it me lagging?
It might be, it works fine in singleplayer though

I went into the server and was driving a gravitykart, and the hands seemed to be messed up

This will lead to some interesting maps.

This will lead to some interesting maps.
Oh yes, hope we get to see dem maps.