View unanswered posts | View active topics It is currently Fri Dec 27, 2024 8:38 am



Reply to topic  [ 10 posts ] 
 Ridable Vehicles Mk2 
Author Message
User avatar

Joined: Tue Nov 06, 2007 6:58 am
Posts: 2054
Reply with quote
Post 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
Thu Jul 23, 2009 11:35 pm
Profile
User avatar

Joined: Fri Jun 19, 2009 5:57 pm
Posts: 84
Reply with quote
Post Re: Ridable Vehicles Mk2
Hooray, I'm useful! [/zoidberg] :)


Fri Jul 24, 2009 8:55 pm
Profile
User avatar

Joined: Sun Jan 11, 2009 10:54 am
Posts: 365
Reply with quote
Post 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)?


Mon Aug 03, 2009 2:56 pm
Profile
User avatar

Joined: Sun May 11, 2008 12:50 pm
Posts: 899
Reply with quote
Post Re: Ridable Vehicles Mk2
self.RotAngle = WhatEverYouWantIt2B


Mon Aug 03, 2009 3:10 pm
Profile WWW
User avatar

Joined: Sun Jan 11, 2009 10:54 am
Posts: 365
Reply with quote
Post 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?


Tue Aug 04, 2009 2:08 pm
Profile
User avatar

Joined: Sun May 11, 2008 12:50 pm
Posts: 899
Reply with quote
Post Re: Ridable Vehicles Mk2
put in update, and run that line when the vehicle is empty.


Tue Aug 04, 2009 2:50 pm
Profile WWW
User avatar

Joined: Fri May 11, 2007 4:30 pm
Posts: 1040
Location: England
Reply with quote
Post 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".


Wed Aug 05, 2009 1:14 am
Profile
User avatar

Joined: Sun Jan 11, 2009 10:54 am
Posts: 365
Reply with quote
Post 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


Wed Aug 05, 2009 11:45 am
Profile
User avatar

Joined: Tue Nov 06, 2007 6:58 am
Posts: 2054
Reply with quote
Post 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 156 times
Thu Aug 06, 2009 4:40 am
Profile
User avatar

Joined: Sun Jan 11, 2009 10:54 am
Posts: 365
Reply with quote
Post 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 160 times
Sun Aug 09, 2009 2:47 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 10 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.058s | 15 Queries | GZIP : Off ]