Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×

Tand3rsson

Member
  • Content Count

    64
  • Joined

  • Last visited

  • Medals

Everything posted by Tand3rsson

  1. Tand3rsson

    Setting Color of SUV?

    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.
  2. 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!
  3. 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?
  4. 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 :)?
  5. 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) $"?
  6. Hello fellow forum users! I found an old thread on this from 3 years ago without any answers, and also, that was not for ARMA 3, so my appologize if a new thread is wrong of me. I am looking for a solution to check if an AI character can see another unit. I know about knowsAbout and such, however, the problem I have with knowsAbout it that it stays high even after the unit has moved out of the AIs line of sight. Is this possible? What I am trying to achive is, simply explained: Player (or other unit) is for example standing behind a tree, a rock or a building, out of the AIs line of sight. canSee == 0, Player (or other unit) steps out of cover, into the AIs line of sight, canSee == 1, Player (or other unit) steps back into cover, canSee == 0, A thought I have is that, when the AI can use their weapon against a unit, they obviously see him... is there a way to check that intent with an AI soldier? All help is appreciated! I really do wish for a canSee command for BIS though ;)
  7. 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?
  8. Tand3rsson

    error missing {

    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}]
  9. 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; };
  10. Tand3rsson

    error missing {

    Still haven't gotten the script to work, anybody?
  11. Tand3rsson

    error missing {

    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 :(
  12. Tand3rsson

    error missing {

    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 :)
  13. Tand3rsson

    error missing {

    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
  14. Tand3rsson

    error missing {

    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?
  15. Tand3rsson

    Setting Color of Offroad?

    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!
  16. Tand3rsson

    Setting Color of Offroad?

    Cjoke, how would one go about Calling your script for a vehicle? ... or anyone else who might have an idea on how to do it :D?
  17. Thank you! I shall play around a bit with this and see if I might get it to work :P Always nice to see a new command that you weren't aware of :D! EDIT: ok, I can't get it to work. If I understand the wikiexampel correctly: lineIntersects [eyePos player, aimPos chopper, player, chopper] Would check if the something is between the player and chopper, is that correct? And, if I am correct so far, then you would check if true like below: _doTheyIntersect == lineIntersects [eyePos player, aimPos chopper, player, chopper] and then for exampel a while "_doTheyIntersect == true" do {hint "YES"; sleep 25;}; I saw there was a feedback on lineintersects being broken , so I have to ask to know if this would be the correct way of doing it? EDIT2: _unitOne = _this select 0; _unitTwo = _this select 1; while {true} do { _pos1 = eyePos _unitOne; _pos2 = getPosASL _unitTwo; if (lineIntersects [_pos1, _pos2, _unitOne]) then {hint "I don't see you";} else {hint "I see you";}; sleep 10; }; Solved, however, this results in _unitOne having Eyes in the back of his head!
  18. Hmm.. I should have thought this through a bit more. Anyway, if anyone else is interested, this is how I solved the random bombs within a 75 m area from a marker _pos = _this select 0; _bombUno = createVehicle ["Bo_MK82", getMarkerPos _pos, [], 75, "NONE"]; and then like the first script I posted. It is called using: nul = ["marker"] execVm "bombTwo.sqf";
  19. Hi! I really aint got much, so this is more like one of those "do my work for me" questions. Which I appologize for. My idea is this, you call an airstrike, just like you do the on map click request for example mortars (radio, click on map for target pos). When clicking on the map, eight markers are either spawned or moved to a random position within 75 meters of the mapclick (That is a random pos for each marker). Then a flying aircraft is spawned at high altitude, flying over the target area and the munitions are deployed like: _bomb = "Bo_MK82" createVehicle getmarkerPos "bomb1"; sleep 0.1; _bomb = "Bo_MK82" createVehicle getmarkerPos "bomb2"; _bomb = "Bo_MK82" createVehicle getmarkerPos "bomb3"; sleep 0.5; _bomb = "Bo_MK82" createVehicle getmarkerPos "bomb4"; sleep 0.3; _bomb = "Bo_MK82" createVehicle getmarkerPos "bomb5"; sleep 0.7; _bomb = "Bo_MK82" createVehicle getmarkerPos "bomb6"; sleep 0.2; _bomb = "Bo_MK82" createVehicle getmarkerPos "bomb7"; sleep 0.2; _bomb = "Bo_MK82" createVehicle getmarkerPos "bomb8"; the airplane continues it flight, and is later deleted. The part I need help with is really the whole part up untill, and included the position of the markers. The rest, with spawning the aircraft, dropping the bombs, and deleting the aircraft, I can sort out my self. If you dont understand what I'm after, hopefully this will clear things up: http://www.youtube.com/watch?v=3OpMGAuslFY Thanks!
  20. Hi! How would a trigger condition for activation: "unit from WEST died within trigger area" look? I am going to set it to repeatedly, so it activates each time a western soldier dies within the trigger area. I would prefer if there is a solution that does not require a text in the init of every western soldier:P thanks!:)
  21. Hello! My question is rather simple. I have made a "nest" by placing 3 earthramp objects in the editor, then placing a tank in the "nest". It looks freaking sweet, the turret clears the hight of the earthramp. However, it seems like the AI can't see NMYs because of the earthramps :S If I myself jump in the tank, I can clearly see all of the targets, and engage them. However, the AI seems to think the earthramp is higher than it really is. Any ideas for a workaround?
  22. Hi! Quick (I hope) question: How do I use knowsAbout for a unit spotting a member of a certain group? like: _unitOne knowsAbout _x > 2 forEach units _opforgroup Ofcourse that one dosent work, but I was hoping it would help someone understand my question. I am trying to use it as a if-statement, like: { if (_unitOne knowsAbout _x > 2) then { something happens }; } forEach units _opforgroup; Thanks! :)
  23. I have found that with waituntil (in the many scripts i tried it before) it just jumps past the argument. Tried this also when Twirly wrote it with my script, and it just ran through the script even though the knowsAbout was not fullfilled. A work around I have used previously might work for me here. waitUntil {_heliTp distance _invisH < 80}; nul= [] execVm "land.sqf"; Thats how I solved it previously in another script, cause otherwise it would just go on. This is an issue which I have heard other people mention to. Right this second I am unable to test it, but I will as soon as possible. :) And also would like to take the time to thanks everyone who takes the time to help here on the forums! EDIT: Tested now, and it seems to work :S Which is great, but I do not understand what I have done wrong previously with the waituntil since I deleted it :S Thanks again F2k Sel! And everyone else!
  24. Ah yes! F2k Sel, that worked! However, I have discovered a new problem, which I should have predicted. How do I loop this so that it constantly checks if knowsAbout > 2 untill it is so? What I am experiencing now is that guard only reacts if he knowsAbout that squad in the opening seconds of the game, which is not what I wish to have. Would it be possible to make the script go back to the if, and once fullfilled, exit the script?
×