It is currently Tue Jul 16, 2019 8:36 pm

All times are UTC

Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Thu Feb 16, 2017 11:26 pm 
User avatar

Joined: Thu Aug 18, 2016 10:10 am
Posts: 22
Below is a code snippet that should be used in all missions. We are using an event script as defined here by BIS These scripts go in the mission folder route and are called upon certain conditions by the game engine. Below is our onPlayerRespawn.sqf. This script is initiated on first spawn into the game and subsequent respawns. This script is handy for setting player variables and ensuring that they are reset when respawning into the game. You could also use features here like remove GPS or other item to make sure players dont use GPS if its in their loadout. Also included is a definition on what these are doing.

player enableStamina false; // We dont use stamina in our games so we remove this on the player
player setCustomAimCoef 0.25; // effects weapon sway this is a good variable as its not impossible to use a weapon nor is it fixed
player setVariable ["BIS_noCoreConversations", true]; // removes AI radio Chatter from player
player setSpeaker "NoVoice"; // removes AI radio chatter from player

the code beneath these variables shows player names when looking at a player at a distance of 20 meters or under. This is handy especially since we have removed ACE for the time being due to perfomance issues and having a simple player tag on the person you are looking at removes confusion.

if (local player) then {

   player enableStamina false;
    player setCustomAimCoef 0.25;
   player setVariable ["BIS_noCoreConversations", true];
   player setSpeaker "NoVoice";


if (isServer) exitWith {};

Waituntil{!isNull player};

while{true} do {

   sleep 0.5;

   if((isPlayer cursorTarget) && (alive cursorTarget) && (side cursorTarget == side player) && (player distance cursorTarget < 20)) then {

      _tag = name cursorTarget;
      cutText [_tag,"PLAIN",0.1];



Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group