Cum poti face animatii la un tractor sau combina

Vezi subiectul anterior Vezi subiectul urmator In jos

Cum poti face animatii la un tractor sau combina

Mesaj  Ecstasy la data de Vin Dec 02, 2011 11:11 am

Cum puteti sa faceti animatii la un tratcor sau combina

Pentru inceput faci un lua care sa arate cam asa :
local updateGears = false;

local previousGearLevel = self.myCurrentGearLevel;

if not self.hasBeenClutched and self.myLastGear < 0 then
if self.myCurrentGearLevel > 0 then
updateGears = false;
self.myCurrentGearLevel = previousGearLevel;
end;
end;
end;

local previousGearLevel = self.myCurrentGearLevel;

if not updateGears and InputBinding.isPressed(InputBinding.TREAPTA2) then
self.myCurrentGearLevel = 0.1
updateGears = true;

if not self.hasBeenClutched and self.myLastGear < 0 then
if self.myCurrentGearLevel > 0 then
updateGears = false;
self.myCurrentGearLevel = previousGearLevel;
end;
end;
end;

local previousGearLevel = self.myCurrentGearLevel;

if not updateGears and InputBinding.isPressed(InputBinding.TREAPTA3) then
self.myCurrentGearLevel = 0.15
updateGears = true;

if not self.hasBeenClutched and self.myLastGear < 0 then
if self.myCurrentGearLevel > 0 then
updateGears = false;
self.myCurrentGearLevel = previousGearLevel;
end;
end;
end;

local previousGearLevel = self.myCurrentGearLevel;

if not updateGears and InputBinding.isPressed(InputBinding.TREAPTA4) then
self.myCurrentGearLevel = 0.2
updateGears = true;

if not self.hasBeenClutched and self.myLastGear < 0 then
if self.myCurrentGearLevel > 0 then
updateGears = false;
self.myCurrentGearLevel = previousGearLevel;
end;
end;
end;

local previousGearLevel = self.myCurrentGearLevel;

if not updateGears and InputBinding.isPressed(InputBinding.TREAPTA5) then
self.myCurrentGearLevel = 0.25
updateGears = true;

if not self.hasBeenClutched and self.myLastGear < 0 then
if self.myCurrentGearLevel > 0 then
updateGears = false;
self.myCurrentGearLevel = previousGearLevel;
end;
end;
end;


if not updateGears and InputBinding.isPressed(InputBinding.MARSARIER) then
self.myCurrentGearLevel = -0.04
updateGears = true;

if not self.hasBeenClutched and self.myLastGear > 0 then
if self.myCurrentGearLevel < 0 then
updateGears = false;
self.myCurrentGearLevel = previousGearLevel;
end;
end;
end;

if updateGears then
if self.myCurrentGearLevel > 0 then
if self.myCurrentGearLevel > 100 then
self.myCurrentGearLevel = 100;
end;

self.myCurrentGear = math.ceil(100/self.noOfForwardGears * self.myCurrentGearLevel);
if self.myCurrentGear > self.noOfForwardGears then
self.myCurrentGear = self.noOfForwardGears;
end;


apoi faci alt clip pentru animatii si gata pe urma ai tractor sau combina cu animatii la manete...

enjoy...
avatar
Ecstasy
Senior Admin
Senior Admin

Mesaje : 60
Data de inscriere : 10/09/2011
Varsta : 23
Localizare : Barlad jud vaslui

Vezi profilul utilizatorului

Sus In jos

Vezi subiectul anterior Vezi subiectul urmator Sus


 
Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum