Tand3rsson
Member-
Content Count
64 -
Joined
-
Last visited
-
Medals
Community Reputation
10 GoodAbout Tand3rsson
-
Rank
Corporal
-
Setting Color of SUV?
Tand3rsson replied to Ghosthawk's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I know this is along time since post, but I would guess that the problem you have with it still switching randomly is because you run it through the init of the vehicle, and it goes of before all players are initialized. That is my guess. I would run it through a script, waiting untill all players are ready. Or more preciesly for each player when they are ready. -
[eods] explosive ordnance disposal suite
Tand3rsson replied to monovdd's topic in ARMA 3 - ADDONS & MODS: DISCUSSION
Thank you! -
[eods] explosive ordnance disposal suite
Tand3rsson replied to monovdd's topic in ARMA 3 - ADDONS & MODS: DISCUSSION
Hi, I can't find the cellphone classname to add it to a player. Where can I find this? I've found all the IEDs and such in your documentation. Thank you! -
Hello! I am trying to achive as displayed here 4:15 . That you can get a picture of you target on your screen and it shows your hits. Anyone know how to achive this?And further down the road, would it be possible to show pictures of different objects, and display hits on those? For exampel show a RPG gunner where exactly he did hit that enemy apc? Another workaround that would be great: makes a red sphere appear where you hit a vechile: this addEventHandler ["HitPart", {_spr = "Sign_Sphere10cm_F" createVehicle [0,0,0]; _spr setPosASL (_this select 0 select 3);}]; Would it be possible to have two APC:s, and have the hits on APC1 register on APC2?
-
Debriefing - Showing custom value.
Tand3rsson replied to Tand3rsson's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks for the replies guys! I am going to try columdrums suggestion right away, as it seems as a good and easy workaround for what I wanted:) Does the setDebriefingText reffering to "totalsteal" need to be set just before the end triggers, or will it get the correct value even if setDebriefingText is used right away, like in an init? And also, doesn't this also demand a string? Well, look at me asking tons of question without even trying it yet :) I'll get back shortly EDIT: Columdrums suggestion didn't to it for me. Used it in the trigger which calls the end, and it did nothing. Should it be defined elsewhere? ---------- Post added at 11:07 PM ---------- Previous post was at 10:34 PM ---------- Thank you! This seems to work just fine :D I just used the totalsteal = str(totalsteal); in the same trigger as the "endX" call BIS_fnc_endMission; It now gives me a 3rd briefing screen, presenting whatever totalsteal was at the end of the mission, and with my selected title as defined in CfgDebriefingSections at the buttom of the screen. Would there be any way to make it present anything more than the value, say as you would a text in the suggestion columdrum gave. So rather than just saying for example "223654" it would read "You stole a total of (mystring) $"? -
Debriefing - Showing custom value.
Tand3rsson posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi! As I have understood from the wiki about debriefing, it is possible to display a value of ones choice as part of the debriefing, together with a headline. Hopefully what I want to create becomes clearer as I tell you what I got :) init.sqf totalsteal = 0; different valued objects: worthOne = floor(random 150000) +100000; worthTwo = floor(random 150000) +100000; worthThree = floor(random 150000) +100000; worthFour = floor(random 150000) +100000; value being added up example: totalsteal = totalsteal + worthOne; So what I would like to accomplish, is that at the end of the mission, whatever value "totalsteal" is, it should be displayed, as part of the debriefing. This is the part on the wiki that lead me to believe this can be done (allthough it is all Greek to me) Custom Sections description.ext: class CfgDebriefingSections { class Loot { title = "Collected weapons"; variable = "BIS_loot"; }; }; title: Section title displayed in horizontal listbox variable: missionNamespace variable containing string to be shown. It will be parsed and displayed as structured text. When empty, section won't be visible at all. Anyone know this and might not only help me but give a shot at explaining it for me :)? -
Killed.sqf _unit = _this select 0; _killer = _this select 1; if (!isServer) exitWith {}; if ((side _killer == EAST) and (side _unit == INDEPENDENT)) then { hint "HAHA"; }; init.sqf fnc_killed = compile preprocessFileLineNumbers "killed.sqf"; init of targetunit this addEventHandler ["killed", {_this call fnc_killed}]
-
Number (and type) of backpacks in area!
Tand3rsson posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello :)! I have a mission in the works, where a total of seven backpacks play a important role. I need to check the area where the mission is suppose to end for Three different possible outcomes, depending on how many bags are in the area. The trick is that not only must I check for backpacks on units, it must also cover if they for instance are loaded into the cargo of a vehicle or dropped on the ground. Outcome one (end#1): A total of 6 "B_Carryall_Base" in list a total of 1 "B_Bergen_Base" in list the whole squad (that check I know how to do myself) Outcome two (end#2): A total of 6 "B_Carryall_Base" in list the whole squad (that check I know how to do myself) Outcome Three (end#3): the whole squad (that check I know how to do myself) I did a Little test script, however, I Think it is so far from correct that it would be better just to start over, with the help of someone who actually understands scripting. But anyways, in case you want a good laugh, this was my test: _trigger = _this select 0; _triggerlist=(List _trigger); while {true} do { { if (_x isKindOf "LandVehicle") then { _bagsinvehicle = {_x == "B_Carryall_Base"} count backpackCargo _x; } } forEach _triggerlist; hint "worked this far"; { if (_x isKindOf "man") then { _bag = unitBackpack _x; _class = typeOf _bag; if (_class == "B_Carryall_Base"and (_x isKindOf "man") then { _bagsonUnits = {_x} count _triggerlist; } } forEach _triggerlist; _bagsinvehicle+_bagsonUnits = _bagstotal; if (_bagstotal == 0) then { hint "ZERO BAGS"; } if (_bagstotal == 1) then { hint "ONE BAG"; } if (_bagstotal == 2) then { hint "TWO BAGS"; } if (_bagstotal == 3) then { hint "THREE BAGS"; } if (_bagstotal == 4) then { hint "FOUR BAGS"; } if (_bagstotal == 5) then { hint "FIVE BAGS"; } if (_bagstotal == 6) then { hint "SIX BAGS"; } sleep 5; }; -
Still haven't gotten the script to work, anybody?
-
You're going to have to explain that one to me mate :) tried adding fnc_killed = compile preprocessFileLineNumbers "killed.sqf"; to my init.sqf and then in the init of the target Soldier: this addEventHandler ["killed", {_this call fnc_killed}]; with no luck :(
-
Thanks kylania, however, it is not going to run that much. It is a limitied of 10 INDEPENDENT, and if opfor kills anyone of them I am going to use setFriend (yes, "HAHA" will be replaced") to get them hostile towards OPFOR. So it is just running for 10 souls. And I haven't got any idea at all how functions work :)
-
QUOTE=Tonic-_-;2461654]Ah, spotted it. Your eventhandler you are using exec, you need to use execVM. exec was used for .sqs and is now old and deprecated. But to get to your RPT log you can open up your Documents and in the windows navbar where it says Documents replace it with: %LOCALAPPDATA%\Arma 3 and press enter. It should take you right to it and you are looking at the most recent RPT. If it doesn't work then you'll probably need to enable the viewing of hidden files & folders (that can be googled). Also you can leave your check in for the if(!isServer) exitWith {}; because that code was just fine. The engine DOES understand exitWith {} otherwise why would it be listed? :P Good spot! However, I am surprised to find that with this addEventHandler ["killed", {_this execVm "killed.sqf"}]; it dosen't fire the scrip so I get the hint at all?! Da f***? :S
-
Hi again! I tried removing the isServer check alltogether to see if that is whats wrong. Then the script looks like: _unit = _this select 0; _killer = _this select 1; if ((side _killer == EAST) and (side _unit == INDEPENDENT)) then { hint "HAHA"; }; and I use the following in the targets init line: this addEventHandler ["killed", {_this exec "killed.sqf"}]; and the error looks exactly like this: '|#|};' error missing { the hint "HAHA" fires without problem though. ---------- Post added at 04:13 PM ---------- Previous post was at 04:12 PM ---------- Please explain how I access the actual error report from "RPT" and post it :P?
-
HI! Using an eventhandler killed for this one. _unit = _this select 0; _killer = _this select 1; if (!isServer) exitWith {}; if ((side _killer == EAST) and (side _unit == INDEPENDENT)) then { hint "HAHA"; }; but I get "error missing {" when it fires? Anybody know why?
-
Setting Color of Offroad?
Tand3rsson replied to chaseh27's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thank you, I have a finished car in editor which I want to make put on sirens after a while. So, I save your script as "fnCJ_PoliceBlink.sqf" in the mission folder, correct so far? Then in the trigger I put [carName, 0.25] spawn fnCj_PolceBlink; Would this work? Cause if I do it like you have above, the sirens will be on from the start. Tested, did not get it to work EDIT: Ok, I solved it to work like I needed. First I pasted the whole fnCj_policeBlink into my init.sqf. Then i created a simple policelights.sqf: _carobj = _this select 0; [_carobj,0.25] spawn fnCJ_PoliceBlink; So when I wanted it to switch on lights I have a trigger: on act: null = [carName] execVm "policelights.sqf" THANK YOU for your help man!