Jump to content

creartan

Member
  • Content Count

    34
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

1 Follower

About creartan

  • Rank
    Private First Class
  1. 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, :)
  2. still cannot work, have any other alternative?
  3. 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??
  4. 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;
  5. 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?
  6. 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?
  7. 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
  8. 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..
  9. 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?
  10. ok i got it, im using "PLAYER" instead of _this is that right?
  11. 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?; };
  12. 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?
  13. 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?
  14. ok ill just stick with add eh within editor
×