Jump to content

meatball

Member
  • Content Count

    734
  • Joined

  • Last visited

  • Medals

Posts posted by meatball


  1. v 0.9 Released!

    Some great updates this version! I'm considering entering this into the ARMA Content Contest, so please let me know if you have any feedback or find any bugs!

    Changelog

    - Headless Client Support and auto detection now built in! To use a Headless client, load up the mission, connect to the mission as an admin and then connect the Headless client. The HC should connect to the Civilian Headless Client Slot. NOTE: If the HC crashes/disconnects during mission, you will need to restart the mission and reconnect the HC for AI to work properly.

    - New 'Recon Engineer' role should be able to handle all of your repair needs.

    - Players will now air drop at the Central Altis step off point as opposed to just being teleported there. Remember to open your chute!

    - JIP players can now air drop on the rest of the team as opposed to having to grab a boat and try to meet up with the team.

    - Added in parameter to turn ambient Civilians on/off as I found they were actually causing a decent hit on larger game FPS counts. Default setting is Off.

    - Added in Zealot's Civilian Vehicle Spawn script to add randomly spawned civilian vehicles into towns & cities.

    - Multiple AI spawning/caching improvements to speed up spawn and caching speeds.

    -Added in a handful of new missions and random events to the mission.

    - Lots of task and mission fixes.

    - AI balancing adjustments.

    - Removed edits to the base loadouts for each role since VAS is available for players to loadout any way they wish.

    Known Issues:

    - Players will occasionally lose their ability to revive or be revived unless they disconnect/reconnect to the server. Bug reported to BTC Revive script writer, Giallustio.

    - Mission and tasks have a lot of moving parts, and there still may be some issues/bugs.

    See initial post for download link.


  2. Sure but how do I use that? Do I still have to use specific triggers for every spawn if I use simplecache?

    Ideally what I'm looking for is something that spawns and despawns stuff independent of triggers and only takes into account markers.

    AI Spawn Script pack is based on markers or whaterver you set as your center point for the spawn. It then checks for players within the range you pick and spawns/despawns based on that, no triggers needed. Like Fight9 said, EOS does that as well. I think most spawn / cache scripts are built that way nowadays.

    The best thing to do is create an empty mission, create a spawn point and test out the various scripts and see which you like the best. They all are a bit different and excel in different areas, so it'll depend on your mission concept/setup which works best for you.


  3. Yeah, I'm sure there is a way to pull up that task menu, I just can't for the life of me figure out how to do it.

    I'd be happy enough with the hintC output as well if it would correctly handle/parse the 'marker links' that you can embed in task descriptions.

    ---------- Post added at 20:07 ---------- Previous post was at 19:57 ----------

    Here's a good picture of showing the difference between what I'd like to do, and what I've been able to do.

    taskImage.jpg

    Up top you'll see the top left default menu that contains normal map/mission information inclucing "Tasks" if there are any assigned to the player, you can click on that and see all the associated tasks, and then if you click on the individual task, it will give you the Task name and full description. You'll also notice the 'test link for a marker' shows grey because it's actually a link to the map marker associated with the task by setting the task description up like this:

    "Task 1 Stuff.  Here's a <marker name = "task1">test link for a marker</marker>.

    If you click on that link, the map will take you right to the associated marker and target it on the map, which you can see by the blue box surrounding the Task 1 marker.

    On the bottom is the output of my script that finds the closest marker to the map click and then grabs the task name/description using BIS_fnc_taskDescription. Then it uses HintC showing that same task name and description and you'll see it doesn't handle the marker name/marker xml. If I do hintC parsetext, it just completely strips out everything between the marker name/marker tags, including the tags.

    I'd love it if I could code-wise just pull up the default task box (the top right dark grey box) that you can get to from the menu. :)


  4. Okay, I'm back on my computer. Is there any particular reason why you're using global variables across the board? Unless you're explicitly calling all these variables outside the function there's no need to make them global. Another question: Do you want to open the relevant task info in the "Task" Tab when the player clicks close to a task marker? That seems to be the most reasonable thing to do here honestly, but it appears as if you're using a hint.

    Using global because I wasn't able to use local variables once I fired up that while loop and the embedded for loop and reference back to them outside of the scopes of those loops.

    And as for your second question, absolutely! That's exactly what I want and I don't want to use a hint, but I've yet to figure out how to pull up the 'Task Tab' through script commands once I have the correct task name/ID.

    ---------- Post added at 17:41 ---------- Previous post was at 17:39 ----------

    Hey there! Take a look at this command, I use it to great affect for determing the closest "thing". It looks like you're fairly competent when it comes to scripting - but I'm just going to assume you haven't heard any of this (So if you have, just ignore it :> ) ... Of course, that is if you wanted to take the time to create a dialog that opens, and not a simple little pop-up menu

    Thanks!


  5. Thanks, but a strategic map won't work for me. I don't need the players to 'select' missions so much as I want them to just pull up the map, see what tasks are around them and easily pull the task info up. My script is a kludge, but it's working sorta.

    I have found that if you have any type of code/links (marker name, etc) in your task it doesn't parse those as actual links and just dumps them out as text with all the code. I'm digging through all the functions to see if I can find anything that might work better, but a lot of the stuff doesn't have the best documentation, so it's hard to figure out what they do.

    I think I'm going to have to dig into some GUI editing to create a new pop up box that parses the task header and description text correctly and paste it on the map GUI. Just stinks I can't figure out how open up the in game task list UI on the map to a specific task with scripting since that's exactly what it is. :)


  6. So at a high level, I'm looking to create a script that when a player to opens up their map (which I can watch for with a repeatable trigger that launches the script when it sees visibleMap true) and 'clicks' anywhere on it, it does the following:

    1. Calculate the distance between that click and a series of markers in an array
    2. Returns which marker is the closest to the map click.
    3. Once the closest marker has been determined, then match that up to a task that is related to that marker.
    4. Open up the Task list and show that task without the player having to scroll through the list manually.
    5. Repeat the process if the mouse is clicked at another location on the map.

    Edit: Old Script/Code removed, see updated below.

    I've got the first few steps worked out, but I could be going about this the completely wrong way, and if someone has an idea on how to handle this, any thoughts or ideas on how to start tackling controlling the GUI/menus on the map through script, I'd appreciate any help.

    ---------- Post added at 05:11 ---------- Previous post was at 03:13 ----------

    Alright, so I've got something 'working', but it's not the best at the moment. Basically you can open up the map and it will check your mouse clicks against the list of task markers. If any are within 500m of your click, it'll display the task information as a hint. The hint is ugly as sin, and I'd really like to figure out a way to actually pull up the task description/info in the Task menu that's available in the top left of the map screen. At the very least, I need to clean up the hint output.

    I've created a quick proof of concept mission and the script is below. If anyone has any thoughts or suggestions, I'd love to hear them...

    // mapSelector Script by Meatball
    // v 0.1
    // This script allows your players to 'click' on their map and pull up the task
    // information for the task marker closest to their click location without having to 
    // manually pull up the task list.
    //
    // This script setup _may_ interfere with other scripts that you may have that 
    // spawn or create actions based on single mouse clicks on the map and you may need
    // to adjust the script(s) and trigger(s) accordingly.
    
    // Setup: 
    // 1) Copy this script to your root folder of your mission. 
    //
    // 2) Create an in game trigger with the following setting:
    // Shape: Whatever you want
    // Timer: Countdown or Timeout works, just set all values to 0
    // Name: mapSelector
    // Text: Map Selector Trigger
    // Type and Activation : None
    // Repeatedly
    // Present
    // Condition: visibleMap
    // On Act.: nul = execVM "mapSelector.sqf";
    //
    // 3) Next, in the 'markerNames' array below, put in the names of all the markers related to your tasks.
    // Note: Your marker names _must_ match the task name exactly for the related markers/task or the script will not work.
    // For example: If you have a task named 'task1', the marker related to that task must also be named 'task1'.
    //
    
    markerNames = ["task1","task2","task3"];  // Set list of Marker names to check against.
    markerNum = count markerNames;  // Count the number of markers in the list
    closestMarkName = "dummy";  // Set dummy values for the closest marker and closest distance
    closestMarkDist = 1000000;
    
    // Continuously check for mouse clicks while the map is open.
    while {visibleMap} do {
    onMapSingleClick {
    // Create temporary marker to use for comparison to markers in array.
    _tmpMark = createMarkerLocal ["tmpClick",_pos];
    
    // Loop through each marker in markerNames array and check distance between it and the mouse click.
    for [{_i=0},{_i<markerNum},{_i=_i+1}] do {
    distBT = (getmarkerpos "tmpClick") distance (getmarkerpos (markerNames select _i));
    	// If the distance between this marker and closer than the current closest, set it to be the closest.
    	if (distBT <= closestMarkDist) then {
    		closestMarkName = (markerNames select _i);
    		closestMarkDist = distBT;
    		};
    	};
    
    // Check to make sure that mouse click is at least within 500m of any marker before displaying Task info.
    if (closestMarkDist <= 500) then {
    _tmpTaskArray = closestMarkName call BIS_fnc_taskDescription;
    _tmpTaskDesc = _tmpTaskArray select 0;
    _tmpTaskDesc2 = _tmpTaskDesc select 0;
    _tmpTaskTitle = _tmpTaskArray select 1;
    _tmpTaskTitle2 = _tmpTaskTitle select 0;
    hint format ["%1\n\n%2",_tmpTaskTitle2,_tmpTaskDesc2];
    };
    
    // Reset marker info/variables for next click.
    deletemarkerlocal "tmpClick";
    closestMarkName = "dummy";
    closestMarkDist = 1000000;
    };
    };
    


  7. Yeah, I also think that the "militarize" script from the AI Spawn Script Pack is probably an easy way to get things going. Set a center marker, set up the AI spawn call and your done. He's even got a flash app where you can just plug in the values you want and it'll create the call line for you.

    His ambient combat script might be good too if you just want random combat around you...


  8. Appears to be the server. First line of the script exits if the script is run on anything other than the server.

    ---------- Post added at 19:33 ---------- Previous post was at 18:49 ----------

    Did a quick test and looks good so far, but a couple of comments/questions.

    1) Looks like it only spawns pickup trucks. Think it's just a matter of adding other civilian options to the _classes array and then selecting one at random from that. Something like:

    _classes = ["C_Offroad_01_F","C_Quadbike_01_F","C_Hatchback_01_F","C_Hatchback_01_sport_F","C_SUV_01_F","C_Van_01_transport_F","C_Van_01_box_F","C_Van_01_fuel_F"];
    ...
    _class = (_classes call BIS_fnc_selectRandom);
    

    2) Be nice to be able to feed the script parameters for the range that spawn/despawn occurs.

    3) Do you 'reset' the variables on these vehicles so if players take them, they don't get cleaned up by despawn?


  9. Hey MAD, love the script. Any chance you're going to optimize so the script will run just on a server or have headless client support as opposed to running on clients? Might just be something off on mine, but I'm seeing some FPS drag on missions when I have both the foot and traffic scripts and was hoping to offload it to a headless client or even to the server.


  10. Well, here's what I was thinking. I set a global variable in the 'paradrop script' when it starts to paradropping == 1 and when it finished (player has landed/gotten their backpack) to paradropping == 0. Using this variable I should be stop BTC from doing get gears until the player is on the ground.

    I'm thinking I can just change the BTC_revive_loop function to check that variable as well with a change to the if check:

    if (Alive player && paraDropping == 0 && format ["%1",player getVariable "BTC_need_revive"] != "1") then ...
    

    The other thought to just stop the gear from being checked at all if the player is in the middle of a drop and adding a simple waitUntil {paraDropping == 0}; to the first line in that function.

    Thoughts?


  11. Anyone know of any way to put a minor 'delay' in the revive script? Let me explain what I'm doing and it'll make more sense. I've written a simple 'paradrop' script that grabs info about the players backpack and it's contents, sticks that in an array, then removes it to put a parachute on the player. On landing, it does the reverse, removing/dropping the parachute and then putting the original backpack/contents back on.

    Problem is, if the players die on landing, since I have BTC set to respawn the players with gear, BTC is seeing the dead player wearing the parachute, because the paradrop script hasn't had a chance to swap it back, and then when the player is revived, they've lost their backpack.


  12. Ah, yeah, I hadn't even thought of deleteVehicle. I'll give that a shot. Now I just need to figure out the JIP player airdrop. I'm thinking I might be able to use the isJIP variable I'm using to determine whether or not a player is isJIP (0 is not, 1 is JIP). I think if I figure out how to parse through each group member and find the first that is isJIP==0 I can be pretty sure that the airdrop location is correct.

×