I recently found an excellent tut on .map for mountable jeeps. It allowed the player to man an mg42 on the back of a jeep with ai driving. Well I wanted to now were if you can get other viechles like in the first mission on Allied Assault where you are in the back of a truck. Also, can you get German AI to drive veichles - like when you drive into the airport on one of the original missions - there is a German truck following you.
Also can you get any model to move? Or a bursh? If you can get brushes to move - how? Can you use 20 brushes with the same target of 'moving_brush' and do a bit of scripting? If the player is standing on the brushes will he move as well?
Mountable Veichles Other than Jeep
Moderator: Moderators
Mountable Veichles Other than Jeep
"We must become the change we want to see in the world" (Mahatma Gandhi)
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
what you can do is put ai in a vehicle and use waypoints so they circle around the map. if you want u can take any vehicle and mount it. fir make a 42 on the vehicle and glue it to the vehicle. then put a trigger that when activated binds the player to the truck, and starts the truck on a set of waypoints. also put a trigger that when activated unbind the player, so he can get off.
To put a player in a vehicle you could bind a script origin into the back of a truck and glue the player to it . You have to turn his physics off as well .
Try this with the opel truck
$truck1 thread drivers
$playerspot bind $truck1
$player glue $playerspot
$player notsolid
$player physics_off
waitthread truck1
$player unglue
$player solid
$player physics_on
end
drivers:
local.driver = spawn human/allied_airborne_soldier.tik "gun" "none"
local.driver.origin = self.origin
local.driver rendereffects "-shadow"
self AttachDriverSlot 0 local.driver
local.driver exec global/disable_ai.scr
local.driver anim opel_driver
local.driver physics_off
//local.driver exec global/setdeathanim.scr "opel_driver_death"
end
truck1:
$truck1 drive $truck1_path 200 10 128 256
$truck1 waittill drive||death
//$truck1 waittill death
$truck1 thread driver_out
end
driver_out:
local.driver = self QueryDriverSlotEntity 0
local.driver.targetname = "friendly"
local.driver.fnum = level.ffnum
level.ffnum++
wait 1
local.vect = angles_toleft (local.driver.angles)
local.dist = -100
local.vect[0] = local.vect[0] * (local.dist)
local.vect[1] = local.vect[1] * (local.dist)
local.vect[2] = local.vect[2] * local.dist
local.spotdriver = local.vect + local.driver.origin
local.driver exec global/stand.scr
self DetachDriverSlot 0 local.spotdriver
local.driver gun "colt 45"
exec global/friendly.scr::friendlygen
local.driver thread global/friendly.scr::friendlythink
local.driver.friendtype = 0
local.driver physics_on
end
Try this with the opel truck
$truck1 thread drivers
$playerspot bind $truck1
$player glue $playerspot
$player notsolid
$player physics_off
waitthread truck1
$player unglue
$player solid
$player physics_on
end
drivers:
local.driver = spawn human/allied_airborne_soldier.tik "gun" "none"
local.driver.origin = self.origin
local.driver rendereffects "-shadow"
self AttachDriverSlot 0 local.driver
local.driver exec global/disable_ai.scr
local.driver anim opel_driver
local.driver physics_off
//local.driver exec global/setdeathanim.scr "opel_driver_death"
end
truck1:
$truck1 drive $truck1_path 200 10 128 256
$truck1 waittill drive||death
//$truck1 waittill death
$truck1 thread driver_out
end
driver_out:
local.driver = self QueryDriverSlotEntity 0
local.driver.targetname = "friendly"
local.driver.fnum = level.ffnum
level.ffnum++
wait 1
local.vect = angles_toleft (local.driver.angles)
local.dist = -100
local.vect[0] = local.vect[0] * (local.dist)
local.vect[1] = local.vect[1] * (local.dist)
local.vect[2] = local.vect[2] * local.dist
local.spotdriver = local.vect + local.driver.origin
local.driver exec global/stand.scr
self DetachDriverSlot 0 local.spotdriver
local.driver gun "colt 45"
exec global/friendly.scr::friendlygen
local.driver thread global/friendly.scr::friendlythink
local.driver.friendtype = 0
local.driver physics_on
end