Jump to content

Valfunction

Member
  • Content Count

    51
  • Joined

  • Last visited

  • Medals

Community Reputation

1 Neutral

About Valfunction

  • Rank
    Lance Corporal
  1. Valfunction

    Creating a module

    @Larrow Cheers mate will try it out @Pac Man I've only tested it on Stratis so far. Will have to try it on Altis and see what happens. My script is a variation of what you have tried. It is run out of an sqf rather than the init field.
  2. Valfunction

    Scripting door closing

    Is there a way to dynamically check when a door opens/closes. Obviously the AI can check if a door is closed and open it before they walk through. I just wanted to add an element where the door closes after a certain number of seconds but only for that specific door.
  3. Valfunction

    Creating a module

    Sorry guys for not getting back to this page (actually forgot about this - been away for a bit). I ended up going with it as a script. The info on module creation was very useful and I will file it away for future use, but for now I'm keeping my one as a script. Just wondering, is there any way to synchronise something to a building - using F5 doesn't work?
  4. I have somewhat completed work on a garrisoning script for A3. Just a quick way to spawn dudes in buildings (outside of the military ones the sites module already does). However at present it is a little cumbersome to implement. You put down markers, input their names into an array in the script and then the script finds the nearest building for each marker and populates it based on some parameters you give it. I was wondering if/how it is possible to implement it into a module that is selectable under the modules tab? That way you can plop down a module and synchronise it to the buildings you want and voila. Is there a tutorial for making modules? I tried google and I get a lot of hits for how to use modules but not so much for creating them. EDIT: I was initially going to do it via radius and then it selects a certain percentage of the buildings within that radius (so you don't populate every building in a 100m radius in Kavala as it would spawn several hundred AI), but if there is a way to sync it to specific buildings it would be nice.
  5. Valfunction

    Find where unit has been hit

    I noticed the tag on the HitPart event saying it is not working correctly in MP. Do you know if this is still the case? Because obviously when you get hit in the legs in MP you still crawl. Having not used HitPart before I am struggling to wrap my head around the locality issues that it seems to have. Also looking at the array which is passed back by HitPart which bit of it actually returns the body part hit? Or do I have to work it out from the Position value (below certain height = legs, between 2 heights = torso and above certain height = head)?
  6. Valfunction

    addAction string formatting

    Forgot about waitUntil. That one will work perfectly. No longer related to what the original script is doing just a general question - if I wanted the variable to change every time a player entered the server the best would still be waitUntil is that right?
  7. I was looking through scripting commands and I found the one "handsHit" which tells you if your unit has been hit in the hands. Is there one for legs? How does arma know to force your unit to crawl when leg damage is above a certain threshold?
  8. Valfunction

    addAction string formatting

    That is a good iead. At the moment the variable is only used in the one script and it doesn't seem to have massive overheads by updating it every 60 seconds. But I'll keep that in mind if I expand the concept of the script. To check variable value would I just use: if (_marker1 != _marker1 ) then {//magic} and just check that every 60 seconds?
  9. Valfunction

    addAction string formatting

    That's true. I have it inside a while loop that updates every 60 seconds and does what you said.
  10. Valfunction

    addAction string formatting

    Thanks guys. I added some funky colors and other conditions but in the end it came out like this: _jipPole addAction [("<t color=""#FFFF33"">" + ("Move to " + _marker1 + " - NATO base") + "</t>"), "move_to_basel.sqf", [], 1, false, false] and yes _marker1 must be a string.
  11. I am trying to create an addAction which displays a variable in the action menu. For instance I want the action to say "Move to [VARIABLE]" where [VARIABLE] is the name of a variable. How do I format my addaction display string to display the variable name after the "Move to" part? So for example: _this addAction ["Move to [VARIABLE]", "move.sqf"] //this is obviously not correct syntax but just wanted to know what the correct syntax is.
  12. Valfunction

    addAction only for self use

    Sorry I'll be a bit more specific. Each unit has a "beacon" which is activated/deactivated via an action. Each unit should be able to turn on their own beacon on/off but not another unit's beacon (all units are human so don't have to worry about AI). @kylania On a dedicated server now I have no addAction options at all. My assumption is that it is adding the actions locally to the server so the clients cannot see them. @coding I don't know how to get UIDs but stepping through the code I don't really see how it is different from just adding the actions via the init field for each unit. EDIT: I seem to have sussed it by fiddling the parameters. Now looks like this: _unit addAction ["Beacon", "beacon.sqf", [] , 1 , true , true , "" , "_this == _target"]; This way it checks if the unit the action is attached to and the one triggering the action are the same.
  13. I have a script that is run from an addAction. The addAction is added to the playable units (MP). I want to make it so only the person who the addAction is attached to is able to use it. In other words, player A cannot access the action which is attached to player B. Is there a way to do this?
  14. Having used NVG before what you see through them is pretty much what is in game. There is normally a rubber "cup" around the lenses which prevents light leakage. So all you see when wearing the NVG is the image from the tube and black around it from the cups. You don't actually see the frame of the NVG at all. Basically it looks very much like it does in game now.
  15. I have set up a mission where Independent are friendly with East using the intel menu (where time of day, weather etc is). In the preview it is all sweet but as soon as I test it on a dedicated server they start shooting each other. Does anyone know what is going on? SOLVED: My stupidity is what was wrong with it.
×