Jump to content

VonNexus

Member
  • Content Count

    73
  • Joined

  • Last visited

  • Medals

Posts posted by VonNexus


  1. Right, looks like I've figured this out.

    The easiest way is the one that sion suggested.

    I got to something similar to this:

    Put down a game logic (it can also be an object, a small object, a blank helipad, a random object which you will hide via script, anything will do). Then put down your wreck and name it, I have chosen smoking_wreck for example. The code goes straight into the game logic init field:

    smoke1 = "test_EmptyObjectForSmoke" createVehicle position this; smoke1 setpos (getpos smoking_wreck);

    By doing this, you'll have a nice smoke column (also influenced by wind) billowing from the wreck. You can also type the above code in the wreck init field, but I've noticed that this results in having the column slightly far from the actual object. That explains the setpos. I have tried just with adding the setpos after the createVehicle, but that results in having the wrong position aswell.

    F2k Sel, what do you mean by "fire and smoke modules" ?

    I do know that you can find modules for spawning smoke grenades, chemlights or tracers, but didn't notice any ambiental smoke related module.


  2. Hello everyone,

    I'm working on a mission based on close quarter combat in a half destroyed village filled with wrecks. I'd really like to have smoke billowing from some of the wrecks because it would help getting a good atmosphere, plus learning how to spawn the smoke effect could come in handy when doing Search and Rescue missions.

    I'm not pretty new to this kind of stuff, as I've used that effect in some ArmA 2 scenarios.

    In ArmA 2, I've always used two methods:

    The first is the "infamous"

    BIS_Effects_Burn=compile preprocessFileLineNumbers "\ca\Data\ParticleEffects\SCRIPTS\destruction\burn.sqf";

    which is suggested in almost every ArmA 2 post about having things smoking.

    The second one would be using a smoke.sqf containing the following:

    private ["_obj","_Smoke","_smoke2"];
    
    _obj = _this select 0;
    
    _smoke = "#particlesource" createVehicleLocal getpos _obj;
    _smoke setParticleCircle [0, [0, 0, 0]];
    _smoke setParticleRandom [0, [0.1, 0.1, 0.1], [random 0.5,random 0.5,random 0.5], 0.1, 0.1, [0, 0, 0, 0], 0.1, 0];
    _smoke setParticleParams[["\ca\Data\ParticleEffects\Universal\Universal",16,7,48,1], "", "Billboard", 25, 35, 
    [0,0,0],[0,0,0], 0, 1, 0.96, 1, [10,15,30,45], [[0.1, 0.1, 0.1, 1],[0.9, 0.9, 0.9, 1],[0.9, 0.9, 0.9, 0.9],[0.1,0.1,0.1,0.5]], [0.3], 0.2, 0.2,"", "", _obj];
    _smoke setDropInterval 0.8;
    
    _smoke2 = "#particlesource" createVehicleLocal getpos _obj;
    _smoke2 setParticleCircle [0, [0, 0, 0]];
    _smoke2 setParticleRandom [0, [0.1, 0.1, 0.1], [random 0.5,random 0.5,random 0.5], 0.1, 0.1, [0, 0, 0, 0], 0.1, 0];
    _smoke2 setParticleParams[["\ca\Data\ParticleEffects\Universal\Universal",16,7,48], "", "Billboard", 1, 25, 
    [0, 0, 0], [0, 0, 0.5], 1, 1, 0.75, 10, [10,30,40], [[1, 1, 1, 0.3],[1, 1, 1, 0.2],[1, 1, 1, 0.1]], [0.1], 0, 0, "", "", _obj];
    _smoke2 setDropInterval 1;
    
    
    
    
    waitUntil {apu_stop_smoke == 1};
    deleteVehicle _smoke2;
    deleteVehicle _smoke;
    
    exit;
    
    

    This plays around with particles and I haven't made it, I just took it from a BI mission or somewhere else.

    In ArmA 3 things are different. None of the two methods would work. The first one would display an error when used, stating that burn.sqf can't be found in the game directory (they probably have changed some things). The second method also leads to an error, this time implying the fact that the particles used in the script are nowhere to be found.

    I did come across a way to make fire and smoke togheter using a blank helipad and typing

    this = "test_EmptyObjectForFireBig" createVehicle position this;

    This works, but it's not ideal for my mission because players should be allowed to take cover behind the smoking wrecks, but since fire in ArmA 3 harms people, that wouldn't be possible. Also IAs could run into it, and that's not good.

    It is somehow possible to have wrecks smoking in the game, as can be seen in the first mission of the "Adapt" single player episode where Aggelchori is almost burnt to the ground and several wreckage has smoke billowing from it.

    I tried searching for what I'm looking for on the Internet and on the forum. Found nothing but ArmA 2 scripts which won't do the trick.

    Is anyone out there familiar with ArmA 3 particles' system and new ways to handle smoke, fire and effects?

    Thanks in advice.


  3. Hello guys, basically I have made a soldier model (created after the nice ARMA 2 Russian Soldier model released by BIS) l with Blender and then exported it in the .p3d extension thanks to a plugin posted in the forums. No problems when I open it in Oxygen 2, it all works like a charm. Before working with the textures and improving the model, I'd like to see how it's rendered in ARMA 2. I've created a very poor addon folder. In it, I've got the .p3d model (called CC_riotcontrol_1) , the config.cpp, a model.cfg and a texHeader.bin (which I didn't create, I suppose it's something that came out when I firstly converted the file in the .pbo extension with BinPBO) .

    The config.cpp is at it follows :

    #define true	1
    #define false	0
    
    class CfgPatches {
    class CC_riotcontrol_1 {
    	units[] = {"CC_riotcontrol_1"};
    	weapons[] = {};
    	requiredVersion = 1.0;
    	requiredAddons[] = {};
    };
    };
    
    class CfgVehicleClasses {
    class CC_riotcontrol_1 {
    	displayName = "Test CC";
    };
    };
    
    class CfgVehicles {
    class All {};
    
    class AllVehicles : All {};
    
    class Land : AllVehicles {};
    
    class Man : Land {};
    
    class Soldier : Man {};
    
    class Civilian : Man {};
    
     class USMC_Soldier_Base : Soldier {};
    
     class USMC_Soldier : USMC_Soldier_Base {};
    
     class USMC_Soldier_Light : USMC_Soldier {};
    
    class CC_riotcontrol_1 : USMC_Soldier_Light {
    	vehicleClass = "CC_riotcontrol_1";
    	displayName = "CC RIOT";
    	model = "@test\CC_riotcontrol_1.p3d";
    
    	class Wounds {
    		tex[] = {};
    		mat[] = {"ca\characters\heads\male\defaulthead\data\hhl.rvmat", "ca\characters\heads\male\defaulthead\data\hhl_wounds.rvmat", "ca\characters\heads\male\defaulthead\data\hhl_wounds2.rvmat"};
    	};
    };
    };

    When I start up the game and get in the editor no problems. I place the soldier and perview, it loads up and suddenly an error shows up: Cannot load material file __charcoal_.002

    I don't know what the hell this error is. The word "charcoal" doesn't show up both in the config.cpp and in the model.cfg . So where the hell is it from?

    Any help would be very appreciated, thanks in advice!!!


  4. Ok from my first read I assumed it was just to do with the on click aspect.

    There were a few things

    addwaypoint references a group, not the unit.

    the if statement will only check for a result once not multiple times waiting until the condition is true. You need some sort of loop for that eg waituntil.

    I'm not sure of how close in has to be when referencing a location, but I think you would need something to check for a bigger range. Also the location isn't a position, but a location object.

    You used mv_22, then you use osprey where osprey doesn't look to be defined.

    Added a couple of extra checks, when trying to get it working. Plus smoke as I was curoius as to how it would look.

    Try this:

    alphaleader sidechat "Open your map and mark the drop zone for the supplies by clicking one time where you'd like for the ammos to be dropped";
    _mk = createMarker ["drop_zone_mk",position player]; 
    _mk setMarkerColor "colorBlue";
    _mk setMarkerShape "icon";
    _mk setMarkerSize [1,1];
    _mk setMarkerDir random -10 +random 20;
    _mk setmarkerText "Supply Drop Zone";
    _mk setMarkerType "empty";
    mapclick = false;
    onMapSingleClick """drop_zone_mk"" setMarkerPos _pos; clickpos = _pos; mapclick = true; onMapSingleClick """";true;";
    
    waituntil {mapclick};
    
    alphaleader sidechat "Drop zone marked!";
    mv_22 enableSimulation true;
    mv_22 hideObject false;
    sleep 0.5;
    _start_pos = getpos mv_22;
    deleteWaypoint [group mv_22,1];
    _wp=(group mv_22) addWaypoint [getMarkerPos "drop_zone_mk",0];
    _wp setWaypointType "MOVE";
    _wp setWaypointBehaviour "CARELESS";
    
    mv_22 flyinheight 200;
    
    _mk setMarkerType "Flag1";
    
    waituntil  {! alive mv_22 or (mv_22 distance clickpos) < 700} ;
    if (alive mv_22) then
    {
    sleep (3 + (random 3));
    hint "drop drop drop";
    _ammos = "USSpecialWeaponsBox" createVehicle (mv_22 modeltoworld [0,-10,0]); 
    _smoke = "SmokeShellyellow" createVehicle (mv_22 modeltoworld [0,-10,0]);
     	_chute = "parachute_US_EP1" createVehicle  (mv_22 modeltoworld [0,-10,0]);
      	_ammos attachTo [_chute, [0,0,0], "paraEnd"];
    _smoke attachTo [_chute, [0,0,0], "paraEnd"];
      	_chute setpos (mv_22 modeltoworld [0,-10,0]);
    
    deleteWaypoint [group mv_22,1];
    sleep 3;
    
    _wp=(group mv_22) addWaypoint [_start_pos,0];
    _wp setWaypointType "MOVE";
    _wp setWaypointSpeed "NORMAL";
    _wp setWaypointBehaviour "CARELESS";
    
    	waituntil  {! alive mv_22 or (mv_22 distance _start_pos) < 500} ;
     	mv_22 enableSimulation false;
    mv_22 hideObject true;      
    };

    I'll try with this one then. However, Osprey is just the groupname of the Mv22.

    EDIT: OK your code does perfectly the trick. However when the crate lands it goes underground. I tought that paraEnd in the attachTo command would have avoided that, but apparently it hasn't.


  5. Have you tried moving the remove onclick functionality to below the waituntil, it should work there.

    alphaleader sidechat "Open your map and mark the drop zone for the supplies by clicking one time where you'd like for the ammos to be dropped";
    _mk = createMarker ["drop_zone_mk",position player]; 
    _mk setMarkerColor "colorBlue";
    _mk setMarkerShape "icon";
    _mk setMarkerSize [1,1];
    _mk setMarkerDir random -10 +random 20;
    _mk setmarkerText "Supply Drop Zone";
    _mk setMarkerType "empty";
    mapclick = false;
    onMapSingleClick """drop_zone_mk"" setMarkerPos _pos; clickpos = _pos; mapclick = true; true;";
    
    
    
    waituntil {mapclick};
    onMapSingleClick "";
    
    alphaleader sidechat "Drop zone marked!";
    mv_22 enableSimulation true;
    mv_22 hideObject false;
    _wp=osprey addWaypoint [getMarkerPos "drop_zone_mk",0];
    _wp setWaypointType "MOVE";
    _wp setWaypointSpeed "LIMITED";
    _wp setWaypointBehaviour "CARELESS";
    
    
    
    if (mapclick) then 
    { _mk setMarkerType "Flag1";
    
    };
    

    Not tested, but is how I have it setup when users update their steerpoint in my PINS mod.

    Also is this line required at all after the waituntil?

    _pos = clickpos;

    Hope this helps

    Blake

    Thanks for the reply.

    I changed my code to yours, and yes, the clickpos thing apparently it's not needed. However, nothing changed. The marker stuff and waypoint works perfectly, but still getting issues with the _pos statement.


  6. In the last two days I've been trying to write a simple supply drop script. It uses the onMapSingleClick to create a marker in the place where the platoon commander (called alphaleader) wants the ammos to be dropped. The marker works as a destination for a MV22 Osprey's (called mv_22) wayipoint.The script is called via a Radio Alpha trigger. This is what I've done so far:

    alphaleader sidechat "Open your map and mark the drop zone for the supplies by clicking one time where you'd like for the ammos to be dropped";
    _mk = createMarker ["drop_zone_mk",position player]; 
    _mk setMarkerColor "colorBlue";
    _mk setMarkerShape "icon";
    _mk setMarkerSize [1,1];
    _mk setMarkerDir random -10 +random 20;
    _mk setmarkerText "Supply Drop Zone";
    _mk setMarkerType "empty";
    mapclick = false;
    onMapSingleClick """drop_zone_mk"" setMarkerPos _pos; clickpos = _pos; mapclick = true; onMapSingleClick """";true;";
    
    
    
    waituntil {mapclick};
    _pos = clickpos;
    alphaleader sidechat "Drop zone marked!";
    mv_22 enableSimulation true;
    mv_22 hideObject false;
    _wp=osprey addWaypoint [getMarkerPos "drop_zone_mk",0];
    _wp setWaypointType "MOVE";
    _wp setWaypointSpeed "LIMITED";
    _wp setWaypointBehaviour "CARELESS";
    
    
    
    if (mapclick) then 
    { _mk setMarkerType "Flag1";
    
    };
    
    
    
    if (mv_22 in _pos) then 
    { ammos = "USSpecialWeaponsBox" createVehicle (position mv_22); 
     chute = "parachute_US_EP1" createVehicle  (position mv_22);
      ammos attachTo [chute, [0,0,0], "paraEnd"];
      ammos setpos [getpos mv_22 select 0, getpos mv_22 select 1, 34];
       chute setpos [getpos mv_22 select 0, getpos mv_22 select 1, 34];
    
    };           
    
    
    
    
    exit;
    

    This script has no problem but the last part. The piece of code simply doesn't get triggered. However, _pos should be the name of the location created with the map click. Maybe I deleted the location with the commands

    onMapSingleClick """";true;";

    ?

    I've not been able to figure out what's wrong.


  7. If nothing helps maybe just depbo someone else mission with working overview check his code and write the same or copy his overview file. Add your picture, text etc and all should be ok.

    That's what I tried to do a couple of minutes ago. Nothing, it doesn't work.

    ---------- Post added at 11:12 PM ---------- Previous post was at 11:03 PM ----------

    EDIT

    Alright, It seems that the problem is the image format. BI Wiki says that a JPEG should work fine for an overview, but, as far as I have seen, is not, because I tested the same code posted above with a .paa image and it worked like a charm. Maybe one of the last patches removed the possibility of using JPGs for overviews, or such things?


  8. Its probably not this but pictures jpeg from Ofp times should be for example:

    256x256, 512x512, 1024x1024, 512x256 etc. And maybe high and wight are to big? But even with that i think that mission should not crash, you should not see picture in overview but mission should work.

    I tried changing the width and height parameters to the ones you used in OPF. But it didn't work. It crashed like in the other times.


  9. Hi guys, I've searched a little bit around in the forum but actually didn't found nothing about the problem I have.

    Basically, I'm making a mission and I wanted to add an overview to it. To do that, I downloaded the A2OD Editor, an useful tool that should allow you to make it easier to build up mission overviews and briefings.

    I compiled every field required in the tool, and saved what I did as overview.html.

    This is what is in overview.html:

    html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
    	<title>Overview</title>
    </head>
    <body bgcolor="#FFFFFF">
    
    	<p align="center"><img src="over.jpg" width="612" height="512"></p>
    	<p>
    	Prova
    	</p>
    
    </body>
    </html>
    

    "over.jpg" is of course the name of the image I want to use for the overview. It is a JPEG 688x616 which I put in the mission folder (there is no subfolder as you can see from the script), "Prova" is a simple line for testing.

    Now you will be wondering, what's wrong then?

    I really don't know, but when I saved the mission as a SP one and I clicked on it in the SP Missions interface, the game crashed. I really don't know where the error should be, even because the overview.html was made with a specific programme which I belive should work good.

    A2OD was made for ARMA 2 and I am running a Combined Operation with the last patch on. May this be the problem?

    Thanks in advice for any help you'll provide.


  10. Basically I made up a script that prevents normal soldiers from using sniper rifles , I called the file sniperCheck.sqf and I execute it in the init of soldiers. It works fine in the part where it checks if the unit has a sniper rifle and kills him after 10 seconds but it won't display the sidechat that warns the soldier that he cannot use the sniper rifle.

    This is the code:

    _soldier=_this select 0;
    
    
    while {alive _soldier} do {
    if (  (_soldier hasWeapon "M24")) then {_soldier sideChat  "Non sei un cecchino e non puoi usare questo fucile.Gettalo subito o sarai ucciso entro 10 secondi!"};  
    sleep  10;
    if (  (_soldier hasWeapon "M24")) then {_soldier setDamage 1};  
    };
    
    
    
    

    So how do I fix this?


  11. Hi folks,

    basically I'm working on a mission and I'd like to make a torture scene, where a ChDkZ officer is hitting a female city major with his rifle. To do so, I created a file named hostageanims.sqf. This is what it contains:

    _hostage=_this select 0;
    _badguy=_this select 1;
    
    WaitUntil { !alive _badguy};
    
    #torture
    _major switchMove "Testsurrender";
    _badguy switchMove "CtsDoktor_Vojak_uder1";
    goto torture;

    Then , in the mission, I have a trigger. On Activation I have this:

    nul = [City_major,officer] execVM "hostageanims1.sqf";

    Of course, 'officer' is the name of the ChDkZ soldier and 'City_major' is the name of the female hostage.

    But when I start the mission and the trigger activates itself, an error is displayed:

    Preprocessor faied on C:\Users\admin\Documents\ArmA 2 Other Profiles\=ASc=Pv1%2eNexus\missions\CISP_Village_Sweep.Chernarus\hostageanims.sqf - error 7

    What's wrong with the script? Using the command -showScriptError nothing is displayed so I assume that the syntax has no problem, but I don't have a clue about this strange error. I'd be glad is someone helps me figuring this problem out.

    Thanks!


  12. Where do I put the exec command for the script? And has it to be a nul=[] execVM "filename" or a simple this execVM "filename"?

    Your script does't work because it have not a check

    in edit the trigger is check continuous so just insert:

    _unit=_this select 0;

    _hostage1=_this select 1;

    while {true} do{

    if (_unit distance _hostage1 < 5) then {

    hint "You found the hostage!";

    sleep 1;

    };

    however it's always better to insert a pause in a check with the comand: sleep x

    blue = < (lower to)

    green = check loop

    red = variable (waiting in seconds)


  13. Heya,

    basically I've got a guy tied up in a depot wich I called hostage1. What I want to do is displaying a hint when a player is at least at 5 meters from him. I could do it via trigger, but I've got the editor full of them so I'm trying to execute this using a basic .sqf script (those things with if, while, do, else). I've read some guides but still didn't figure out how to accomplish a basic .sqf script. This is what I tried to use

    _unit=_this select 0;
    _hostage1=_this select 1;
    
    
    if (_unit distance _hostage1 > 5) then {hint "You found the hostage!"}; 
    
    

    It seems right to me, but doesn't work. I tried to exec it in a trigger and even in the init but it just won't work. So what is wrong?


  14. Actually I merged the demo mission with my mission and the trigger condition is correct, I just copied and pasted it wrong on the forum.

    Your trigger condition seems to be different than what's in that demo mission:

    local player && alive player && damage vehicle player < 1 && gcrsropedeployed == "false" && typeof vehicle player in gcrsrapelvehiclearray && driver vehicle player == player

    ---------- Post added at 07:46 PM ---------- Previous post was at 05:50 PM ----------

    Have you tied doing what I did (adding classnames of OA choppers) in the script's files Kylania? Does it work to you?

×