Jump to content

matt_d_rat

Member
  • Content Count

    3
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

About matt_d_rat

  • Rank
    Rookie
  1. matt_d_rat

    Dialog not appearing

    This is quite an old post so I assume you managed to resolve your issue, thought I would post an answer though as this had me stumped for a couple of hours, so hopefully it will help anyone else with the same issue. The answer is actually very simple. Whether or not you define your dialog classes in description.ext or in an external .hpp file which you include in description.ext (via #include) you need to actually save the mission in the mission editor before reloading. This is because the mission editor only reads description.ext once when you initially load the mission. When you save the mission the editor reloads description.ext.
  2. matt_d_rat

    Phalanx and Ak-630 CIWS

    After a day of trying I got this to work with Sensors, thought I would share the code I wrote for others to use: sensor_enter.sqf Handles when a player enters the restricted airspace around the carrier/base if ((getPlayerUID player) in ["xxxx"]) then { // Player is on the whitelist systemChat (format ["[uSS Nimitz]: Clearance granted. Welcome aboard %1.", name player]); } else { titleText ["You are entering restricted airspace.", "PLAIN DOWN", 3]; // Player is NOT on the whitelist sleep 5; systemChat (format ["[uSS Nimitz]: Unknown contact, heading %1. You are entering restricted airspace. Divert your current course immediately. Over.", getDir player]); sleep 5; systemChat ("[uSS Nimitz]: Unknown contact, do you copy? You are entering a restricted zone. Divert immediately or we will use force. Over."); sleep 5; systemChat ("[uSS Nimitz]: Unknown contact you have 20 seconds to comply or we will use force. Adjust your heading immediately. Over."); sleep 10; systemChat ("[uSS Nimitz]: Unknown contact, divert immediately. You have 10 seconds to comply. Over."); sleep 10; systemChat (format ["[uSS Nimitz]: Anti-air defences are cleared to engage unknown contact, heading %1. Over and out.", getDir player]); // Set the player's rating to less than -2000 so that they will be considered an enemy by the anti-air defence system. player addRating -4000; } sensor_exit.sqf Handles when a player leaves the restricted airspace around the carrier/base. titleText ["You have left restricted airspace.", "PLAIN DOWN", 3]; if (!(getPlayerUID player) in ["xxxx"]) then { // If the player is not on the whitelist but leaves the area, set their rating above -2000 so they are no longer declared an enemy. player addRating 2000; } mission.sqm Add a sensor to the Sensors class, mine looks like this (see below). This creates an area 800m around and above the center of the sensor (defined by the position). class Item5 { position[]={15023.3,178.104,11574.1}; a=800; b=800; activationBy="ANY"; repeating=1; interruptable=1; age="UNKNOWN"; name="zoneNimitz"; expCond="(vehicle player) in thislist;"; expActiv="terminate sensorExit; sensorEnter = [] execVM ""path\to\sensor_enter.sqf"";"; expDesactiv="terminate sensorEnter; sensorExit = [] execVM ""path\to\sensor_exit.sqf"";"; class Effects { }; }; Still very much a work in progress, and the code can certainly do with a bit of tidying up, but it works as expected. Hope others get some use out of it.
  3. matt_d_rat

    Phalanx and Ak-630 CIWS

    Hey, First of all, awesome addon. Brings such a smile to my face when I see them light up enemy targets. I was wondering whether the addon supports a whitelist feature? Where by given an array of player guids, those players will not be treated as hostile threats and will therefore not targeted by the weapons system. Anyone else who is not on said whitelist is treated as hostile and will be targeted. Anyone have any idea how I could go about doing this? I'm a fairly competent coder so am happy to write a custom init.sqf script to support this for my server, but from what i can tell the internals of the addon work with which side you're on, and if no side is set it then calls getFriend to work out if the target is hostile or not.
×