Jump to content

Tajin

Member
  • Content Count

    1681
  • Joined

  • Last visited

  • Medals

  • Medals

Community Reputation

348 Excellent

About Tajin

  • Rank
    Sergeant Major

core_pfieldgroups_3

  • Occupation
    qualified communications designer

Profile Information

  • Gender
    Male
  • Location
    Germany

Contact Methods

  • Biography
    ArmA-nerd ever since the first ofp demo. :D
  • Steam url id
    TajinValorian
  • Origin
    TajinValorian

Recent Profile Visitors

3183 profile views
  1. Tajin

    Arma 3 too small for fixed wing

    150km viewdistance ? My pc would implode if I tried that on arma.
  2. Tajin

    Isnil issue

    if !(isNil "somevariable") then { // whatever }; Also very useful: _pv = missionNamespace getVariable ["somevariable", 0]; getVariable can return a specified default value if the variable is not defined.
  3. Hey I simply made a point and I think I've explained it well enough, theres no reason to be rude about it. I wanted to get some more information out of him before answering so we can help in a way that is actually useful to him instead of wasting ours and his time. As it turns out, he's new to scripting, so it just wouldn't make sense to me to drop him a few lines of code without even telling what they do. Really? I took apart the problem and explained to him that there are different ways to do it, depending on what exactly he wants to achieve. How does that not contribute to the question?
  4. I don't think it really helps anyone to just throw them random bits of code with no comment whatsoever and without knowing the details. (checking for playerUIDs was never part of the question and while its great to provide an alternative solution, you should at least comment it) it's better for everyone if things happen in the right order.: The first thing should always be that the person asking for help provides enough information ! I wouldn't bother posting any solutions purely based on guesswork. Basically this: - What do you want to achieve - What have you tried to achieve it (sharing the existing code is always helpful) - Where are you stuck / what kind of help are you looking for - any additional info on your specific scenario (for example that your vehicles can respawn) However, like HazJ mentioned earlier, this forum is mainly for people who need help scripting things. Beeing new to scripting it is perfectly fine. People will gladly help you out if you're stuck. Just don't expect them to do everything for you, so you don't have to learn it yourself. - - - - - Anyway, there are multiple ways this can be done, which one is best depends on the situation and how strict you want the limitation to be.... For example, maybe you want every vehicle of a certain type to be locked for players by default, even enemy ones. This could be the case on a public server if you want to make sure certain vehicles are not publicly available so people cant mess around with them. In that case it may be better to not lock those vehicles one by one but instead use an EventHandler that you can attach to each player, which then checks if they enter a vehicle and throws them back out if they're not allowed to use that vehicle. This would easily work with vehicles that are added later on, or respawn. You would just have to add a variable to them to allow them to be usable. Actively locking vehicles basically works the other way around and requires you to do it for every single vehicle that you want locked. Even when they respawn or get added later. Certainly doable but normally more suited when you have a limited number of vehicles to which it should apply. I'd also suggest reading this: https://community.bistudio.com/wiki/addAction It is one of the true bread and butter commands for anyone starting to script.
  5. What is there to rack your brain over? Lock the vehicles and add an action to unlock them that only shows up for your HQ unit. Should be really simple or what is it that you don't understand about it ?
  6. The snippet I posted is just to move and open the box, you still have to place that into an addAction code to make it accessible via the scroll-menu.
  7. there is a function for it: https://community.bistudio.com/wiki/BIS_fnc_setUnitInsignia
  8. 1. Hide your ammobox with https://community.bistudio.com/wiki/hideObject 2. Place a different object (one without an inventory, or a simpleObject version of the ammobox) and an action to it via: https://community.bistudio.com/wiki/addAction (actions there can be named and colored however you wish) 3. In that addaction use setPos to position the ammobox where the player is and then force him to open the box, like this: yourhiddenammobox setPos getPos player; player action ["Gear", yourhiddenammobox];
  9. Tajin

    Isnil issue

    What is so hard about it? The wiki tells you exactly how it works and even has some examples: https://community.bistudio.com/wiki/isNil
  10. https://community.bistudio.com/wiki/addPublicVariableEventHandler did you read the notes on it ?
  11. Default option for testing in the editor is singleplayer. So it may easily be that you forgot to switch it to MP when you tested it. In that case the sidechat command would not work.
  12. Are you maybe testing your mission in singleplayer? Chat commands do not work there.
  13. Always a good idea to actually post the code you want help on. Anyway, why create a trigger via script when you can also do the check directly? _areaUnits = allUnits select { (side _x == east) && {_x inArea _myArea}}; // find all opfor in the area waitUntil { sleep 1; ({ alive _x } count _areaUnits) == 0 }; // wait until every one of them is dead // continue with whatever...
  14. Right, I forgot about that one. ^^
  15. Tajin

    Hit Eventhandler

    there is no need to set the variable to 0. _something getVariable ["kp",0]; This automatically returns 0 as default value, if the variable has not been defined yet.
×