Jump to content

Nirrti

Member
  • Content Count

    31
  • Joined

  • Last visited

  • Medals

Posts posted by Nirrti


  1. 3 hours ago, Larrow said:

    Universal particle

    and change...

    to...

    
    ["\A3\data_f\ParticleEffects\Universal\Universal",16,7,24,1]

    See explanation of numbers in linked post above.

     

     

    The first class in cfgFunctions is a tag and will be used to compile the function name. So you should be using jetpacksmoke_fnc_jetpacksmoke.

    Not very friendly naming. I was suggest reading about CfgFunctions HERE.

    
    class CfgFunctions
    {
    	class NTI	//tag
    	{
    		class jetpack	//category ( used in functions viewer ) 
    		{
    			class jetpacksmoke { file = "scripts\jetpacksmoke.sqf" };
    		};
    	};
    };
    
    //compiles the function
    //NTI_fnc_jetpacksmoke

    Usage...

    
    [ player ] remoteExec[ "NTI_fnc_jetpacksmoke", 0, false ];

    0 means remote execute on all connected machines.

     

    Then just add to the top of jetpacksmoke.sqf

    
    if ( isServer && { isDedicated } ) exitWith {};
    
    //OR
    //if !( hasInterface ) exitWith {};

    So if the script is remoteExec'ed to the server, and the server has no client then the script exits. No need to spawn particles if no one is around to see them.

     

    Think that's all correct.

     

     

    Well, I gave that a try, but the smoke still isn't showing up at all with the cfgfunctions, so I must be doing something wrong, the jetpacksmoke is currently

    if ( isServer && { isDedicated } ) exitWith {};
    
    _obj = _this select 0;    //object
    
    private ["_obj"];
    
    _smoke = "#particlesource" createVehicle getPosATL _obj;
    
    _smoke setParticleRandom [0, [0.25, 0.25, 0], [0.2, 0.2, 0], 0, 0.25, [0, 0, 0, 0.1], 0, 0];
    _smoke setParticleParams [["a3\data_f\particleeffects\universal\universal.p3d",16,7,48,1],"","billboard", 1, 6, [0, 0, 0], [0, 0, 1.5], 0, 10, 7.9, 0.066, [0.25, 5], [[0.33, 0.33, 0.33, 0.8], [0.66, 0.66, 0.66, 0.4], [1, 1, 1, 0]], [0.125], 1, 0, "", "", _smoke];
    _smoke setDropInterval 0.05;
    _smoke attachTo [_obj, [0,-0.2,1.2],"spine2"];
    sleep 0.5;
    deletevehicle _smoke;

    The actual script that the player is activating whenever they're activating the jetpack is

    _vel = velocity player;
    _dir = direction player;
    _speed = 2;
    player setVelocity [
    	(_vel select 0) + (sin _dir * _speed), 
    	(_vel select 1) + (cos _dir * _speed), 
    	(_vel select 2) + 3
    ];
    [player] remoteExec[ "NTI_fnc_jetpacksmoke", 0, false ];

    And I put that cfgfunctions in the description.ext

     

    So I'm at a complete loss 😞


  2. 2 minutes ago, POLPOX said:

    Uh, sorry, I was sure it is inproper p3d and that's one of the problem. Looks like I've done another dyslexia moment and jumped to conclusion.

    Anyway, I'd suggest to use these particles:

    https://community.bistudio.com/wiki/User:POLPOX#Particle_effects

    Which are vanilla ones.

     

    PS, your video looks dope, of course in a good terms.

    Okay, I'll have to see about replacing it with one of those then, thanks.


  3. 25 minutes ago, POLPOX said:

    Because \Ca\Data\ParticleEffects\FireAndSmokeAnim\SmokeAnim.p3d is an outdated p3d. It exists in Arma 2 or older. Use a proper p3d.

    Well it sure is working as a smoke clientside, and it's referenced in the arma 3 wiki, so I don't know what to tell you. But if you wanted to be a bit more helpful, could you maybe point me at the right one then?

     

    Edit

     

    After cleaning up the things, the smoke still isn't showing up at all now, with the cfgfunctions compile, @Tankbuster, so I've no idea how to even fix that. Unless the cfgfuntions I've got is incorret, but I've zero experience doing those.

     

    This is how it looks with the init preprocessFileLineNumbers

     

    https://streamable.com/rc6m5


  4. 48 minutes ago, Tankbuster said:

    The script needs to run on all players, but it has to show the particles on the player who is using the jetpack.

    So, when the player starts to use the jetpack, they need to tell every other player to run jetpacksmoke but reference the jetpack user object in it.

    I think you might be over-complicating matters. Let's break it down .

     

    Write a function which all the players have, personally, I'd make a function and compile it in CfgFunctions.

    This function needs to take, as a parameter, an object which should be the person who is using the jetpack.

     

    As I said earlier, remoteexec can handle this and it's how I would do it.

     

    [player] remoteexec ["jetpacksmoke", [0,-2] select isdedicated, false];

     

    So, player (the guy using the jetpack) is going to start the script called jetpacksmoke.

    The [0,-2] select isDedicated  means that the server will run on all the clients and not the server, unless one of the players is the server too, in which case it will run there too.

    false means that JIP players won't see it if they join while it's running but it also means they won't get their join slowed down with running the function for jetpack flights that have ended.

     

    The remoteExec mean all players run the function because the jetpack user was sent as a parameter, they will all see the particles on him.

     

    I can't see anything obviously wrong with jetpacksmoke, you don't need the not isdedicated line because remoteexec looks after that.

     

    Why do you publicVariable "jetpacksmoke" in the function? It's not a variable.

     

     

    Oh, that's a leftover from when I tried using it with the init compile, forgot to remove that 😄

     

    I'll have to test out after cleaning it soon, currently busy so will report back.


  5. 22 minutes ago, Tankbuster said:

    Got it. So the script needs to send a reference to the player itself, you were closer earlier on, I think

     

    
    [player] remotexec ["jetpacksmoke", [0,-2] select isdedicated, false];

    Just to confirm, the script is compiled somewhere, ideally in CfGFunctions?

    Yeah, I can compile it in the description with cfgfunctions, I'll give that a try.

     

    Edit

     

    Hmm, still no errors, still not showing smoke, and the sound isn't activating, although I assume it's because it's compiled through the cfgfunctions, and the script is using another preprocessFileLineNumbers compiled call. The sound I can probably figure out later on once the smoke is actually visible properly to everyone.

     

    It is compiled in the description.ext with the cfgfunctions I mentioned earlier;

    class CfgFunctions
    {
    	class jetpacksmoke
    	{
    		class jetpacksmoke
    		{
    			class jetpacksmoke {file = "scripts\jetpacksmoke.sqf";};
    		};
    	};
    };

     

    This is the current jetpack script, it's really rather simple, and it relies on player tapping a key (user action 1 in this case), to provide lift/thrust pushing the player upwards and onwards. This is what the addaction has on it.

    _vel = velocity player;
    _dir = direction player;
    _speed = 2;
    player setVelocity [
    	(_vel select 0) + (sin _dir * _speed), 
    	(_vel select 1) + (cos _dir * _speed), 
    	(_vel select 2) + 3
    ];
    [player] remoteexec ["jetpacksmoke", [0,-2] select isdedicated, false];
    

     

    if I use

    nul = [player] call jetpacksmoke;

    instead of 

    [player] remoteexec ["jetpacksmoke", [0,-2] select isdedicated, false];

    and have the jetpacksmoke compiled in the init with

    jetpacksmoke = compile preprocessFileLineNumbers "scripts\jetpacksmoke.sqf"

     

    That's where I was at the beginning, which is smoke shows to only to the client that is activating the script.

     

    I'm somewhat close to just giving up with this damn thing since it really doesn't want to work 😞

     

    This is the full jetpacksmoke currently.

    private ["_obj"];
    
    _obj = _this select 0;    //object
    
    publicVariable "jetpacksmoke";
    if (not isDedicated) then {
    
    
    
    _smoke = "#particlesource" createVehicle getPosATL _obj;
    nul = [_smoke,"jetpackthrust"] call 3Dbroadcast;
    _smoke setParticleRandom [0, [0.25, 0.25, 0], [0.2, 0.2, 0], 0, 0.25, [0, 0, 0, 0.1], 0, 0];
    _smoke setParticleParams [["\Ca\Data\ParticleEffects\FireAndSmokeAnim\SmokeAnim.p3d", 8, 3, 1], "", "Billboard", 1, 6, [0, 0, 0], [0, 0, 1.5], 0, 10, 7.9, 0.066, [0.25, 5], [[0.33, 0.33, 0.33, 0.8], [0.66, 0.66, 0.66, 0.4], [1, 1, 1, 0]], [0.125], 1, 0, "", "", _smoke];
    _smoke setDropInterval 0.05;
    _smoke attachTo [_obj, [0,-0.2,1.2],"spine2"];
    sleep 0.5;
    deletevehicle _smoke;
    };
    
    true

     


  6. 11 minutes ago, Tankbuster said:

    tob is a public object - it is created and named by other scripts in the mission. It exists on every player machine so when I call the spawnsmoke function on players, it knows where to make the smoke.

    Don't get too hung up on the public variable thing because it doesn't really apply to you. You are creating your particles at and on the player. I was creating them at an object some distance away.

    Oooh, so it would just be

    [tob] remoteExec ["jetpacksmoke",  [0, 0] select isDedicated, false];

    or something? I'll give that a try and see how it goes.


  7. 5 minutes ago, Tankbuster said:

    No, in my snippet, tob is targetobject - where I want the smoke particles to appear. The object is public across the network so all clients know where it is. I'm passing it to the clients as a script parameter. The rest of the line says basically, if this is a dedicated server, execute it on all clients. If not, execute it here AND all clients. Your script wont work on a server because player doesn't exist there.

     

     

    well now I'm just confused, I don't see tob defined anywhere in the script you posted earlier, unless the post is not showing the full script, I can only see the smoke particle part. Although if it is a public variable across the network, won't that cause issue if I want to have more than one player using the jetpack script at a time?


  8. 5 minutes ago, Tankbuster said:

    Yes, pretty much. If you get file not found errors, you know youre CfgFunctions hierarchy doesn't match your file layout.

    As it turns out, I don't call it as a function, I remotexec it. Apologies, I've only just arrived at my PC and got to check actual working code.

    
    [tob] remoteExec ["tky_fnc_spawnsmoke",  [0, -2] select isDedicated, false];

    It's a bit illogical.. I compile it, then execute it. And there's me saying I knew MP scripting, lol.

    Hah, sounds about right for arma from what experience I have. So if I wanted a player to run it I'd do it something like this? I've never even seen remotexec before, as I've never even gone down the rabbit hole of compiling cfgfunctions in the description.

    [player] remoteExec ["jetpacksmoke",  [0, 0] select isDedicated, false];

     


  9. 3 minutes ago, Tankbuster said:

    Not sure. Try compiling it in CfgFunctions in description.ext. I know that worked for me.

    So something like this?

     

    class CfgFunctions
    {
    	class jetpacksmoke
    	{
    		class jetpacksmoke
    		{
    			class jetpacksmoke {file = "scripts\jetpacksmoke.sqf";};
    		};
    	};
    };

    how would I go about calling the function, same bit as currently (that is "nul = [player] call jetpacksmoke")?


  10. 2 minutes ago, Tankbuster said:

    You appear to be going at the problem in the right way, so I do think you'll get it eventually. We crossposted, so there's a post above from me you've yet to read. May or may not help 🙂

    Yeah, just did 😛 Compiled in the description.ext though? Am I going the wrong way compiling it in the init, could that be the cause? I'm really not that experienced with arma 3 scripting so I'm going about the way I've learned just by hours and hours of wiki surfing.

     


  11. 6 minutes ago, Tankbuster said:

    I can't know what you do and don't know apart from looking at your script on the phone screen I'm currently using. Yes, even with particles set to low, players should see at least some particles. As you might already know (this is as much for other readers as you), the particle settings in options>video don't actually control the quality or resolution of the particles, but the number that client can display.

    So that leads us to think that, as you said up top, there's a problem with your script. Have you debugged it to the extent that you know for sure it is running on the clients? Put in a diag_log in it and see if that shows up in their RPTs?

    Yeah, it is running, at least the rest of the script relating to the jetpack (sound is played (I omitted this piece from the script in the OP as it is working as it should), and the origin for the sound is the particle vehicle (_smoke) created by the script. I've not tried diag_log yet, although I suppose that needs to be the next step, unless my script in itself is just not creating the particle properly.


  12. 1 minute ago, Tankbuster said:

    I have you the 2 basics for particle creation in MP. That's not irrelevant.

    I'll be able to look over how I did it later today when I can get Mrs Tank off the PC - she works from home. It was some time ago, but I seem to remember I created a function to make the particles on all the clients and called that from the the server.

    I more meant the video settings issue, although I do understand where it's coming from, but it should still be able to draw some of the particles even with lower settings. But thanks a lot if you are able to help, I've been racking my brain with this for a few days and I just can't get the damn thing to work and it's getting on my nerves.


  13. 4 minutes ago, Tankbuster said:

    It's probably a video settings issue. The lower the particles setting they have, the fewer particles will be displayed.

    The players who can't see them probably have a lower particles quality setting than you.

    Nah, that isn't the case, because they can't see the particles even there's nothing else going on, and everyone is running the game at fairly high settings. I'm fairly certain this has nothing to do with that and more to do with the issue that I can't get the particles to be generated on each client, just the one firing the jetpack.


  14. So I have no idea if this is the right place to post this, but I figured I'd find someone smarter than myself to help me with this.

     

    So I'm trying to script a jetpack, and I've got it working like I want apart from the fact that the particles, as they are with Arma 3 engine, are clientside only, and I kind of need them to be visible to other clients as well so that the player using it is a bit easier to spot.

     

     

    This is my current script for making the particlearray,  but it isn't visible to other players, and I'm using line command "nul = [player] call jetpacksmoke;" to fire the particle script, in the jetpack script. I've got "jetpacksmoke = compile preprocessFileLineNumbers "scripts\jetpacksmoke.sqf";" in the init.sqf as well.

    private ["_obj"];
    
    _obj = _this select 0;    //object
    
    publicVariable "jetpacksmoke";
    if (not isDedicated) then {
    
    _smoke = "#particlesource" createVehicle getPosATL _obj;
    _smoke setParticleRandom [0, [0.25, 0.25, 0], [0.2, 0.2, 0], 0, 0.25, [0, 0, 0, 0.1], 0, 0];
    _smoke setParticleParams [["\Ca\Data\ParticleEffects\FireAndSmokeAnim\SmokeAnim.p3d", 8, 3, 1], "", "Billboard", 1, 6, [0, 0, 0], [0, 0, 1.5], 0, 10, 7.9, 0.066, [0.25, 5], [[0.33, 0.33, 0.33, 0.8], [0.66, 0.66, 0.66, 0.4], [1, 1, 1, 0]], [0.125], 1, 0, "", "", _obj];
    _smoke setDropInterval 0.05;
    
    sleep 0.5;
    
    deletevehicle _smoke;
    };
    
    true

    It shows up for the user using the jetpack, but it, as explained, doesn't show it to other players, anyone familiar with the MP compatible particle stuff able to help?


  15. 10 minutes ago, Covfefe said:

     

    I am so sorry. I have been speaking with the wrong person.

    @Nirrti As the true copyright holder of this mod, I purpose as truce in which both sides can come to an accord:

     

    1. Your mod is put back on the workshop for everyone to use.

    2. @Kiory I will reword my patch however you wish and say (or not say) whatever you want.

    3. When a compatibility patch/version is created and uploaded to the workshop I will remove mine permanently as it would be superfluous.

    Well, it's up to kiory, also, the ballistics on the ammo are just straight up lifted from the game itself, though they're taken from 30mm autocannon rounds, which is why they probably seem weird at first. This was my suggestion as I wanted an accurate enough weapon for long range shooting, but with the damage tweaked not to be overpowered. They already are sort of out-of-this-realm considering firing a 25mm with such high velocities would imply high pressure and as such would break the user's shoulder completely, considering the only recoil dampening feature on the gun is the muzzlebrake. We thought they were still within "realistic" capabilities considering the futuristic setting and possible extra advancements in technology etc.

    • Like 1

  16. Aye, I don't like ACE nor do I want native support for it, but if people make an external patch for it (akin to the one "covfefe" made, but less pretentious and tryhard), all the more power to them.

     

    Also, CBA/JSDG support is already in the talks, but Kiory is pretty busy with another project right now, so it'll have to come down the pipeline.

×