Lanmanfm Posted September 4, 2013 Report Share Posted September 4, 2013 I am going to build a small town to give those poor souls that spawn into Kamenka a chance to get some good loot stuff before heading north, I don't want to modify street signs, I just want to use a billboard and a custom flag at the firehouse. I have been using this tutorial, but not having any luck with it showing ... http://www.youtube.com/watch?v=5GNo2ALKXnE Link to comment Share on other sites More sharing options...
0 Kind-Sir Posted September 4, 2013 Report Share Posted September 4, 2013 Here's a quick script I mocked up in order to paint "Free Candy" on a black-textured s1203: _vehicles = ["S1203_TK_CIV_EP1"]; _ids = ["2302"]; { _keyID = _x getVariable ["characterID","0"]; if(_keyID == _ids select 0) then { _x setObjectTexture [0,"resources\candy.jpg"]; } } foreach (nearestObjects [[3000,3000,0], _vehicles, 50000]); **THIS IS A TEST CODE, IT IS NOT CODE THAT SHOULD BE RELIABLE NOR COUNTED ON This could be used on other objects that can be textures, such as flags and maybe boards. Rayden 1 Link to comment Share on other sites More sharing options...
0 Lanmanfm Posted September 4, 2013 Author Report Share Posted September 4, 2013 would this go in the mission.sqm or sqf file? Link to comment Share on other sites More sharing options...
0 Kind-Sir Posted September 4, 2013 Report Share Posted September 4, 2013 would this go in the mission.sqm or sqf file? I included this in a separate file, then called it within the if (!isDedicated) function near the bottom of the init.sqf. _textures = [] execVM "scripts\textures\textures.sqf"; THIS WILL NOT WORK FOR YOU AS-IS, you will have to edit it to fit for you. Link to comment Share on other sites More sharing options...
0 Rayden Posted September 4, 2013 Report Share Posted September 4, 2013 That is simply awesome, going to play around with this tonight. :) Link to comment Share on other sites More sharing options...
0 Kind-Sir Posted September 4, 2013 Report Share Posted September 4, 2013 The code listed above would possibly work best when spawning in vehicles from the database. Link to comment Share on other sites More sharing options...
0 drunkenjawa Posted September 6, 2013 Report Share Posted September 6, 2013 We have custom signs and flags on our server. You don't need any code to implement them, as long as you're not intending on spawning them with a new texture (in game I mean). it's a string in the objects init string when you place it in the editor that needs to be set. Basically you set the object texture to the custom jpg you want to use on your flag or sign, then upload that jpg to the root directory of your mission.pbo. Increases the pbo size a fair bit so try and make it a really small sized jpg. Sorry, really not sure if this is what you were after or not. this setFlagTexture "newtexture.jpg"; That should work for the flag anyway, this is entered in the 'init string' part of the object properties inside the editor itself. If not I'll have to open up the editor when I get home and see exactly what I put in there Link to comment Share on other sites More sharing options...
0 Lanmanfm Posted September 7, 2013 Author Report Share Posted September 7, 2013 that is what I was doing with the tutorial and it wasn't working and was giving me an error of not finding the jpg file when I would try to save it. Link to comment Share on other sites More sharing options...
0 drunkenjawa Posted September 7, 2013 Report Share Posted September 7, 2013 Ah - you have to also have the jpeg file in your mission folder that you've created for it to show in the editor, e.g. users/documents/arma2 other profiles/yourusername/yourmissionname Otherwise, root directory of the mission pbo to show on the server in a live environment Link to comment Share on other sites More sharing options...
0 Lanmanfm Posted September 10, 2013 Author Report Share Posted September 10, 2013 I will give it a try tonight, been trying to get our new server up and running for longer than a few minutes at a time and had a successful 4 hour run last night before we did a manual (not lagging, but since the 2 devs were calling it a night, we decided to push the reboot instead of letting it go)- now to get the BE scheduler working... Link to comment Share on other sites More sharing options...
0 MGJamesProductions Posted October 3, 2013 Report Share Posted October 3, 2013 Well i have a small problem that when i attempt to do a different texture on my flag it doesnt appear in-game (server) but works fine in the 3D and 2D editor ... Here is an example on how i got it set up on my mission.sqm: class Vehicles { items=1; class Item0 { position[]={9609.0801,82.017899,13722.2}; id=102; side="EMPTY"; vehicle="FlagCarrierBLUFOR_EP1"; skill=0.2; init="this SetFlagTexture ""flag.jpg""; this setpos [9609.0801, 13722.2, -1.5258789e-005];"; }; But ingame there is no flag just the pole ... i would appreciate some help. EDIT: this one is my sqm code for the 3d editor: class Vehicles { items=1; class Item0 { side="EMPTY"; id=1; position[]={9609.0801, -1.5258789e-005, 13722.2}; vehicle="FlagCarrierBLUFOR_EP1"; init="this SetFlagTexture ""flag.jpg""; this setpos [9609.0801, 13722.2, -1.5258789e-005];"; }; and it works just fine .... dont know what to do on this problem. Link to comment Share on other sites More sharing options...
0 MGJamesProductions Posted October 6, 2013 Report Share Posted October 6, 2013 I´ve also tried to convert the pic in paa but doesnt seem to work .... Link to comment Share on other sites More sharing options...
0 crckdns Posted October 7, 2013 Report Share Posted October 7, 2013 MGJamesProductions I've the exact same problem right now~ I spawned a new flagpole, initialized it with the new texture.., after saving it I can see the flag in preview w/o problems. When I put the flag texture on my server and add/edit the flagpole in the mission.sqf it will spawn the flag but w/o the texture..the pole stays blank/empty. my snippet of the mission.sqf: _vehicle_9998 = objNull; if (true) then { _this = createVehicle ["FlagPole_EP1", [6557.2295, 5592.2808, 21.184782], [], 0, "CAN_COLLIDE"]; _vehicle_9998 = _this; _this setVehicleInit "_this setFlagTexture ""fail0r_flag3.jpg"""; _this setPos [6557.2295, 5592.2808, 21.184782]; }; I copied it from the mission.sqf of the saved level and pasted it onto my server (like I do with custom buildings) but the flag is rly making me crazy! as I said, it is working in the preview, but not on the live server <_< I also tried just to use _this setFlagTexture "flag.jpg"; but this was also leading to an error message on map-load and empty pole error: "cannot load texture mpmissions\dayz_epoch_11.chernarus\flag.jpg". Link to comment Share on other sites More sharing options...
0 Joerivang Posted October 9, 2013 Report Share Posted October 9, 2013 Same problem as @MGJamesProductions and @crckdns, it works fine in editor but there's just an empty flagpole ingame. _vehicle_3 = objNull; if (true) then { _this = createVehicle ["FlagPole_EP1", [9352.6484, 9900.8584, -9.1552734e-005], [], 0, "CAN_COLLIDE"]; _vehicle_3 = _this; _this setDir -142.9415; _this setVehicleInit "this SetFlagTexture ""z_dmikflag.jpg"""; _this setPos [9352.6484, 9900.8584, -9.1552734e-005]; }; Link to comment Share on other sites More sharing options...
0 Kind-Sir Posted October 13, 2013 Report Share Posted October 13, 2013 Same problem as @MGJamesProductions and @crckdns, it works fine in editor but there's just an empty flagpole ingame. _vehicle_3 = objNull; if (true) then { _this = createVehicle ["FlagPole_EP1", [9352.6484, 9900.8584, -9.1552734e-005], [], 0, "CAN_COLLIDE"]; _vehicle_3 = _this; _this setDir -142.9415; _this setVehicleInit "this SetFlagTexture ""z_dmikflag.jpg"""; _this setPos [9352.6484, 9900.8584, -9.1552734e-005]; }; Make sure _vehicle_3 is not already defined if you are adding it to the mission.sqf. Link to comment Share on other sites More sharing options...
0 crckdns Posted October 14, 2013 Report Share Posted October 14, 2013 Make sure _vehicle_3 is not already defined if you are adding it to the mission.sqf. This comment doesn't help/apply at all here in this case~ as our flags ARE shown ingame, else there would be no flag and/or an error in the RPT file would show up. Also in my case there is for sure no vehicle higher than ID 600 - I checked it twice.. Instead we get an empty pole or empty white flag. Link to comment Share on other sites More sharing options...
0 crckdns Posted June 25, 2014 Report Share Posted June 25, 2014 wow.. I see that the thread was never answered :D I've found a way to do the stuff we were all trying to do! The problem is/was, that the texture we were setting .. wasn't in the mission file or loaded while logging in. my code works~ it spawns the flag only once while mission load (it HAS to be done by server load, not the player, else you will end up with X flags for each player logging in (funny looking I can tell!) if (isServer) then { _vehicle_481 = objNull; if (true) then { _this = createVehicle ["FlagPole_EP1", [6293.7886, 7857.4033, -0.01191554], [], 0, "CAN_COLLIDE"]; _vehicle_481 = _this; _this setDir -56.676376; _this setPos [6293.7886, 7857.4033, -0.01191554]; _this setFlagTexture 'scripts\fail0r_flag3.jpg'; }; }; residing in own sqf file flags.sqf and called via init.sqf in the mission folder (dayz_epoch_11.chernarus) ..you can add it in the already existing isServer section of init.sqf ..to avoid being processed by players for nothing (edit the if () away!) Link to comment Share on other sites More sharing options...
0 calamity Posted June 25, 2014 Report Share Posted June 25, 2014 wow.. I see that the thread was never answered :D I've found a way to do the stuff we were all trying to do! The problem is/was, that the texture we were setting .. wasn't in the mission file or loaded while logging in. my code works~ it spawns the flag only once while mission load (it HAS to be done by server load, not the player, else you will end up with X flags for each player logging in (funny looking I can tell!) if (isServer) then { _vehicle_481 = objNull; if (true) then { _this = createVehicle ["FlagPole_EP1", [6293.7886, 7857.4033, -0.01191554], [], 0, "CAN_COLLIDE"]; _vehicle_481 = _this; _this setDir -56.676376; _this setPos [6293.7886, 7857.4033, -0.01191554]; _this setFlagTexture 'scripts\fail0r_flag3.jpg'; }; }; what size is your fail0r_flag3.jpg like 256x256 512x512 ??? does it matter ??? Link to comment Share on other sites More sharing options...
0 crckdns Posted June 26, 2014 Report Share Posted June 26, 2014 what size is your fail0r_flag3.jpg like 256x256 512x512 ??? does it matter ??? my file has 512x256 ..and it works :D never tried something bigger (mind the size of your mission file!) ..with the flag it grew for 31KB ^^ Link to comment Share on other sites More sharing options...
0 meanbeandk Posted August 21, 2014 Report Share Posted August 21, 2014 Can't get this to work Please help me vehicle_256 = objNull; if (true) then { _this = createVehicle ["FlagCarrierGUE", [12731.5, 12275, 12.85], [], 0, "CAN_COLLIDE"]; _vehicle_256 = _this; _this setDir -56.676376; _this setPos [12731.5, 12275, 12.85]; _this setFlagTexture 'custom\dk.jpg'; }; Have picture in custom folder named dk.jpg 512x256 Get error can't load picture Link to comment Share on other sites More sharing options...
0 StiflersM0M Posted October 13, 2014 Report Share Posted October 13, 2014 Its some time ago, but nobody replyed here, so i want to ask, anybody find out why it wont work ? i tried it so much times which different files and different execution methodes, but it says anytime "cant load texture {PATH}...." ..... Link to comment Share on other sites More sharing options...
0 MrEnzO Posted October 13, 2014 Report Share Posted October 13, 2014 I put mine in the root of the mission pbo and it worked. Link to comment Share on other sites More sharing options...
0 StiflersM0M Posted October 13, 2014 Report Share Posted October 13, 2014 I put mine in the root of the mission pbo and it worked. God bless you! Link to comment Share on other sites More sharing options...
0 Thug Posted May 8, 2015 Report Share Posted May 8, 2015 Can someone PLEASE tell me what is wrong with the following. All I see is the flag pole. I get this warning in the RPT: Warning Message: Cannot load texture mpmissions\dayz_epoch_17.chernarus\flag.jpg. I have my picture in the root of the mission side. its call flag.jpg. its 512x256. The following is my script, it is called flag.sqf and it is located in the mission side at signs_flags\flag.sqf btw i call the file flag.sqf in the init.sqf []execVM "signs_flags\flag.sqf"; if (isServer) then { _vehicle_4 = objNull; if (true) then { _this = createVehicle ["FlagPole_EP1", [6354.6543, 7792.2114, -0.00012207031], [], 0, "CAN_COLLIDE]; _vehicle_4 = _this; _this setDir 127.06387; _this setPos [6354.6543, 7792.2114, -0.00012207031]; _this setFlagTexture 'flag.jpg'; }; }; Link to comment Share on other sites More sharing options...
0 Thug Posted May 10, 2015 Report Share Posted May 10, 2015 Guys you mite want to check this link out, its in Epochmod forums and one i started and getting some good input. Link to comment Share on other sites More sharing options...
0 Halvhjearne Posted May 13, 2015 Report Share Posted May 13, 2015 i knda forgot about this, here is my flag: Link to comment Share on other sites More sharing options...
Question
Lanmanfm
I am going to build a small town to give those poor souls that spawn into Kamenka a chance to get some good loot stuff before heading north,
I don't want to modify street signs, I just want to use a billboard and a custom flag at the firehouse.
I have been using this tutorial, but not having any luck with it showing ...
http://www.youtube.com/watch?v=5GNo2ALKXnE
Link to comment
Share on other sites
25 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now