sina alex 1 Posted August 21, 2020 hello everybody i have a plan about marking th position where , the player killed. so in init.sqf in addEventHandler killed i add a sign(empty small wooden ), i try add command for give it init to set globaltexture command but not work. the sign just got spawn with no screen on it,(my init cmd not activated). its code : Player addEventHandler ["Killed", { params ["_unit", "_killer", "_instigator", "_useEffects"]; if (side _unit == independent) then { systemchat "_unit killed by _killer"; _f1 = createvehicle ["FlagCarrierChecked", getPos _unit, [], 0, "NONE"]; _f1 setVehicleInit "this obj setObjectTextureGlobal [0,'p\1.jpg']"; hint "You killed by _killer";nul = [] execVM "onPlayerKilled.sqf"; }; }]; help me to spawn that sign with my custom pic on dead pos.ty Share this post Link to post Share on other sites
Larrow 2823 Posted August 22, 2020 11 hours ago, sina alex said: if (side _unit == independent) A dead unit is side civilian. Instead check the side of its group. There are also other problems as commented below. Spoiler player addEventHandler[ "Killed", { params[ "_unit", "_killer", "_instigator", "_useEffects" ]; //If we do not have an instigator if ( isNull _instigator ) then { //was the killer a controlled UAV _instigator = ( UAVControl vehicle _killer ) select 0; //If we still do not have an instigator if ( isNull _instigator ) then { //use the killer _instigator = _killer; }; }; if ( side group _unit == independent ) then { systemChat format[ "%1 killed by %2", name _unit, name _instigator ]; _f1 = createVehicle[ "FlagCarrierChecked", getPos _unit, [], 0, "NONE" ]; //This command no longer exists in Arma 3 //setVehicleInit _f1 setObjectTextureGlobal[ 0, "p\1.jpg" ]; hint format[ "You were killed by %1", name _instigator ]; //This event script is called automatically on player death //nul = [] execVM "onPlayerKilled.sqf"; }; }]; 1 Share this post Link to post Share on other sites
sina alex 1 Posted August 22, 2020 4 hours ago, Larrow said: A dead unit is side civilian. Instead check the side of its group. There are also other problems as commented below. Hide contents player addEventHandler[ "Killed", { params[ "_unit", "_killer", "_instigator", "_useEffects" ]; //If we do not have an instigator if ( isNull _instigator ) then { //was the killer a controlled UAV _instigator = ( UAVControl vehicle _killer ) select 0; //If we still do not have an instigator if ( isNull _instigator ) then { //use the killer _instigator = _killer; }; }; if ( side group _unit == independent ) then { systemChat format[ "%1 killed by %2", name _unit, name _instigator ]; _f1 = createVehicle[ "FlagCarrierChecked", getPos _unit, [], 0, "NONE" ]; //This command no longer exists in Arma 3 //setVehicleInit _f1 setObjectTextureGlobal[ 0, "p\1.jpg" ]; hint format[ "You were killed by %1", name _instigator ]; //This event script is called automatically on player death //nul = [] execVM "onPlayerKilled.sqf"; }; }]; thank for answer. i know it about formating a dialog or chat. and about killing board. now what i can do for add init to spawned objects via script?? Share this post Link to post Share on other sites
Larrow 2823 Posted August 23, 2020 On 8/22/2020 at 10:26 AM, sina alex said: now what i can do for add init to spawned objects via script? Why do you need to specifically add an init? You have spawned the object, so have a reference to the object, on which you can do anything like. Same as above where setObjectGlobal is used on the spawned object _f1. 1 Share this post Link to post Share on other sites
sina alex 1 Posted August 23, 2020 1 hour ago, Larrow said: Why do you need to specifically add an init? You have spawned the object, so have a reference to the object, on which you can do anything like. Same as above where setObjectGlobal is used on the spawned object _f1. like it? _f1 = createvehicle ["FlagCarrierChecked", getPos _unit, [], 0, "NONE"]; _f1 setObjectTextureGlobal [0,"p\1.jpg"]; ?? Share this post Link to post Share on other sites