creartan
Member-
Content Count
34 -
Joined
-
Last visited
-
Medals
Everything posted by creartan
-
setvehiclevarname is it Global?, if not how?
creartan posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
player setVehicleVarName "newvariablez"; newvariablez = player; //its working, but is it global?; is this Global?? if not how to make it global? maybe some xample of the init function? and why its not working when i use: _varname = vehiclevarname player; _varname setVehicleVarName "newvariablez"; newvariablez = _varname; //its not working; -
setvehiclevarname is it Global?, if not how?
creartan replied to creartan's topic in ARMA 3 - MISSION EDITING & SCRIPTING
http://forums.bistudio.com/showthread.php?142594-publicVariable-JIP "Also remember that it doesn't register on the client that publics it." i found it on the thread. is that right? creating some mission, :) -
setvehiclevarname is it Global?, if not how?
creartan replied to creartan's topic in ARMA 3 - MISSION EDITING & SCRIPTING
still cannot work, have any other alternative? -
setvehiclevarname is it Global?, if not how?
creartan replied to creartan's topic in ARMA 3 - MISSION EDITING & SCRIPTING
i already create two function inside INIT, but it still not working. init MP_fnc_changevar = { private["_oldvar","_newvar"]; _oldvar = _this select 0; _newvar = _this select 1; _oldvar setVehicleVarName _newvar; }; //this is the change variable; MP_fnc_changeref = { private["_varold","_varnew"]; _varold = _this select 0; _varnew = _this select 1; _varnew = _varold; }; // this is the reference; inside Script.sqf [[Player,"coolguy"],"MP_fnc_changevar",nil,true] call BIS_fnc_MP; [[Player,coolguy],"MP_fnc_changeref",nil,true] call BIS_fnc_MP; please help, the simple one please. where i did wrong there?? -
script checking variable passed by eventhandler, correct me, how to?
creartan posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
MPeventhandler _this addMPEventHandler ["MPRespawn","(_this select 0) execVM 'respawnscript.sqf'"]; respawnscript.sqf <<- problem is here; it seems it cannot do the variable check? "if (_this == variablezz)" or what is the right way to do? if (_this == variablezz) then { _this execVM "gearscript.sqf"; }; error.. gearscript.sqf removeallweapons _this; etc.. ---------- Post added at 05:46 ---------- Previous post was at 05:35 ---------- oh my.. is our variable transfered to the new unit, or not? -
script checking variable passed by eventhandler, correct me, how to?
creartan replied to creartan's topic in ARMA 3 - MISSION EDITING & SCRIPTING
repsawn is on. or maybe the problem is because of changing the var ingame Player setVehicleVarName "ranger"; ranger = Player; ingame, and didnt get registered to the old respawnEH?? ---------- Post added at 06:34 ---------- Previous post was at 06:27 ---------- because when i use Editor varname it respawned with the same variable, but when i use ingame by script Player setVehicleVarName "ranger"; ranger = Player; it will respawn with different variable; and cannot intterract with action assigned to him but when i try to change back to that variable "ranger", the variable "ranger" is unavailable i dont know.. confused, is im doin wrong when changing variable? -
script checking variable passed by eventhandler, correct me, how to?
creartan replied to creartan's topic in ARMA 3 - MISSION EDITING & SCRIPTING
i just make a trial error, and i think the variable is left to the old unit, but im not sure maybe until the old unit get deleted by deletevehicle this; and how to prevent the creation of the new unit? and the this setVariable ["BIS_enableRandomization", false];?? where to put it? -
i put in init MP_fnc_changevar = { private["_oldvar","_newvar"]; _oldvar = _this select 0; _newvar = _this select 1; _oldvar setVehicleVarName "_newvar"; _newvar = _oldvar; }; in dialog onButtonClick = "CloseDialog 0;_nil = [_this select 1] execVM 'changevar.sqf'"; in script //check if variablename is Nil or available if (isNil {"Newvar"}) exitwith { hint "Newvar is already being used"; sleep 2; hint ""; }; //and if variable name is available it will change it if (playerside == east && !isNil {"Newvar"}) exitwith { [[_this,Newvar],"MP_fnc_changevar",nil,true] call BIS_fnc_MP; hint "you are Newvar"; sleep 2; hint ""; }; and it seems nothing is working the Nil check and the change varname please can you guys show me, how to do it right?
-
script checking variable passed by eventhandler, correct me, how to?
creartan replied to creartan's topic in ARMA 3 - MISSION EDITING & SCRIPTING
ohya the basic knowledge, is the variablename of the OLD unit get transfered to the NEW unit? MPrespawn and respawn will it effect in multiplayer? because im creating this for multiplayer -
script checking variable passed by eventhandler, correct me, how to?
creartan replied to creartan's topic in ARMA 3 - MISSION EDITING & SCRIPTING
variablezz is the variable name tobe checked to the unit, i want to check _this is, _this variable name is variablezz. if (_this == variablezz) then.. if (_this == variableaa) then.. -
change variable name Global, how
creartan replied to creartan's topic in ARMA 3 - MISSION EDITING & SCRIPTING
ok i got it, im using "PLAYER" instead of _this is that right? -
change variable name Global, how
creartan replied to creartan's topic in ARMA 3 - MISSION EDITING & SCRIPTING
is the parameter from the dialog right?, is it same as the addaction parameter? mean, _attched = _this select 0; _caller = _this select 1; _ID = _this select 2; and theres something wierd, when i put _varname = vehiclevarname _this; the script not working anymore, why is that? is it somting to do with the dialog? ---------- Post added at 20:46 ---------- Previous post was at 20:42 ---------- MP_fnc_changeVar = compileFinal ' _old = (_this select 0); _new = (_this select 1); call compile format ["%2 = %1", _old call {_this;}, _new]; '; [["_myOldVar","newVar"],"MP_fnc_changeVar",nil,true] call BIS_fnc_MP; is't that same as _newvar = _oldvar what if i put it inside one function? MP_fnc_changevar = { private["_oldvar","_newvar"]; _oldvar = _this select 0; _newvar = _this select 1; _oldvar setVehicleVarName "_newvar"; _newvar = _oldvar; // this is the reference, its same right?; }; -
change variable name Global, how
creartan replied to creartan's topic in ARMA 3 - MISSION EDITING & SCRIPTING
killzone thanks for the response 1.MP_fnc_changevar made my self to change var Globaly each client, or is "setVehicleVarName" is GLOBAL? 2.and what is the parameter from the dialog, is it same as the addaction parameter? mean, _attched = _this select 0; _caller = _this select 1; _ID = _this select 2; ---------- Post added at 20:16 ---------- Previous post was at 20:12 ---------- hi dread just saw your response comin, yup theres something i need to do with changing varname ingame, MP_fnc_changeVar = compileFinal ' _old = (_this select 0); _new = (_this select 1); call compile format ["%2 = %1", _old call {_this;}, _new]; '; [["_myOldVar","newVar"],"MP_fnc_changeVar",nil,true] call BIS_fnc_MP; so this is the same function as setvehiclevarname? like changing the varname? and what is the scope you mean? -
how to make all added EH runs?
creartan replied to creartan's topic in ARMA 3 - MISSION EDITING & SCRIPTING
..... -
ok ill just stick with add eh within editor
-
LOOP check health/damage script
creartan replied to creartan's topic in ARMA 3 - MISSION EDITING & SCRIPTING
i dont really know how to use loop,:p but i want to achieve, if unit damage 0.9 it will check the unit health for 30sec, but if in the moment before reaching 30sec unit damage become less< than 0.9 it will set unit back to default anim and stop the loop i did use the handleheal eh but it seems never fire.. -
i want to make a LOOP for health check script triggered by EH hit have two choice, but actually they both dont work, :p hehe can someone help me please.. wich one better and the right way to do it? First choise of loop for [{_i=0}, {_i<30}, {_i=_i+1}] do { if ((damage _this < 0.9)) than { _this setdamage 0; _this SetUnitPos "up"; _this switchMove ""; _this enableAI "ANIM"; _this setCaptive false; _this allowDamage true; if((damage _this < 0.9)) exitWith{}; }; }; Second Choice of loop scopename "healthcheck"; while ((damage _this >= 0.9)) do { if ((damage _this < 0.9)) than { _this setdamage 0; _this SetUnitPos "up"; _this SetUnitPos ""; _this switchMove ""; _this enableAI "ANIM"; _this setCaptive false; _this allowDamage true; if((damage _this < 0.9)) exitWith{}; }; if ((damage _this >= 0.9)) then { breakto "healthcheck"; }; };
-
i want to put this inside unit (unplayable ai) initialization the code is bleow, but its not working, can someone point out wheres the error? this addEventHandler ["hit", "if (damage this >= 0.9) then { [east,-2] call BIS_fnc_respawnTickets; this SetUnitPos 'down'; this switchMove 'AinjPpneMrunSnonWnonDb_still'; this disableAI 'ANIM'; this setCaptive true; this globalchat 'Ai Wounded -2'; sleep 30; if (damage this >= 0.9) then {this hideobject true; this setposATL getposATL base;} else {false};} else {false};"]
-
LOOP check health/damage script
creartan replied to creartan's topic in ARMA 3 - MISSION EDITING & SCRIPTING
because at the other side ive already make a hit trigger wounded script, now i want to do the healed event, so the unit will switch back to normal anim, i did use aishealed.. to trigger the switchback but it seem the EH ais healed is not working, or maybe can u show me the right way to use aishealed? or maybe handleheal eh? -
add EH hit, will switchmove unit
creartan replied to creartan's topic in ARMA 3 - MISSION EDITING & SCRIPTING
if ((damage _this >= 0.8) && (side _this == EAST)) then {}; still not working, any other alternative? and is there any alternative for the globalchat so it will not stutter? it repetedly send the global chat for 3 times even i just put one time -
add EH hit, will switchmove unit
creartan replied to creartan's topic in ARMA 3 - MISSION EDITING & SCRIPTING
it just decrese by -2 than the losing screen pop up with ticket still 300 ---------- Post added at 22:41 ---------- Previous post was at 22:38 ---------- if ((damage _this) >= 0.8) then { [east,-1] call BIS_fnc_respawnTickets; _this SetUnitPos "down"; _this switchMove "AinjPpneMrunSnonWnonDb_still"; _this disableAI "ANIM"; _this setCaptive true; _this globalchat "Ai Wounded -1"; sleep 10; if ((damage _this) >= 0.8 and (side _this) == east) then { _this hideobject true; _this setposATL (getposATL basepp); }; } else {false}; hey if im going to put the side thing, where to put it? i put if ((damage _this) >= 0.8 and (side _this) == east) then but seems not working and the globalchat it stuttering, is there any alternative than globalchat to tell the wounded event? -
i want to put this EH into unit initialization via script how?
creartan posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
i want to put this into unit(unplayable ai) initialization via script how? so i just need to copy the script into each unit init, how? sorry im new to scripting, usually do it inside the editor, please help me. can you guys tell me the step to do it? this allowfleeing courage; this enablefatigue false; this addEventHandler ["HandleDamage", { _object = _this select 0; _damage = _this select 2; if((damage _object) + _damage > 0.9) then {0.9} else {_damage}; }]; -
add EH hit, will switchmove unit
creartan replied to creartan's topic in ARMA 3 - MISSION EDITING & SCRIPTING
wow, its working iceman.. the unit is now down when get hit. but afterthe hit EH run, now the game says that my side is lose immediately iceman would you explain about the, private ["_side"]; _side = side _this; what is that code do? what is private? why side? what is _this? sorry i get verry exited to know about the scripting now :) -
add EH hit, will switchmove unit
creartan replied to creartan's topic in ARMA 3 - MISSION EDITING & SCRIPTING
not working, already change _unit = _this select 0, the EH is not firing event giving it huge damage this addEventHandler ["hit","if (damage _this select 0 >= 0.8) then { _unit = _this select 0;[east,-2] call BIS_fnc_respawnTickets; _unit SetUnitPos 'down'; _unit switchMove 'AinjPpneMrunSnonWnonDb_still'; _unit disableAI 'ANIM'; _unit setCaptive true; _unit globalchat 'Ai Wounded -2'; sleep 30; if (damage _unit >= 0.8) then {_unit hideobject true; _unit setposATL getposATL base;}} else {false};"]; ---------- Post added at 17:59 ---------- Previous post was at 17:49 ---------- i make a tweak the "" is not needed after EH this addEventHandler ["hit",{_unit = _this select 0; if (damage _unit >= 0.8) then {[east,-2] call BIS_fnc_respawnTickets; _unit SetUnitPos 'down'; _unit switchMove 'AinjPpneMrunSnonWnonDb_still'; _unit disableAI 'ANIM'; _unit setCaptive true; _unit globalchat 'Ai Wounded -2'; sleep 30; if (damage _unit >= 0.8) then {_unit hideobject true; _unit setposATL getposATL base;}} else {false};}]; and now its working, but the sleep thing is not working -
SIMPLE WOUND SCRIPT, i have a code where to put it?
creartan posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
i usually make this situation or code editor based TRIGGER, i mean using the editor but i feel very excausted to put it 4 TRIGGER for each unit so im trying to make it easier with script but im new, so.. HOW?? please... what is the right step by step to make this situation work via script? below is the script i want to accomplish if (damage _this >= 0.9) then { [east,-2] call BIS_fnc_respawnTickets; _this SetUnitPos "down"; _this switchMove "AinjPpneMrunSnonWnonDb_still"; _This disableAI "ANIM"; _this setCaptive true; _this globalchat "REBEL Ai Wounded -2"; sleep 30; if (damage _this >= 0.9) then { _this hideobject true; _this setposATL getposATL base; } else {false}; }else {false};