Data Realms Fan Forums
http://45.55.195.193/

Ridable Vehicles Mk2
http://45.55.195.193/viewtopic.php?f=73&t=15976
Page 1 of 1

Author:  mail2345 [ Thu Jul 23, 2009 11:35 pm ]
Post subject:  Ridable Vehicles Mk2

By using the new inventory() function Sean found, and my list hack, I have been able to iron out almost all the bugs in the vehicle demo.
The demo is in my mod.
I have a more modder freindly edition here.

Attachments:
VPlain.rte.7z [3.75 KiB]
Downloaded 206 times

Author:  Sean Mirrsen [ Fri Jul 24, 2009 8:55 pm ]
Post subject:  Re: Ridable Vehicles Mk2

Hooray, I'm useful! [/zoidberg] :)

Author:  vagyr [ Mon Aug 03, 2009 2:56 pm ]
Post subject:  Re: Ridable Vehicles Mk2

perfect code.
but i have a small problem,how can i make a crab not turn upside down?
i mean how can i make it correct it self and prevent it from turning upside down while looking natural(and with minimoum terain damage)?

Author:  Roon3 [ Mon Aug 03, 2009 3:10 pm ]
Post subject:  Re: Ridable Vehicles Mk2

self.RotAngle = WhatEverYouWantIt2B

Author:  vagyr [ Tue Aug 04, 2009 2:08 pm ]
Post subject:  Re: Ridable Vehicles Mk2

Code:
function Create(self)
self.RotAngle = 45
end

would mean than the crab would rotate only in 45 degrees?
or is it a diffrend kind of value?

Author:  Roon3 [ Tue Aug 04, 2009 2:50 pm ]
Post subject:  Re: Ridable Vehicles Mk2

put in update, and run that line when the vehicle is empty.

Author:  robolee [ Wed Aug 05, 2009 1:14 am ]
Post subject:  Re: Ridable Vehicles Mk2

that code will set the crabs rotation to 45 degrees (but only once, when it is created). what you want is (in update)
Code:
if self.RotAngle > 0.436332313 then self.RotAngle = self.RotAngle - 0.0174532925; end
if self.RotAngle < -0.436332313 then self.RotAngle = self.RotAngle + 0.0174532925; end


what this does is everysimupdate that the crabs rotation is more than 20(or 25 I can't remember now xD) either way it corrects it by one degree. Also 45 wouldn't work, rotangle is in radians... and on a side note, I love google, type something like "45 degrees to radians" and poof "45 degrees = 0.785398163 radians".

Author:  vagyr [ Wed Aug 05, 2009 11:45 am ]
Post subject:  Re: Ridable Vehicles Mk2

ok now i get it.
thanks a lot.
also i have a small question with the script
the teacher.lua file has a line than asks for the file Module.rte/GlobalFunctions.lua...
what does this file do?
i am asking just out of quriocity

Author:  mail2345 [ Thu Aug 06, 2009 4:40 am ]
Post subject:  Re: Ridable Vehicles Mk2

Dammit.
I knew I would mess something up. It's loading something from my mod.
I'll go post it.

Attachments:
Module.rte.7z [877 Bytes]
Downloaded 155 times

Author:  vagyr [ Sun Aug 09, 2009 2:47 pm ]
Post subject:  Re: Ridable Vehicles Mk2

well i have another problem...
i made a script than makes an actor fly(thelastbananas code for th hooverboards+some other parts)
and i want to combine it with the script to make the vehicle ridable...
but i cannot combine the 2 together...
any chance than you can help me?

Attachments:
vtolscript.rar [1.19 KiB]
Downloaded 159 times

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/