Jump to content

LittleAndy

Member
  • Content Count

    10
  • Joined

  • Last visited

  • Medals

Posts posted by LittleAndy


  1. not on my PC at the moment (and I'm a noob at SQF) so I can't give any advanced examples but maybe I can help a bit. my code might not be the best but yeah

    if you want to teleport the player 5-10 metres behind it
    (warning: if the vehicle isn't on relatively flat ground, it may teleport them in the air)

    if you want to teleport the player inside of the vehicle
    (warning: will not teleport them if the vehicle is full)

    // to teleport 5-10m behind the vehicle
    // ! warning ! may teleport the player in the air if the vehicle is not on relatively flat ground
    player setPosWorld (teleportVariableName modelToWorld [0,5,0]);
    
    // to teleport inside of the vehicle
    // ! warning ! may not teleport the player if the vehicle is full
    player moveInAny (teleportVariableName);
    Quote

    I genuinely don't know what anything after the "teleportVariableName" bracket does, but it doesn't seem to work without it

    ^ they are the parameters of addAction. they're basically the settings for the command "addAction".
    have a look at https://community.bistudio.com/wiki/addAction for more documentation

    • Like 1

  2. 2 hours ago, Lukas Lee said:

     

    If I set the script to false with the third parameter, I also have two stopping options. When I run the code through the initServer.sqf, nothing is displayed. I also tried the initServerPlayer.sqf and nothing is displayed as well.

    The goal is that when a player finish the holdAction, the option should be cleared for all players.
    Do you have any idea how to fix this?

     

    i am a noob at sqf so please take what i say with a pinch of salt <<< (also just realised that Harzach has a much more clearer and shorter explanation for some stuff that I say here)

    originally when you put it into init.sqf, the remoteExec is executing it for the SERVER and ALL CLIENTS (all players) ON MISSION START & everytime a player joins, that's probably why it appears twice, and there'd be a lot more actions if you weren't testing solo on the dedicated server

    (if the below is in initServer.sqf where it is initially executed once on server)
    the second parameter determines what machines/computers/ it is executed on. (0 = all clients + server; in other words, every player including the server)

    the third parameter (boolean true/false) determines whether the addaction is given to JIP players (people who hotjoin / join after mission start).
    true = people who hotjoin after mission start will have the action (as it is executed on their computer upon joining)
    false = people who hotjoin after mission start will not have the action


    initServer.sqf should work on dedicated for what Harzach said, so I'm not really sure what the problem is tbh
    make sure the object that the action is attached to isnt too large because of the distance conditions

    you can always try something with bis_fnc_holdactionremove (i think that's the name anyways) but i can't check the wiki right now. dont know if it's actually necessary
     


  3. personally i'd use CLV Trigger Debugger, I've rarely ever used this tool though https://steamcommunity.com/sharedfiles/filedetails/?id=2585755302

    you can also maybe use addaction scripts on your zeus character to execute more scripts,
    or trigger radio alpha/bravo in the trigger (use til

    (the downside to addactions is that if you die, you'll probably lose all ur actions, and trigger radio alpha/bravo/etc in the trigger is accessible by all players in the server)

×