| Blockland Forums > Suggestions & Requests |
| GravKarts, a speedkart varient. |
| << < (10/13) > >> |
| Crispy_:
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. |
| Champion:
--- Quote from: Filipe on January 06, 2014, 11:28:42 PM ---I have a GravityKart model done -snop- It just needs the gravity part to work --- End quote --- so, is the gravitykart ever going to be released? |
| Crispy_:
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. |
| Alkatjo:
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. |
| Crispy_:
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? |
| Navigation |
| Message Index |
| Next page |
| Previous page |