chaseh27 10 Posted June 3, 2013 Is it possible to set the color of the Offroad Trucks in the editor? Is there some sort of script maybe? I saw on Stratis Life you can choose what color truck you want. Share this post Link to post Share on other sites
killzone_kid 1331 Posted June 3, 2013 not just color you can customise a lot of things. Look up in offroad folder in addons on how they did it Share this post Link to post Share on other sites
chaseh27 10 Posted June 3, 2013 Thanks for the reply. What do you mean by "Look up in offroad folder in addons"? Share this post Link to post Share on other sites
mindstorm 8 Posted June 4, 2013 For the animated states of the vehicle (set any of em to 0 to get it to show): _this animate ["HidePolice", 1]; _this animate ["HideServices", 1]; _this animate ["HideBackpacks", 1]; _this animate ["HideBumper1", 1]; _this animate ["HideBumper2", 1]; _this animate ["HideConstruction", 1]; _this animate ["HideDoor1", 1]; _this animate ["HideDoor2", 1]; _this animate ["HideDoor3", 1]; _this animate ["HideGlass2", 1]; (Suppose Glass1 & 3 might also excist?) And for the colors (change _rnd1 to prefered color. Not sure which is which): _rnd1 = floor random 6; _this setObjectTexture [0, ["\A3\soft_F\Offroad\Data\offroad_ext_co.paa", "\A3\soft_F\Offroad\Data\Offroad_ext_BASE01_CO.paa", "\A3\soft_F\Offroad\Data\Offroad_ext_BASE02_CO.paa", "\A3\soft_F\Offroad\Data\Offroad_ext_BASE03_CO.paa", "\A3\soft_F\Offroad\Data\Offroad_ext_BASE04_CO.paa", "\A3\soft_F\Offroad\Data\Offroad_ext_BASE05_CO.paa"] select _rnd1 ]; _this setObjectTexture [1, ["\A3\soft_F\Offroad\Data\offroad_ext_co.paa", "\A3\soft_F\Offroad\Data\Offroad_ext_BASE01_CO.paa", "\A3\soft_F\Offroad\Data\Offroad_ext_BASE02_CO.paa", "\A3\soft_F\Offroad\Data\Offroad_ext_BASE03_CO.paa", "\A3\soft_F\Offroad\Data\Offroad_ext_BASE04_CO.paa", "\A3\soft_F\Offroad\Data\Offroad_ext_BASE05_CO.paa"] select _rnd1 ]; These only work local so you have to exec them on all clients. I found these by extracting the init script of the offroad: "\A3\soft_F\Offroad\scripts\randomize.sqf". I have no idea how to retrieve a list of animation states & textures. Searched to config files for these names but couldn't find any. Anyone can tell where to look? Share this post Link to post Share on other sites
Larrow 2822 Posted June 4, 2013 HidePolice" //police lights on roof and grill HideServices" //yellow roof lights and bullbar and rear rollcage, tools and bits in rear HideBackpacks" //backpacks hanging on side of vehicle HideBumper1" //flat iron bar style bumper HideBumper2" //round bullbar bumper with winch HideConstruction" //rollcage in rear HideDoor1" //drivers door HideDoor2" //passenger door (also needs the door glass hidden - "HideGlass2") HideDoor3" //rear flap HideGlass2" //passenger door glass setObjectTexture 0 //body work "\A3\soft_F\Offroad\Data\offroad_ext_co.paa", //red "\A3\soft_F\Offroad\Data\Offroad_ext_BASE01_CO.paa", //yellow "\A3\soft_F\Offroad\Data\Offroad_ext_BASE02_CO.paa", //white "\A3\soft_F\Offroad\Data\Offroad_ext_BASE03_CO.paa", //blue "\A3\soft_F\Offroad\Data\Offroad_ext_BASE04_CO.paa", //darkred "\A3\soft_F\Offroad\Data\Offroad_ext_BASE05_CO.paa", //darkblue setObjectTexture 1 //rims, varying degrees of silver - black , dirty Using same textures as above 1 Share this post Link to post Share on other sites
chaseh27 10 Posted June 4, 2013 (edited) Where am I putting these? I tried putting "_this animate ["HidePolice", 1];" in the Debug Console but I get "Error Generic error in expression". Edited June 4, 2013 by chaseh27 Share this post Link to post Share on other sites
KevsNoTrev 44 Posted June 4, 2013 Where am I putting these? I tried putting "_this animate ["HidePolice", 1];" in the Debug Console but I get "Error Generic error in expression". use the vehicle name and not _this in the debug console - _this is a local variable that can only be used inside a script (and a few other places), but not in the editor Share this post Link to post Share on other sites
lonewolf12 1 Posted June 4, 2013 so the init field of the vehicle? Share this post Link to post Share on other sites
chaseh27 10 Posted June 4, 2013 So I name it car1 for example, and then put "car 1 animate ["HidePolice", 1]" in the debug? Share this post Link to post Share on other sites
chaseh27 10 Posted June 5, 2013 Still can't get it to work. Share this post Link to post Share on other sites
KevsNoTrev 44 Posted June 5, 2013 in the intitialisation of the vehicle refer it as "this" Share this post Link to post Share on other sites
chaseh27 10 Posted June 5, 2013 (edited) Ok, so I got the Police lights on top of the car, but now I can't get the colors to work. I did the same thing as I did with the Police lights. Can someone please post an example for making the car white? Thank you ---------- Post added at 21:16 ---------- Previous post was at 20:58 ---------- Oh, and also, if I wanted to create a mission where my friend and I play together over Internet, how do I make these customizations work? Right now, I have to go into the editor and preview the mission then go into the debug and execute it. Edited June 5, 2013 by chaseh27 Share this post Link to post Share on other sites
Magirot 14 Posted June 5, 2013 Ok, so I got the Police lights on top of the car, but now I can't get the colors to work. I did the same thing as I did with the Police lights. Can someone please post an example for making the car white? Thank you---------- Post added at 21:16 ---------- Previous post was at 20:58 ---------- Oh, and also, if I wanted to create a mission where my friend and I play together over Internet, how do I make these customizations work? Right now, I have to go into the editor and preview the mission then go into the debug and execute it. Shouldn't it work from the initialisation field in multiplayer, since it's run on every client? Try putting this in the car's init field: this animate ["HidePolice", 0]; this setObjectTexture [0, "\A3\soft_F\Offroad\Data\Offroad_ext_BASE02_CO.paa"]; this setObjectTexture [1, "\A3\soft_F\Offroad\Data\Offroad_ext_BASE02_CO.paa"]; Change the number in BASE01 to change between colours. 02 is white, according to Larrow's post, so I put it there. Share this post Link to post Share on other sites
mindstorm 8 Posted June 5, 2013 Anyone can shed some light on how to retrieve all the animstates/textures of an object? Share this post Link to post Share on other sites
chaseh27 10 Posted June 5, 2013 Well, I have to enable it from the debug console while in-game and there isn't one in multiplayer, only in the editor. Also, is there a reason that you put the "set object texture" twice in your code example? Share this post Link to post Share on other sites
mindstorm 8 Posted June 5, 2013 _this setObjectTexture [0 <-- vehicle color _this setObjectTexture [1 <-- wheels, iron bars and other stuffs For mission put this in init of a vehicle: this animate ["HidePolice", 0]; this <--- is the vehicle object inside a init. Then export your mission to MP and go to main menu and create game with the mission. Share this post Link to post Share on other sites
Magirot 14 Posted June 5, 2013 Well, I have to enable it from the debug console while in-game and there isn't one in multiplayer, only in the editor. Double click on the car, there's a huge box that reads "INITIALIZATION" next to it. Copy the code into that. No need for the debug console. Screenshot ---------- Post added at 17:26 ---------- Previous post was at 17:16 ---------- Okay, correction incoming (I should've tested this myself instead of assuming stuff). animate and setObjectTexture do not work through object initialization. Here's another way: 1. Name the car as something (the field above initialisation), in this case I used policeoffroad 2. Create a new trigger (F3 -> double click somewhere) 3. Write "true" as the condition (instead of the original "this") 4. Add this into the trigger's On Act. field: policeoffroad animate ["HidePolice", 0]; policeoffroad setObjectTexture [0, "\A3\soft_F\Offroad\Data\Offroad_ext_BASE02_CO.paa"]; policeoffroad setObjectTexture [1, "\A3\soft_F\Offroad\Data\Offroad_ext_BASE02_CO.paa"]; This works for me, at least. Sorry for the confusion. Share this post Link to post Share on other sites
Larrow 2822 Posted June 5, 2013 Use this in the vehicles init box handle = this spawn { sleep 0.1; _this animate ["HidePolice", 0]; _this setObjectTexture [0, "\A3\soft_F\Offroad\Data\Offroad_ext_BASE02_CO.paa"]; _this setObjectTexture [1, "\A3\soft_F\Offroad\Data\Offroad_ext_BASE02_CO.paa"]; }; Just gives the vehicle a little pause before apply the changes allowing the randomisation script that BIS has placed on the vehicle time to finish before applying your changes Share this post Link to post Share on other sites
[GLT] Legislator 66 Posted June 5, 2013 This is absolutely awesome! And it's also very easy to use! I just wrote a function for an easy offroad setup. Here's a preview ... handle = this spawn {sleep 0.1; [unit1_Offroad, "black", "police", "no_backpack", "bumper2", "construction", []] call GLT_fnc_Offroad;}; Every combination is possible. I will definately include this function into my next mod update. 1 Share this post Link to post Share on other sites
chaseh27 10 Posted June 5, 2013 Oh ok, thank you all. Share this post Link to post Share on other sites
KevsNoTrev 44 Posted June 5, 2013 did anyone figure how to make the police lights go? Share this post Link to post Share on other sites
soolie 189 Posted June 6, 2013 Hey guys thanks for all the good tips. I figured it out and made a tutorial along with a script for easy customization. Check it out here http://forums.bistudio.com/showthread.php?156276-Customize-Off-roads!-Tutorial-with-Video Share this post Link to post Share on other sites
kdk11 1 Posted July 31, 2013 is it possible to have a hardtop on the back of these? Share this post Link to post Share on other sites
LemTheGentleman 11 Posted August 2, 2013 Vehicle spawns with the body invisible? Share this post Link to post Share on other sites
Larrow 2822 Posted August 2, 2013 All the vehicle textures changed with the last classname changes "\A3\soft_F\Offroad[color="#FF0000"]_01[/color]\Data\Offroad[color="#FF0000"]_01[/color]_ext_co.paa", //red "\A3\soft_F\Offroad[color="#FF0000"]_01[/color]\Data\Offroad[color="#FF0000"]_01[/color]_ext_BASE01_CO.paa", //yellow "\A3\soft_F\Offroad[color="#FF0000"]_01[/color]\Data\Offroad[color="#FF0000"]_01[/color]_ext_BASE02_CO.paa", //white "\A3\soft_F\Offroad[color="#FF0000"]_01[/color]\Data\Offroad[color="#FF0000"]_01[/color]_ext_BASE03_CO.paa", //blue "\A3\soft_F\Offroad[color="#FF0000"]_01[/color]\Data\Offroad[color="#FF0000"]_01[/color]_ext_BASE04_CO.paa", //darkred "\A3\soft_F\Offroad[color="#FF0000"]_01[/color]\Data\Offroad[color="#FF0000"]_01[/color]_ext_BASE05_CO.paa" //darkblue Share this post Link to post Share on other sites