Jumping Scenario

View previous topic View next topic Go down

Jumping Scenario

Post by Fox Explorer on Wed Jun 22, 2011 1:23 pm

I was inspired to make this scenario when i made a car that could jump (although i haden't intended for it to do that). And from the original jumping scenario.

Code:


start=0
distance=0
hit=0
function OnFrame()
   out(1,"Turn and Drive Through the")
   out(2,"tunnel and Jump the Ramp.")
   out(3,"See how far you can jump!")
   if(start==0) then
      if(_CHECK2(0,0)>0) then start=1 end
   end
   if(start==1) then
      for i=0 , _CHIPS()-1,1 do
         if(_GETHIT(i,"LAND")>0) then hit=1 end
         d=200+_Z(i)
         if(d<distance) then distance=d end
      end
      if(hit==0) then distance=52+_Z(0)+_Y(0) end
      out(6,"‹L˜^= ",distance," m")
   end
end

function OnInit()
   _SETREG("G",1)
   _SETREG("A",1)
   _SETREG("T",1)
   _SETREG("J",0)
   _SETREG("U",0)
   _SETREG("C",0)
   _SETREG("S",1)
   _SETREG("E",0)
   _LOADLAND("Land.x")
   _WARP(0,140,40,-485)
   _DIRECT(0,0,90,0)
   _SETRING(0,-25,50,-100,0,0,0,10)
   _SETRINGSTATE(0,2)
   _SETVIEWTYPE(10)
   start=0
   distance=0
   hit=0
end

function OnReset()

end

function OnMode()

end


avatar
Fox Explorer
Plane
Plane

Posts : 25
Join date : 2011-06-08

View user profile

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum