Jump to content
主视角中国

Recommended Posts

Posted

I know that cardevsan has managed to achieve drivable vehicles in his modding. I was wondering if anyone could summarize a script necessary to be able to drive a motorbike? I would like to please this into my upcoming Stadt mod as theirs not enough room for a tank or a truck...but their sure is enough room for a motorbike!!

Posted

local.bike = spawn script_model targetname bike
local.bike model "vehicles/bmw.tik"
local.bike.origin = ( x y z )
local.bike.angles = ( a b c )
local.bike nodamage

local.biketrig = spawn trigger_multiple targetname biketrig
local.biketrig.origin = $bike.origin
local.biketrig setsize = ( -30 -30 0 ) ( 30 30 100 )
local.biketrig setthread glue_bike

gluebike:

local.player = parm.other

if(local.player.bike = 1)
end

local.gluemodel = spawn script_model targetname gluemodel
local.gluemodel model $bike model

local.gluemodel notsolid

local.player.bike = 1
local.gluemodel glue local.player

local.player stufftext "say I am driving."

wait 10

local.player.bike = 0
$gluemodel delete

end[/code]

I just made that off the spot, I don't know if it works. But you get the idea.

Posted

Using Demon's idea i'm gonna make a script out of the blue here to wat i think would work the best...anyone who has any suggestions could post them below

local.bike = spawn script_model targetname bike
local.bike model "static/vehicle_bmwbike.tik"
local.bike.origin = ( x y z )
local.bike.angles = ( a b c )
local.bike nodamage

local.biketrig = spawn trigger_use targetname biketrig
local.biketrig.origin = $bike.origin
local.biketrig setsize = ( -30 -30 0 ) ( 30 30 100 )
local.biketrig setthread glue_bike

glue_bike:
local.player waittil $biketrig
local.player = parm.other
if(local.player.bike !=1)
{
local.player glue $bike
local.player.origin = $bike + ( 0 15 0 ) //or whatever it takes to give the illusion that he is above the handlebars driving the bike
local.player take weapon
local.player iprint "You are now driving the motorcycle"
local.player playsound motorbikesound1
local.player sv_runspeed 500
}
end[/code]

I'm not even sure this is gonna work any help appreciated!!!

Posted

local.trig = spawn trigger_multiple
local.trig.origin = ( 375.51 78.53 386.29 ) local.trig setsize ( -50 -50 -10 ) ( 50 50 10 )
local.trig setthread bike
local.trig message "You Are A Motor Bike For 60 Secsonds"
local.trig wait 2 // How often the trig acts
local.trig delay 0 // How long before trig acts

bike:
local.player=parm.other
if (local.player.packon == 1)
{
end
}
while (local.player isalive)
{
local.player.packon = 1
}
local.static = spawn script_model
local.static model "static/vehicle_bmwbike.tik"
local.static notsolid
local.static.scale=1
local.static.origin = (local.player.origin + ( 100 190 100 ))
local.static.angle = "-45"
local.static glue local.player
local.player.scale= .01
local.player stufftext "say w00t Im A Motor Bike"
parm.other stopwatch 60
wait 60
local.player.packon = 0
local.player.scale=1
local.static remove
end[/code]

that should work

Posted

ok cool it will work...thats not wat i want....at alll...

thats not realistic at all....thats not at all what i'm looking for

Posted

It wont be, there is no animation for the bike

was never used in the singleplayer maps so therefore no animation.

think the only vehicles to have animation are trucks jeep and tanks.

If you removed the market stalls in stadt, you could drive the jeep round

Posted

i know their is no animation i just want it to be glued to you and so that we can make it look like you r driving

Posted

Well, seeing as you cant make the player look like he is IN the bike, you could make the player invisible.

parm.other hide

Posted

It wont be, there is no animation for the bike

was never used in the singleplayer maps so therefore no animation.

think the only vehicles to have animation are trucks jeep and tanks.

If you removed the market stalls in stadt, you could drive the jeep round

Hi there:

Look in map T1L3 "Spearhead". It has an animated bike thats used in the single player game.

Posted

Hi there:

Look in map T1L3 "Spearhead". It has an animated bike thats used in the single player game.

lol you have a better memory than me but you are right I found these in:

mainta\pak1\animate\vehicle_bike_t1l2.tik

mainta\pak1\animate\vehicle_bike_t1l2_rig.tik

mainta\pak1\fx\bikewheel_dirt.tik

Posted

You can actually make the player look like he's inside the bike by using bones. And then assign him to that bone... But that would require modelling which i could do... All i need to know is what bones are required for drivable vehicles.

Posted

i would have no idea wich bones to use.....now that we have a bike with animation....anyone know a script to make it drivable??

Posted

steal SH bike

Steal sh player animationa dn model

glue player to new bike with bones and classname changes

spawn and attach fake model unless u make a aplyer anim for the player

sorted

if u want a realisc movement without faking it to be the tank ur going to have to script it (hahaha goood luck) and then scripts above are not realistc

i mean checking in front of u, chcking below u. checking high below and ground type and steapness etc to determin ur view.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

登录

Already have an account? Sign in here.

现在登录
×
×
  • 创建新的...