Jump to content

Driveable Vehicle Script help


hardkopy

Recommended Posts

The below script was sent to me by lRon386 as collision for my driveable vehicle mod. This allows for the player to be dragged behind a creature (somewhat like a car and trailer) and it works beautifully. Unfortunately it works too well and the player cannot escape the creatures hold and that is what I need help with as it is a major bottleneck to my progress.

 

J3X sent me this snippet,

 

float tmp
set tmp to player.getpos x + 200
player.setpos x tmp

 

but it also moves the creature with the player trapped, and short of opening the console and using tcl, I can't find a way to escape the creatures bounds.

 

 

scn DVControlScript

short DoOnce
float posz
float posx
float posy
float anglez
float anglezPlayer
float poszPlayer


begin OnActivate


Set DoOnce to 1
DisablePlayerControls 1 0 0 0 0 0 0

DVCreatureControlREF.playgroup FastForward 1


end

begin gamemode

if(DoOnce>0)
set posx to DVCreatureControlREF.getpos x 
set posy to DVCreatureControlREF.getpos y
set anglez to DVCreatureControlREF.getangle z
set anglezPlayer to player.getangle z
set poszPlayer to DVCreatureControlREF.getpos z

set posx to posx - (300 * (sin anglez))
set posy to posy - (300 * (cos anglez))




DVCreatureControlREF.setangle z anglezPlayer
player.setpos x posx
player.setpos y posy
player.setpos z poszPlayer 




Endif
end

 

So there it is, this is what drives the vehicle without having it as an armor item.

Link to comment
Share on other sites

I've actually used the script with all controls enabled (which also works) it allows the player to shoot freely over the head of the creature at oncoming enemies, change weapons, armor and heal. Of course VATS cannot used as it targets only the creature. The creature is guided by the camera and not movement keys. The creature in this case is robobrain because as a vehicle it traverses the land fall perfectly (speed jumps on motorbikes anyone?:)

 

I think packing the creature (vehicle) away in container might be the answer. It works but leaves a ghost texture in the gamewold on disable. The creature is a persistant reference and does not work without it being so.

 

If you kill the creature by manual means, ie shooting it, you are lifted toward the top of the skybox, so thats not an option.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...