Jump to content

ZaellixA

Member
  • Content Count

    74
  • Joined

  • Last visited

  • Medals

Community Reputation

70 Excellent

1 Follower

About ZaellixA

  • Rank
    Corporal

Contact Methods

  • Skype
    zaellixa
  • Biography
    Born in Ioannina, Greece. Grew up all around Greece and now still trying to settle somewhere. Sound engineering pays for most of my expenses.
  • Steam url id
    zaellixa
  • Linkedin
    achilleskappis
  • Reddit
    ZaellixA

Profile Information

  • Gender
    Male
  • Location
    Greece
  • Interests
    Acoustics, Digital Signal Processing, ArmA 3, Programming, Research, Computational Acoustics, Wave-Fields, Reproduction

Recent Profile Visitors

124 profile views
  1. Hhhhhhmmmmmmm, I haven't checked all the code you guys provided above so I cannot really say what this "FirstAidKit" error is. What I suggest is to hint the type of the _unit before you go into the check. For example you could hint (typeOf _unit); Then you can see what its type is. Then you will be able to go further down to the direction of the problem. Because if for example the returned string is "" it means that the object doesn't have a config class. Otherwise you will see if the class you check against is indeed the one you are looking for.
  2. Hey there guys. I do have an idea what the problem might be. It's called precedence (of course you know that) and it has caused quite some trouble to me as well. So, isEqualTo does NOT throw an error when it compares different types. Now this is where the precedence comes into play. in the way you have typed the code isEqualTo actually checks _unit against "CFP_B_USRANGERS_Rifleman_AT_WDL_01" and then typeOf is called on the result (or something like that). So, if instead you type if((typeOf _unit) isEqualto "CFP_B_USRANGERS_Rifleman_AT_WDL_01") then { [_unit] execVM "Scripts\ATgear.sqf"; }; // Just added parentheses around typeOf _unit So then, when you reach the hint it finds a problem. Don't ask why, but I think that this could possibly be a solution. I had similar problems in the past with ArmA scripts. So, if it's not such a bother to try you could just let us know if you had any luck. I know it doesn't really make sense to throw an error in there because it is supposed to never reach it, but still I did have similar problems in the past. I do hope that this is the problem which could be solved easily.
  3. Hey there ibpixels. I believe you could use the "GetInMan" eventHandler. You have to add it to the unit that you want to trigger the SUV movement in a fashion like _vipUnit addEventHandler["GetInMan", { _theVIP = _this select 0; // Get the VIP unit _theVechicle = _this select 2; // Get the vehicle (s)he entered // Perform check to see if the vehicle (s)he entered is the one you are interested in if(_theVehicle isEqualTo theSUV) then { systemChat "(S)he is in... Step on it...!!!"; / (S)he is in the correct vehicle _theVehicle forceSpeed -1; // Allow the vehicle to move normally } else { systemChat "Madam/Sir, please get out. You are not supposed to be here...!!!"; // (S)he is in another vehicle }; }]; Please keep in mind that you will have to give a specific name to the SUV you want to move, in the editor, and use that where I typed theSUV. One more thing you must take care of, is the locality of the unit when you add the event handler. I haven't used this specific event handler before but according to the BIKI (see link above) the event handler is persistent after respawn only if it is assigned where the unit was local. EDIT: I just realized that your question was to get the SUV to stay still. Well, for that you can use forceSpeed. I have changed the code snippet above to incorporate the functionality. You will have to put in the SUV's init this forceSpeed 0; // Force the vehicle to stay still Apologies if I caused any confusion... 😟
  4. ZaellixA

    Spawning Units in Marker, help

    Yep...
  5. ZaellixA

    Spawning Units in Marker, help

    There is a _heighLimit variable in the script. So you can go somewhere close to the top and write (duplicating the first line, no need to write that down) _trig = format["EOSTrigger%1", _mkr]; _heigthLimit = true; // You place it somewhere here
  6. ZaellixA

    Spawning Units in Marker, help

    Well, from the looks of it, seems like you could actually set the variable _heightLimit to true and then it is supposed to work for units whose z-coordinate is less than 5 metres. This in respect to the ground of course. Have you tried that?
  7. ZaellixA

    Spawning Units in Marker, help

    It would be more helpful if you could provide more information regarding the script you use, or anything relevant to it. Generally speaking, if you have access to the marker you could either change it's size in the editor, or via script like _markerPos = markerPos["markerName", true]; // Get the position of the marker _markerPos set[2, 0]; // Set its z-value equal to 0 "markerName" setMarkerPos _markerPos; // Set new position to the marker Or, alternatively you could check the position of the players inside the marker and if their z value is higher than let's say 2 metres you could disable the spawning. Again, if you don't provide more info we won't be able to help you solve your problem easily.
  8. Well, apparently there is a really easy way to do it. Thanks to @LarrowI found out that you can actually use weaponState to get the current ammo count. The last element of the returned variables is the ammoCount. So in the same way Larrow showed above you can _myUnit addEventHandler["FiredMan", { _unit = _this select 0; // Get the unit who fired _numOfBullets = (weaponState _unit) select 4; // Get the amount of bullets left in the magazine if(_numOfBullets isEqualTo 0) then { systemChat "Reloading..."; // Start screaming } else { systemChat "Still plenty to shoot..."; // Keep shooting }; }]; Thanks Larrow for pointing to the right direction.
  9. Hhhmmm, it's good to know those eventHandlers exist. Checked the link as you said and unfortutantely there are magazines with both numbers and '('. But I didn't see any with some backslash in the name which could be used to get the amount of bullets left. I did have a quick look to find some short way to do that but unfortunately I didn't manage to do much. What I have so far is the following code which manages to get the part before the backslash (hehe, the easy part 😄). I don't have much time at the moment but I'll try again later and update with resulst _magInfo = currentMagazineDetail _unit; // Get the magazine details _bulletIndex = _magInfo find "/"; // Find the index of the character '/' in the string //_numOfBullets = _magInfo select [_bulletIndex - 3, 3]; // You can chop it like this if you want _numOfBullets = ""; for "_i" from (_bulletIndex - 3) to _bulletIndex do { _temp = _magInfo select[_i, 1]; // Get the current character // FIND A GOOD WAY TO COMPARE IT TO NUMBERS AND IF IT IS A NUMBER ADD IT TO THE _numOfBullets STRING; }; }; _numOfBullets = parseNumber _numOfBullets; // Get the number as a number :| Once more thanks for the info Dedmen.
  10. Yep, just checked it and I have a bug fix already 😄 private _magInfo = currentMagazineDetail _unit; // Get the info _subStrings = _magInfo splitString "(/"; // Split between the first parentheses and the backslash (plus more that you don't need) _numOfBullets = parseNumber (_subStrings select 1); // Get the second element of the split string array as number toArray returns an array with one element, but it is still an array and you won't be able to use it easily in other parts of your code. So you replace the one-element-array in the _numOfBullets with the one element included but now as a number. Sorry for not seeing this early on... EDIT: I changed the code snippet in accordance to killzone_kid's comment below. Now it uses parseNumber to get the number, so no need for the toArray and all the selects.
  11. Sounds good. I am glad you found the right command for you. Initially I though you could check the current magazine and when this goes "" or [] or nil, you would know that the gun is empty. I guess your approach saves some overhead due to the eventHandler use. So about the parsing, I believe you could use the "quite efficient" findIf command and do something like this private _magInfo = currentMagazineDetail _unit; // Get the info _subStrings = _magInfo splitString "(/"; // Split between the first parentheses and the backslash (plus more that you don't need) _numOfBullets = toArray (_subStrings select 1); // Get the second element of the split string array Now, if there are no gun names with parentheses then this should work correctly. Of course, as always this needs TESTING... But I believe it's a good start. Thanks for sharing your solution
  12. Well, the only way I can think of at the moment is to constantly check (I HATE it when it comes to constant checks 😠) the objects the unit is "holding" and when you spot the absence of a magazine in the gun then execute the code. One example I found was in BIKI of weaponsItems command. It actually returns everything you can see on the right hand side of your inventory. So, you can perform checks for magazines and if you don't find one, prevent the unit from moving until it reloads... This of course brings more trouble as you may have to check if the unit is out of ammo in general..., in which case its best bet is to start running and not stay put 😆. Again, I really don't like performing constant checks so I will look for another solution. If I think of something I will let you know. EDIT: I believe that currentMagazine will do better as you won't have to search in any array... Yet to come up with a good solution though .
  13. ZaellixA

    Random Player Hunt

    Yep, I believe GEORGE FLOROS has some points in his code (above) that I would recommend too. One small example is that you "calculate" allPlayers twice, one as _allPlayers and one as _Players (while George gets it only once). Also, as I "showcased" (I am not suggesting that this is THE BEST way) with my example I believe the best way to go is with eventHandlers. Although this may be just a personal preference (but possibly an overhead reduction too) so you should first of all go for a way that you feel more comfortable with. Nevertheless using the onPlayerRespawn and onPlayerKilled scripts is equally nice, plus you get all your code kinda concentrated on one (or two) place(s) instead of having code related to an object or process spread out in different scripts. One last suggestion. Try to write small chunks of code, test them to make sure they work as intended and then either combine them or extend them to reach your final "destination" in smaller steps. It will make the whole process a lot easier. For example, make a small chunk of code to add make someone the rabbit and make sure it works. When this is done you can take for granted that you will always have a rabbit in the way you want. Then you can go on, add a marker on the rabbit and refresh it every once in a while. This way you will take small SECURED steps and you will reach your destination SAFELY. It may take a little bit longer but you when you arrive you will be sure that it works (and then you start fixing bugs 🤣). Unfortunately I will be on the road for the next two days so I won't be able to help with tests. If by the time I reach home you still encounter issues I will do my best to support. Keep up the good work 🙂.
  14. ZaellixA

    Random Player Hunt

    Hhhhmmm, not sure why... Please correct me if I am wrong but markers should work for all players (global effect) 🌐. As I said, unfortunately I cannot help with testing. I will ask a friend to test for me if he can. This will happen tomorrow though (it's quite late now here). I'll come back to you if I have any news...
  15. ZaellixA

    Random Player Hunt

    Well, I haven't used BIS_fnc_taskSetDestination before but in its BIKI says that you could instead of what you have, do ["t1", [GF_Player, true]] call BIS_fnc_taskSetDestination This will put the marker on top of the "GF_Player". You could also omit "true" but this may not show the marker to players that do not know about GF_Player's whereabouts. EDIT: Also, I am not sure what the difference is between BIS_fnc_taskSetDestination and setMarkerPosition.
×