Drakkhen 0 Posted May 20, 2004 Hi, Â I noticed a VERY annoying problem with class inits for vehicle pilots: simply put a Hint "My init" in the init field of one of your home-made pilots and instanciate his vehicle in the game. As the game starts, no message appears. It's only when you step out that the init plays and displays the hint. Â I imagine the reason is that the pilot of a vehicle has no existance until he becomes an object independant from his vehicle. The problem is noticeable when you want to use hidden selections on your pilot. There's no way to make him initialize his HS until he's out. Â Now, you make a pilot class with HS for helmet for example, and your pilot will start in the vehicle without it. Fun for a guy who wants this effect but for an helicopter or a plane... if you wanna make the helmet on head by default and off the head when the pilot steps out... you're stuck. Â Could it be possible to force driver/pilot's init as the game starts? I imagine the best would be to consider the vehicle and its driver two different objects (thus, even an editor-init field's setobjecttexture would then work just fine). Â Thanx alot... Share this post Link to post Share on other sites
BraTTy 0 Posted May 21, 2004 Maybe... within your scripts do a (? driver vehicle) etc... Get what I mean? Check if he is the driver,gunner,cargo etc...and refernce to that when you do things...might work edit: I overlooked your problem....the init isn't running until he is out.But how you are you starting the pilot in a vehicle....I assume that you made a new vehicle config for a plane or chopper with the pilot as default,then when you select a east/west/etc chopper the pilot is there. Well if you made just a pilot then he would never start default in a vehicle and the init would run.Someone would have to moveindriver at game startup and the pilots seperate init should always run as he didn't actually start in the vehicle. But if your classing a new vehicle and making the pilot default you are also in control of that vehicles init and would have to lead your scripts from there,making reference to the driver of the vehicle Share this post Link to post Share on other sites
feersum.endjinn 7 Posted May 21, 2004 You can always create second pilot on ground, then on vehicle's init immediately remove pilot from plane and move your secondary pilot as driver and setPos old pilot somewhere in outer space... Never tested that in MP though, I'm not sure what will happen if plane's init line is run before secondary pilot's init line Share this post Link to post Share on other sites
Drakkhen 0 Posted May 21, 2004 if your classing a new vehicle and making the pilot default you are also in control of that vehicles init and would have to lead your scripts from there,making reference to the driver of the vehicle yep, already thought about and tried these solutions, but if you tried, you've noticed that even with reference to the driver, no setobjecttexture routine run by the vehicle seems to work on the driver as long as he is in there (I even tried to make HS fro 1 to 4 on driver and 5 to 20 on vehicle since both visuals are referenced as the same object but, while the vehicle is correctly modified, the visual of the pilot seems to be loaded straight from its class without init and to be nothing else than a bunch of faces). I know scripting and editing enough to make full missions with the correct textures etc... but to make the mods easily useable for any player, it's quite more difficult to explain that "hey, you have to create the pilot outside, with the init field set like this and then you set vehicle's init like this... for each vehicle/driver pair" I easily imagine how long it could remain on hard drive Thanx anyway. I'll put the whole stuff behind "//" and wait for other suggestions. Ciao Share this post Link to post Share on other sites