-
Content Count
311 -
Joined
-
Last visited
-
Medals
Everything posted by gokitty1199
-
hinting passed variable, displaying <no shape>
gokitty1199 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
im passing the triggers name from a trigger to a script and then passing the same variable from that script using publicVariableServer. this was working earlier today before i started to rewrite how the triggers spawn but the file that is getting the variable passed to it was not changed which makes no sense to me as to why it is throwing the error. here is the function that creates the trigger and passes the name into register.sqf. you can see r1Trigger is getting passed into register.sqf, now if i pass the name as a string it works just fine such as "cash1 = player addAction ['register 1', {['r1Trigger'] execVM 'server\loot\register.sqf';}];" but even if i use call compile to turn it back into the name of the object in the script, it still throws <no shape> when i hint the name. _area = [0.462, 0.637, 10.650, true, 1]; makeTrig1Fnc = { _pos = [3119, 6303.5, 0.312]; r1Trigger = createTrigger ["EmptyDetector", [_pos select 0, _pos select 1, _pos select 2]]; r1Trigger setTriggerArea [_area select 0, _area select 1, _area select 2, _area select 3, _area select 4]; r1Trigger setTriggerActivation ["GUER", "PRESENT", true]; r1Trigger setTriggerStatements ["this && player in thisList", "cash1 = player addAction ['register 1', {[r1Trigger] execVM 'server\loot\register.sqf';}];", "player removeAction cash1;"]; }; here is the register.sqf _register = _this select 0; _h = [_register]spawn { _register = (_this select 0); hint str _register;//THIS IS WHERE IM TRYING TO PRINT THE HINT FOR TESTING REASONS _register1 = r1Trigger; _register2 = r2Trigger; _register3 = r3Trigger; _register4 = r4Trigger; _moneyAmount = selectRandom [50, 100, 150, 175, 200, 250, 275, 400, 325, 2000]; switch (_register) do { case _register1: { registerUsed = [_register]; publicVariableServer "registerUsed"; player removeAction cash1; award = award + _moneyAmount; //hint format ["You found %1 dollars. Amount Stolen: $%2", _moneyAmount, award]; [r1SoundPos, ["cashRegister", 125, 1]] remoteExec ["say3d", 0, true]; _register setPos [0, 0, 0]; }; }; }; the other strange thing is that it works inside the switch statement and it runs for _register1 and _register2(the rest not included to keep the post size down) but long story short, it just works. but when i try to pass it to the server with publicVariableServer, that is where i run into the problems. when it was hinting the name properly, thats when it was working fine and i was able to work on the registerUsed eventHandler, why is it printing out <no slot>, ive restarted my game and everything and it just makes no sense to me as to why its doing this. -
hinting passed variable, displaying <no shape>
gokitty1199 replied to gokitty1199's topic in ARMA 3 - MISSION EDITING & SCRIPTING
oh that i did not know, i thought it was having issues passing it through because early on in the missions development it was printing out the variable name of the trigger just fine but suddenly stopped and i had no clue what no shape meant. thanks guys -
Help with remoteExec and class CfgFunctions
gokitty1199 replied to cklymowsky's topic in ARMA 3 - MISSION EDITING & SCRIPTING
it should still be the same. just run remoteExec with the path and the name of the .sqf file like in the post above, it executes the .sqf file on all clients null = [[""], "path\to\your\file.sqf"] remoteExec ["execVM", 0, true]; -
no clue exactly what your asking but this is what is assumed from the lack of information lol. create a global array like this, put whatever markers you want to have by default into it like this myMarkerArray = ["marker1"]; STEP 1: create triggers surrounding the area that you want the player to enter and inside the condition put this && player in thisList inside the activation lets have it execute a script and pass the name of the marker into it like so null = ["marker2"] execVM "addMarker.sqf"; //END OF STEP 1 STEP 2: then inside of addMarker.sqf we will pushBack the markers name into the myMarkerArray array like so _marker = (_this select 0); myMarkerArray pushBack _marker; //END OF STEP 2 so now myMarkerArray should look like this ["marker1", "marker2"]. in order to add more markers just repeat step 1 by creating a trigger. and inside where it says "marker2" just change that to "marker3" and so on and so on so you do not have the same names being pushed into the array.
-
Script Request: Save Gear on Death
gokitty1199 replied to 49lone82's topic in ARMA 3 - MISSION EDITING & SCRIPTING
to make this simple do this. inside the missions folder, create a file called onPlayerRespawn.sqf and onPlayerKilled.sqf like this https://gyazo.com/41ad339d0bceb91620a09e7a8bcd2500 inside of onPlayerKilled paste this into it playersGear = getUnitLoadout player; inside of onPlayerRespawn paste this into it player setUnitLoadout playersGear; when the player is killed it saves his gear, when the player respawns it loads the variable(playersGear) that has the units loadout saved onto the player. make sense? -
Is there an Easier way to set a task succeeded when three hostages are rescued then I have.
gokitty1199 replied to avibird 1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
if your having them go into a vehicle and driving away then use the in command as the trigger condition like this hostage1 in car && hostage2 in car && hostage3 in car or if you just wanted the trigger to activate when they join the players group(yours) then use this as the triggers condition hostage1 in units group player && hostage2 in units group player && hostage3 in units group player heres how you would make them join the group as well btw _units = [hostage1, hostage2, hostage3]; _units join (group player); -
Help with remoteExec and class CfgFunctions
gokitty1199 replied to cklymowsky's topic in ARMA 3 - MISSION EDITING & SCRIPTING
if your trying to *execVM* your sqf file with remoteExec you need to do it more so how its done normally but backwards if that makes sense. when executing a file you need the path of the file and the extension(.sqf) so fn_sectorDistances should be functions\SetUp\fn_sectorDistances.sqf. null = [["PARAMETERS HERE"], "functions\SetUp\fn_sectorDistances.sqf"] remoteExec ["execVM", 0, true]; -
How to create blood stains on ground, bullet hit blood fx, and burning shard fx
gokitty1199 replied to johnnyboy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
i know this is off topic(i cant post a new topic, maybe because i have low post count) but i have a dumb question, im making a mission and making a script to have a scroll menu for the user to select and change his weapons at anytime and same deal with attachments and such. it is working when i open my mission ingame and type execVM "loadouts.sqf"; and i scroll my mouse and click rifles and then it gives me my mk18(code below), however when i put execVM "loadouts.sqf"; in my init.sqf i get the option to select rifle, but when i do nothing happens. any idea why its not working properly when loaded from my init.sqf? player addAction ["rifle", mk18]; mk18 = { player addWeapon 'srifle_EBR_F'; player addPrimaryWeaponItem "20Rnd_762x51_Mag"; }; -
would you still buy any BI product ?
gokitty1199 replied to sgtsev3n's topic in BOHEMIA INTERACTIVE - GENERAL
yes i would and probably will continue to do so. the only thing i hope for is for better optimization which will hopefully be coming with arma 4 on a new engine sometime in the coming years.