Jump to content

devildog664

Member
  • Content Count

    70
  • Joined

  • Last visited

  • Medals

Posts posted by devildog664


  1. So I’m trying to run a code whenever I click on the map. I have been trying to use onclick but not having any luck. I am able to click my custom icons on the map but that’s it. Currently I click on a custom icon which then brings up a small GUI. I then want to be able to click off the GUI any where on the map and have it close.

    I have been trying many things like

    SCR_MapEntity mapEntity = SCR_MapEntity.GetMapInstance();
    
    Widget mapWidget = mapEntity.GetMapConfig().RootWidgetRef;
    
    m_ModalHandler = new SCR_RTS2();
    
    mapWidget.AddHandler(m_ModalHandler);
    
    m_ModalHandler.m_OnClick.Insert(TEST664);

    I also tried 

    OnModalClickOut

    but no luck. If anyone can just point me in the right direction that would be great.


  2. I need help getting a triggers Box Mins and Box Maxs values in my script. I am able to get the sphere size with this
     

    SCR_BaseTriggerEntity trigger = SCR_BaseTriggerEntity.Cast(GetGame().GetWorld().FindEntityByName(TriggerName));
    if (trigger)
    {
    	Marker_Radius = trigger.GetSphereRadius();
    };

     

    But I cant figure out how to get the box values along with any other data from the trigger. I cannot find any other functions like GetSphereRadius but for the box values. If anyone can point me in the right direction that would be great.


  3. 5 minutes ago, pierremgi said:

    That seems due to the hard coded limitation for nbr of groups on each side (see notes). As civilians are not grouped (by default), you create one group for each of them.

    Usually, civilian life is spawned/de-spawned along with players' distances.

    @pierremgiWithin my scripts civilian life is spawned/de-spawned along with players' distances. But when the mission starts i spawn AI in every town to get their information like their name and then delete them. Then when the player gets within range of the town the AI will spawn in based on the data gather at the beginning of the mission. This is also the same data the scanner uses. I will try making large groups but still think its something to do with the names generated for AI when they spawn in.


  4. We are not naming the civilians i need to get the random names ai spawn with to make persistent AI. So example a civilian named Jon doe is logged at this town so when ever i come back to that town i get the ai data and names of ai who live there then spawn a civilian named Jon doe. Each town depending on its size has about 10-25 civilians that live there. The overall goal of this is because im making a bio metric scanner. Within the scanner you are able to look up names of civilians and get information on them. This all works and is really cool but unfortunately after 288 names it craps out. I hope that makes sense i feel like im bad at explaining these things. @wogz187


  5. Ill explain this as short as i can. So i have a script that spawns AI civilians at each town (One town at a time) get their name (using name _Unit) and other information and then logs it into a data array and then finally removes the units. This repeats for every valid location and needs to be done at the start of the mission to mostly get the name of the civilian but also other info as well. The problem is after 288 spawns the ai seem to run out of names so their names become "Error: No Vehicle" even though they do successfully spawn. My question is there a way to clear all names so they can just start to reuse them or something along the lines of that?

     

    Better explanation. 

    Process of events.

    1. Mission starts

    2. A town location is selected

    3. A number of AI will spawn

    4. Data from that AI just spawned will get gathered and logged

    5. AI is deleted

    6. Repeat steps 2-5 until all towns are done

    7. Player get close to town and AI Spawn in based on logged data in step 4

    Everything works perfect if the ai number is below 288. Once ai spawns hit 288 using the name command will return "Error: No Vehicle". How does one get around this.

     


  6. 7 hours ago, killzone_kid said:

    1. You can place controls group and place your buttons in it, when total height of all buttons exceeds controls group height, scroll bar will appear.

    Wow that was easy I was trying to add a scroll bar to a control group haha. 

    6 hours ago, Mr H. said:

     

    Nope, they actually made a bunch of pictures and animate them with a for "_i" loop and ctrlSetText
    I did it for my team logo like this
     

    
    params ["_ctrl"];
    while {ctrlShown _ctrl} do {
    for "_i" from 1 to 144 do {
    	_string = "\TGV_Assets\paa\Logopaa\TGV(" +str _i + ").paa";
    	_ctrl ctrlSetText _string;
    	uisleep 0.05;
    };
    };

    Takes a lot of pictures calculated in blender and converted to paa, long and tedious ^^

    Very interesting I would of thought there was more to it then just many pictures. 
    Appreciate both answers for question 2. The more options the better so I’ll play around with these and see which one works best for my application. 


  7. Hello so I got two question about GUIs so if someone can point me in the right direction or some useful threads it would be much appreciated. Was searching but did not find anything useful. 
     

    1. is there a way I can make a scroll panel. What I mean by this is a panel that buttons and text is attached to but you can also scroll up or down with. Example hereScrollablePanel.PNG

     

    2. How would one make an animated GUI or moving parts to a GUI. Like ACRE does with their radio knobs that turn. 
     

    If anyone has examples of good threads that discuss this that would be amazing. Thanks in advance.


  8. 2 hours ago, Devastator_cm said:

    this is what I have in init.sqf to add Ace action to a truck and it works fine by me

     

    _action = ["unload_truck_w", "Unload the Truck", "",{_hnd = []execvm "unload_w_truck.sqf"}, {(!isnull W_Box_9 && alive W_Box_9)}] call ace_interact_menu_fnc_createAction; 
        [W_Truck, 0, ["ACE_MainActions"], _action] call ace_interact_menu_fnc_addActionToObject;

    I can add actions for myself but  trying to add an action under the Interactions action of another unit. If that makes sense. 

    1 hour ago, nkenny said:

     

    Isn't it just straight under "ACE_MainActions" ?  Not on my PC at the moment, so can't check, but this LINK, does seem to suggest it

     

    -k 

    No luck.

     

    Edit. Never mind got it your right its just ["ACE_MainActions"] nothing before or after. Btw that link was very helpful. Thanks guys.

     

    Got another quick question. Is there a way I can detect if an action is selected. Example: im need to set a certain variable for a unit when the player use the "Takes Prisoner" action. 


  9. Can anyone help me find the Parent path names so i can add ace actions. Im trying to add an action to a civilian under their interaction but having trouble. I just need the class names for the parent paths as i guessed the ACE_Interaction but I guess that is not it. 

    _New_Talk_Action = ["Civilian_Talk","Talk","",{[_Unit,"Talk"] call Civilian_Interaction;},{true},{},{},{},5] call ace_interact_menu_fnc_createAction; 
    [_Unit,0,["ACE_MainActions","ACE_Interactions"],_New_Talk_Action] call ace_interact_menu_fnc_addActionToObject;

     


  10. As the title states how do make objects greyed out objects before placement? Im building a system to allow the player to place certain objects like sandbags, MG nests, ect but want to have what ever they are going to place in front of them and greyed out along with being see through. So basically like how before you place an object in Zeus it just shows you almost like a grey out line of it. I cannot find any info on doing this so any help in the right direction would be appreciated. Thanks 


  11. So just a quick update I used the ORBAT as sugested and made the APCs into a new faction and removed all the CargoGunner positions in the config and now it works like a charm. So i dont know if you guys want to look into this issue and see why your scripts want to fill the CargoGunner positions first over the actual gunner positions. So again the issue can be reproduced every time by spawning in a crewed vehicle with CargoGunner positions then letting it despawn and then respawn again. 


  12. 1 hour ago, redarmy said:

    It would be more about the "time" or quickness of teleporting,and not about the range that would cause odd behaviour.

     

    Is your faction ORBAT made?If not,you could recreate the current faction you use in ORBAT,and on those vehicles with extra fire positions,man them with "none" in the ORBAT vehicle edit options.Or do the opposite and fill all seats so the commander and gunner will be sure of having crew

    I figured the range would do nothing but i have tried waiting but still same effect. The faction is the Community Upgrade Projected(CUP) that is listed as a supported faction for ALIVE. I will try and see if i can edit it through the ORBAT or what i was thinking about doing is when ever a vehicle profile is spawned back in i can just run a script on the group to take the crew members and just assign them to the gunner and commander spots. Is there a way i can almost set an eventhandler or something so when ever a profile is spawned back in i can run the script? 

    The CUP vehicles have the CargoGunner positions which seem to be priority over the gunner and commander.


  13. 15 minutes ago, HeroesandvillainsOS said:

    Teleporting isn’t really a reliable testing method. If the APC naturally despawns, then respawns, will this issue occur? 

    Lowered the despawn range and just ran and it has the same effect. I also noticed that more crew members are created then needed. I’m thinking it could be the config for the CUP vehicle and that the script is returning the turret spots (the cargo positions that you can shoot out of) of the vehicle as actual gunner positions. That could also be causing the issue where the crew takes up those cargo turret spots before the actual gunner and commander spots. 


  14. Seems to be a weird issue with CUP APCs. So spawn in a crewed CUP apc let’s say an AAV now teleport the player near the apc so it spawns in and look at it and everything will be good. Now teleport the player far away so the APC despawns then again teleport back to the area so it spawns and the crew will get out and move into cargo positions every time except the driver. Does not happen with RHS APCs seems to just be the CUP ones. 


  15. 8 hours ago, Alex150201 said:

    It looks great but one thing that is arma related is that AI will just sit on the beach and cry.

    This is off topic but I would reccommend you use the following command: https://community.bistudio.com/wiki/allowFleeing

    I know how Arma AI is haha but they do not sit on the beach they push up into the island. I did multiple play tests and they push right up off the beach. The reason why they were sitting on the beach In the beginning is because they let are a lot of dug in enemy’s but once they get cleared they start pushing. Allowfleeing I use that on all my missions haha. But the mission actually get even more intense as you proceed because the enemy control points can spawn their on reinforcements if they have enough supplies and their HQ can send in tanks and other vehicles.

    • Like 1
×