Jump to content

mrcurry

Member
  • Content Count

    622
  • Joined

  • Last visited

  • Medals

Community Reputation

478 Excellent

About mrcurry

  • Rank
    Master Sergeant

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Maybe you already found this but take a look in this thread and see if it helps: 231504-performance-warning-simpleserialization
  2. My bad, broken link - updated to a working one in the previous post and added some comments to the mission. Take a look in there and it should make more sense. On editor variable names Larrow recently explained this perfectly in another thread: For us the important bit is the 2nd part. The object in our case is the area trigger, give it a variable name, e.g. trigger1, which you can then use to access that particular trigger from anywhere in the mission. In the execution example you replace myTrigger with the name you have selected e.g. trigger1: // Replace myTrigger [this, myTrigger, -1] execVM "cleanup_script.sqf"; // with your name, here I also changed the mode. [this, trigger1, -1] execVM "cleanup_script.sqf"; It's good practice (for your own sanity) to use verbose names such as 'cleanupTrigger1' but not required. For full rules and recommendations see this link, variable names given in the editor are considered global variables.
  3. Alright I've got something that should* suit your needs. Since it might be useful for others I've added some options for automatic cleanup and admin control, explore them if you wish. Setup: Save the script into a sqf-file or copy the cleanup_script.sqf from the example mission into your scenario folder. Then open the editor and: Add a trigger covering the area, give it a unique variable name. Add an appropriate 'collector' object to act as the interaction point (or as data holder if using automatic mode). Copy one of the execution examples (see the script header) to the init of your 'collector' and change the parameters to your needs. If you need multiple areas repeat the above steps as many times as you want. Though I haven't fully tested in an MP environment I've done this enough to say that SP/MP compatibility shouldn't** be a problem if you set it up as described. See the full description below for more details: The full source code is here: And an example mission can be found here: Dropbox link * - I am human and I make mistakes. ** - See *.
  4. There probably are scripts out there that do this but what the heck, it's a fun little thing to write up. Now I haven't played Mike Force in a while so just clarify for me a few things (There's also a chance here of changing the behavior to fit your vision) : Do you want it to require manual input or would you prefer automatic cleanup? Do you care about the dropped gear or should it just be completely removed from the game? If user input is required, should it be locked behind admin access or available for all players? Remember to Quote me or mention @mrcurry in your response so I get the notification, otherwise I might take a while to respond 🙂
  5. Do you have something already that doesn't quite work? Where and how are you executing said code? What's the purpose? Context matters.
  6. mrcurry

    How to script ROADS

    Use Photoshop... Jokes aside, if there is no road segment you can't add one. Period. Only the terrain tools can do that, so for a proper fix you need to let the author know about the missing road. However since the road surface is visible, could it be that the road is there and just not displayed on the map? My terrain-making-fu is too bad to know for sure. You can check if the road segment exists by: Get in a vehicle Execute this little script in the debug console [] spawn { while { vehicle player != player } do { hintSilent format ["isOnRoad: %1", isOnRoad vehicle player]; }; hintSilent ""; }; Drive around on the road in trouble area. If there is an actual road segment underneath the vehicle you should see "isOnRoad: true". If so it could instead be that nearby objects (buildings, canal walls etc.) are interfering with the driver's pathfinding. Your best bet in either case is to contact the author of the map and detailing the issue. While waiting for a fix, if you really need to get a vehicle through there, here are some possible workarounds: Use waypoints closely spaced together (5-25 m) and limited speed. If you do it right and thread the needle it could possibly get them through but it likely won't look good if that's important. You could also use setDriveOnPath to guide the vehicle through the troublesome sections. If you are looking for something more cinematic you could use unit capture / play. P.s. while you're at it tell 'em to fix the textures on them buildings. I'd go blind driving around in there. 😛
  7. Yes it's old and now I feel old... Thanks Obama! So the targets don't need a name, they just need to be vanilla popup targets and inside the lane trigger, it could work with modded popup targets if they are config'd the same as vanilla popups but no guarantees. The setup is: 1. Your lane controller object - No name needed 2. A trigger covering the range area - Name needed 3. (Optional) A Shooting position object - Name needed if used As for the line spacing parameter in the code (parameter 3) here's a picture how that works: It's really recommended to check out the example mission in this post, I've updated the link 'cause I think it might've been broken.
  8. I believe this is the crux right there, Resume essentially loads a save, so I imagine you can try to use the Loaded eventhandler to reapply the time of day.
  9. How to turn any array into a shuffled deck in 1 line. Nice. The brackets shouldn't even be necessary since floor random and count are all unary commands.
  10. Yeah that fits the bill with the other issue I mentioned but as long as the object structure is static it should be trivial to deconstruct/reconstruct the references manually. P.s. out of curiosity what possessed you to do pointclouds in sqf? 😛
  11. The key in this case is a string, "a" or "b" are very hashable. The stored value is the reference to the first HashMap. Nesting HashMaps like this is very useful for quick lookups of complex nature. Example: You have some thing that doesn't support setVariable, you can use nested hashmaps to replicate similar functionality where the lower level contains "variables" and their values while the upper level acts as a registry for each "thing". The lower level keys can be shared across multiple things which means easy to use and value lookup is fast even with massive amounts of objects with a lot of variables. And to clarify: This works fine during runtime. This is only a problem during save/load of a mission. A bug report is also a way to get verification if it is or isn't a bug. 🙂
  12. Honestly seems like a bug. Good find if so, I wonder does it only happen when 'm' is empty? Or if it's not a missionNamespace variable? Last I checked loaded HashMaps doesn't retain group or object references either, unlike arrays. My guess is the serializer doesn't know how to handle them properly. You should post it to the Feedback Tracker but I wouldn't hold my breath for a fix expect a fix. It's quite a niche issue and you can work around it by converting HashMaps to arrays on save, then use the Loaded eventhandler and createHashMapFromArray to rebuild.
  13. mrcurry

    attach object to vehicle

    setVehicleCargo only works with certain combinations of vehicles and cargo. As an FYI, for the command to work the following must be true: The vehicle needs to have a defined capacity ( mass and volume ) The cargo needs to be defined with appropriate values for the same. The cargo must no exceed the capacity of the vehicle. You can read more details here but to summarise that's all defined on the config side so as a mission creator at best you can test the combination using: vehicle canVehicleCargo cargo Note that the returned value is not true/false but rather an array of Booleans: [ willFitIntoCurrentVehicle, willFitIntoEmptyVehicle ]
  14. From HandleDamage wiki: From the explanation thread linked on the same page: With your current setup you are setting the damage for the selection to 25% of the resulting damage level, hence the healing effect. AFAIK the event handler executes before the damage is applied, if true you need to subtract the current damage (getHit) from the damage parameter to get the delta (incoming damage). Multiply that by 0.25 to get the reduction and add the current damage back to get the modified resulting damage level.
  15. mrcurry

    Making AI Ignore Units

    When you switch it's side also use: unit setCaptive true; Then when you want it to be shot at do: unit setCaptive false;
×