Jump to content

Script error!!


Yue
 Share

Recommended Posts

-- Clases.
import("Scripts/Vehiculo/Clases/vehiculo.lua")

-- Suspención.
--***************
-- Ejes traseros.
Script.ejeAmT1 	= nil --entity "Eje T1"
Script.ejeAmT2 	= nil --entity "Eje T2"

-- Ejes delanteros.
Script.ejeAmF1 	= nil --entity "Eje F1"
Script.ejeAmF2 	= nil --entity "Eje F2"

-- Ejes Dirección llantas delanteras.
Script.ejeDir1 	= nil --entity "Eje DF1"
Script.ejeDir2  = nil --entity "Eje DF2"

-- Llantas Traseras.
Script.llantaT1 = nil --entity "Rueda T1"
Script.llantaT2 = nil --entity "Rueda T2"

-- Llantas Delanteras.
Script.llantaF1 = nil --entity "Rueda F1"
Script.llantaF2 = nil --entity "Rueda F2"

	
function Script:Start()


	-- Se crea el objeto jeep.
	jeep = vehiculo:New()
	
	-- Se crean los amortiguadores traseros.
	jeep:InitSusp(self.ejeAmT1,self.entity)
	jeep:InitSusp(self.ejeAmT2,self.entity)
	-- Se crean los amortiguadores delanteros.
	jeep:InitSusp(self.ejeAmF1,self.entity)
	jeep:InitSusp(self.ejeAmF2,self.entity)

	-- Se crea los motores ruedas Traseras.
	jeep:InitMotorRuedas( self.llantaT1, self.ejeAmT1)
	jeep:InitMotorRuedas( self.llantaT2, self.ejeAmT2)

	-- Se crea los motores ruedas Delanteras.
	jeep:InitMotorRuedas( self.llantaF1, self.ejeDir1 )
	jeep:InitMotorRuedas( self.llantaF2, self.ejeDir2 )

	-- Se crea los motores de dirección de las llantas frontales.
	jeep:InitMotorDir( self.ejeDir1, self.ejeAmF1)
	jeep:InitMotorDir( self.ejeDir2, self.ejeAmF2)



end


function Script:UpdateWorld()
	--self.suspT0:EnableMotor()
	local ventana = Window:GetCurrent()


	if ventana:KeyDown(Key.J) then
		self.entity:AddForce(0,25000,0)
		
	end

end

This Script.

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...