Jump to content
Zenophon

Zenophon's ArmA 3 Co-op Mission Making Framework

Recommended Posts

10 hours ago, Mr. Lt. said:

 

Thanks it worked. I did try putting 4 men in there it just didnt work the 1st time.

 

the zen_spawninfantry is easier as it can put number of units with just the the scalar value but I cant get it to work with the addon units. I have ready somewhere here i need to look at the cfg file of the addon? then put the faction name of that unit and its corresponding classname?

 

 

 

Yes. Using addons you'll have to look for the correct parameters for options 5, 6 and 8 for it to work correctly.

Share this post


Link to post
Share on other sites

Thanks. Another one... i think i found some sqf in the frame where u can make the AI be a pilot and take players from base to a certain LZ depending where the active mission is. But now i cant find it in the framework. Not sure if its within this framework or another script. Can someone walk me through this please?

 

Thanks

Share this post


Link to post
Share on other sites

can this framework be used to make capture the town where red marker is on the map when not conquered and will turn green when conquered?

also how do I do this what scripts to use?

Share this post


Link to post
Share on other sites
17 hours ago, cdn_biggdogg said:

Yes. Using addons you'll have to look for the correct parameters for options 5, 6 and 8 for it to work correctly.

how do i find out the correct parameters for these?

Share this post


Link to post
Share on other sites
23 hours ago, Mr. Lt. said:

Thanks. Another one... i think i found some sqf in the frame where u can make the AI be a pilot and take players from base to a certain LZ depending where the active mission is. But now i cant find it in the framework. Not sure if its within this framework or another script. Can someone walk me through this please?

 

Thanks

 

You mean a one-way insertion that waits for the players to get in the helicopter?  As an example, I cut this out of the Abduction mission from ZMCM:

_heli = ["mkBase", "b_heli_transport_01_f", 0, random 360] call Zen_SpawnHelicopter;

waitUntil {
    sleep 2;
    ([_players] call Zen_AreInVehicle)
};

_h_insert = [_heli, [_lzPos, "mkBase"], _players, "full"] spawn Zen_OrderInsertion;

How you determine _lzPos is based upon the mission; it could be random, given by player input, etc.

 

22 hours ago, Mr. Lt. said:

can this framework be used to make capture the town where red marker is on the map when not conquered and will turn green when conquered?

also how do I do this what scripts to use?

 

A self-contained function for that is not provided by the framework, but the logical parts required to do it are.  You can use Zen_GetAllInArea to find the units inside the marker, as well as Zen_AreInArea and Zen_AreNotInArea to check for specific units being inside.

 

The exact logic of the script depends upon what you consider to be 'conquered' as well as if the Opfor can recapture the zone, but for as a simple example of one-time capture

// let's call it "mkTown"
waitUntil {
    sleep 2;
    (count (["mkTown", [], east] call Zen_GetAllInArea) == 0)
};

"mkTown" setMarkerColor "colorBlufor";

If you are using the task system, the above code is basically the same logic as that of Zen_TriggerAreaClear.

 

22 hours ago, Mr. Lt. said:

how do i find out the correct parameters for these?

 

Using the config viewer in the editor, 5, 6, and 8 would be 'vehicleClass', 'faction', and 'expansion' data fields.  Note that units are sorted and categorized in the editor based upon these, so e.g. all the Apex guerrilla units share the same 3 values (and thus are all in the same unit submenu).  You can also make use the blacklist argument to exclude any units from that set you don't want.  The code for those Apex units would be:

_group = [_pos, resistance, "infantry", [3,4], "Men", "IND_C_F", ["I_C_Soldier_base_unarmed_F", "I_C_Pilot_F"], "Expansion"] call Zen_SpawnInfantry;

where we've left out the unarmed unit and the pilot (and confusingly the expansion value is 'Expansion', but that's the value for all Apex classes).

 

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, Zenophon said:

 

You mean a one-way insertion that waits for the players to get in the helicopter?  As an example, I cut this out of the Abduction mission from ZMCM:


_heli = ["mkBase", "b_heli_transport_01_f", 0, random 360] call Zen_SpawnHelicopter;

waitUntil {
    sleep 2;
    ([_players] call Zen_AreInVehicle)
};

_h_insert = [_heli, [_lzPos, "mkBase"], _players, "full"] spawn Zen_OrderInsertion;

How you determine _lzPos is based upon the mission; it could be random, given by player input, etc.

 

 

A self-contained function for that is not provided by the framework, but the logical parts required to do it are.  You can use Zen_GetAllInArea to find the units inside the marker, as well as Zen_AreInArea and Zen_AreNotInArea to check for specific units being inside.

 

The exact logic of the script depends upon what you consider to be 'conquered' as well as if the Opfor can recapture the zone, but for as a simple example of one-time capture


// let's call it "mkTown"
waitUntil {
    sleep 2;
    (count (["mkTown", [], east] call Zen_GetAllInArea) == 0)
};

"mkTown" setMarkerColor "colorBlufor";

If you are using the task system, the above code is basically the same logic as that of Zen_TriggerAreaClear.

 

 

Using the config viewer in the editor, 5, 6, and 8 would be 'vehicleClass', 'faction', and 'expansion' data fields.  Note that units are sorted and categorized in the editor based upon these, so e.g. all the Apex guerrilla units share the same 3 values (and thus are all in the same unit submenu).  You can also make use the blacklist argument to exclude any units from that set you don't want.  The code for those Apex units would be:


_group = [_pos, resistance, "infantry", [3,4], "Men", "IND_C_F", ["I_C_Soldier_base_unarmed_F", "I_C_Pilot_F"], "Expansion"] call Zen_SpawnInfantry;

where we've left out the unarmed unit and the pilot (and confusingly the expansion value is 'Expansion', but that's the value for all Apex classes).

 

 

Thanks. I have figured out the spawn infantry, in have used the view CFG in editor and to find out the paratmeters and it worked.

 

regarding the capturable town, how would I make it so if the AI counter attacks and players are killed it will turn into their side. wanted it recapturable by East side again when no blu for are present.

trying to find tutorial for this but cant find any.

 

Share this post


Link to post
Share on other sites
2 hours ago, Mr. Lt. said:

 

Thanks. I have figured out the spawn infantry, in have used the view CFG in editor and to find out the paratmeters and it worked.

 

regarding the capturable town, how would I make it so if the AI counter attacks and players are killed it will turn into their side. wanted it recapturable by East side again when no blu for are present.

trying to find tutorial for this but cant find any.

 

Look in the object functions section. You can use:

Zen_AreInArea

Determines whether all (1) are inside (2) or the logical polygon.
Usage : Call
Params: 1. Array, group, object, side, objects to test
    AND
        2. String, a marker
 (opt.) 3. Array, markeMy Activity Streams rs units cannot be in, (default: [])
    OR
        2. Array, group, object, string, the center of the polygon
        3. Array, the dimensions of the polygon
            1. Scalar, the horizontal radius
            2. Scalar, the vertical radius
        4. Scalar, the angle of the polygon as rotated from 0 degrees
        5. String, the shape of the polygon, only 'ellipse' or 'rectangle'
 (opt.) 6. Array, markers units cannot be in, (default: [])
Return: Boolean, true if all are inside

and/or (probably this one)

Zen_AreNotInArea

Determines whether none of (1) is inside (2) or the logical polygon.
Usage : Call
Params: 1. Array, group, object, side, objects to test
    AND
        2. String, a marker
 (opt.) 3. Array, markers units cannot be in, (default: [])
    OR
        2. Array, group, object, string, the center of the polygon
        3. Array, the dimensions of the polygon
            1. Scalar, the horizontal radius
            2. Scalar, the vertical radius
        4. Scalar, the angle of the polygon as rotated from 0 degrees
        5. String, the shape of the polygon, only 'ellipse' or 'rectangle'
 (opt.) 6. Array, markers units cannot be in, (default: [])
Return: Boolean, true if none is in the given area

to create logic in your mission to change colour of the marker and set conditions as you want them for who has control.

 

I highly recommend going through all the documentation Zenophon has provided and you will find that most of the questions are answered in there! He's sub-divided it smartly into sections of what the functions do (e.g. spawning, positioning etc.)

Share this post


Link to post
Share on other sites

Yes thanks. Im going through it everyday. But i do encounter problems when i wanted to use addon units/vehicles.

 

I have encounterrd a problem when doing the helicopter insertion where it calls the zenspawnheli which is also connected to spawnvehicle crew.

 

I have used the classname for huey helicopter from unsung mod and used pilot from unsung. But when i start the mission me and my squad are in the heli for insertion but no pilot so we crashed to death. But when i use the heli from vanilla i can see the addon pilot driving the heli. 

 

So i think the problem is using the addon heli? How do i overcome this?

 

Thanks

Share this post


Link to post
Share on other sites
1 hour ago, Mr. Lt. said:

Yes thanks. Im going through it everyday. But i do encounter problems when i wanted to use addon units/vehicles.

 

I have encounterrd a problem when doing the helicopter insertion where it calls the zenspawnheli which is also connected to spawnvehicle crew.

 

I have used the classname for huey helicopter from unsung mod and used pilot from unsung. But when i start the mission me and my squad are in the heli for insertion but no pilot so we crashed to death. But when i use the heli from vanilla i can see the addon pilot driving the heli. 

 

So i think the problem is using the addon heli? How do i overcome this?

 

Thanks

 

I don't use the unsung mod so I'm not sure why the pilot isn't there. The way around it would be to spawn the heli and then spawn the pilot on the ground then move him into the vehicle using:

 

Zen_MoveInVehicle

Places all (1) in (2) instantly.  It is fully multiplayer compatible and synch'd.  Extra
units will be left behind.
Usage : Spawn
Params: 1. Array, group, object, side, units
        2. Object, the vehicle
 (opt.) 3. String, where to put the units, 'Cargo', 'Driver', 'Turret', 'All', (default: 'Cargo')
 (opt.) 4. Array, string, turret to put units, 'All' 'Commander' 'Gunner' 'CargoFFV', (default: ['All'])
Return: Void

I have used this method in several missions and it works fine (I recommend putting a sleep of 0.2 to 0.5 between spawning the heli and the pilot but you need to move the pilot quickly if the heli is airborne). This works especially well when you want to spawn a vehicle and put units in from another faction or side.

Share this post


Link to post
Share on other sites

picthanks. i have tried it as soon as ive seen my reply. im not an expert as you can see, and i get an error message. so i have this code, but it manages to transport me to the insertion point and wait for me to get out then they take off. (that's good) but the error i get isn't ,check out the pic. thanks.

I had to spawn a group to be the heli pilot because the spawnvehiclecrew in the spawnhelicopter.sqf does not work for me. if anyone can show better solution it would be helpful thanks!"

 

_heliSpawnPos = ["lzblu", [1000,1200]] call
Zen_FindGroundPosition;
_helicopter = [_heliSpawnPos, "GR_UH1H_2", 80] call Zen_SpawnHelicopter;
sleep 0.5;
_grp1 = ["startblu", ["uns_pilot1","uns_pilot2"]] call Zen_SpawnGroup;
0 = [_grp1, _helicopter, "all"] call Zen_MoveInVehicle;
sleep 0.5;
0 = [_helicopter, ["startblu", _heliSpawnPos], (group player), "full", 80] spawn Zen_OrderInsertion;
sleep 0.5;
0 = [(group player), _helicopter] call Zen_MoveInVehicle;
sleep 120;

heres the pic

http://steamcommunity.com/sharedfiles/filedetails/?id=887339793

 

 

Share this post


Link to post
Share on other sites
15 hours ago, Mr. Lt. said:

picthanks. i have tried it as soon as ive seen my reply. im not an expert as you can see, and i get an error message. so i have this code, but it manages to transport me to the insertion point and wait for me to get out then they take off. (that's good) but the error i get isn't ,check out the pic. thanks.

I had to spawn a group to be the heli pilot because the spawnvehiclecrew in the spawnhelicopter.sqf does not work for me. if anyone can show better solution it would be helpful thanks!"

 

_heliSpawnPos = ["lzblu", [1000,1200]] call
Zen_FindGroundPosition;
_helicopter = [_heliSpawnPos, "GR_UH1H_2", 80] call Zen_SpawnHelicopter;
sleep 0.5;
_grp1 = ["startblu", ["uns_pilot1","uns_pilot2"]] call Zen_SpawnGroup;
0 = [_grp1, _helicopter, "all"] call Zen_MoveInVehicle;
sleep 0.5;
0 = [_helicopter, ["startblu", _heliSpawnPos], (group player), "full", 80] spawn Zen_OrderInsertion;
sleep 0.5;
0 = [(group player), _helicopter] call Zen_MoveInVehicle;
sleep 120;

heres the pic

http://steamcommunity.com/sharedfiles/filedetails/?id=887339793

 

 


 

Zen_SpawnHelicopter

Spawns a helicopter of side or type (2) at (1).  Spawns a crew of the correct side.
A height of 0 starts the helicopter on the ground, otherwise it starts with its
engines running and in flight. Does not work for UAV's.
Usage : Call
Params: 1. Array, group, object, string, the spawn point
    AND
        2. Side, the side of the random vehicle to spawn
    OR
        2. Array, strings, the classname(s) of vehicle(s) to randomly spawn
    AND
 (opt.) 3. Scalar, the height, (default: 40)
 (opt.) 4. Scalar, the direction that the vehicle is facing, in degrees, (default: 0)
    AND IF (2) == Side
 (opt.) 5. Array, string, the faction(s) of the random vehicle to spawn, (default: 'All')
 (opt.) 6. Array or string, DLC type(s), 'All' for all DLC, (default: '')
Return: Object

This will try to spawn the heli crew so I'm guessing that that helo is incorrectly configured. So to stop the error use :

 

_helicopter = [_heliSpawnPos, "GR_UH1H_2", 80] call Zen_SpawnVehicle;
Zen_SpawnVehicle

Spawns a vehicle of (2).  If the height is greater than 0, the vehicle starts in flight.
Uses ASL over the ocean.  Do not use a human classname, only inanimate objects.
Usage : Call
Params: 1. Array, group, object, string, the place to spawn
        2. String, the classname of the vehicle to spawn
 (opt.) 3. Scalar, the height above the ground to spawn the vehicle, (default: 0)
 (opt.) 4. Scalar, the direction the vehicle faces, in degrees, (default: 0)
 (opt.) 5. Boolean, true to set the vehicle's position exactly at the point, (default: false)
Return: Object

and then move the pilots into it!

Share this post


Link to post
Share on other sites

it worked for me. so after I got inserted, the heli goes back to spawn point.  and lands and waits forever, is there a way to despawn it? so if a new player joins midgame it will spawn again then despawn

Share this post


Link to post
Share on other sites
15 hours ago, Mr. Lt. said:

it worked for me. so after I got inserted, the heli goes back to spawn point.  and lands and waits forever, is there a way to despawn it? so if a new player joins midgame it will spawn again then despawn

 

Option 7!!

 

Zen_OrderInsertion

Orders (1) to go to each of (2) in order.  It waits for all (3) to get out of (1) at (2.1).
Then, if (2.2) is given, it goes there and waits forever; otherwise, it stops at (2.1)
forever.  Stops executing when (3) get out and (1) stops forever.  Works for all vehicles.
Usage : Spawn
Params: 1. Object, vehicle
    AND
        2. Array, the positions
            1. Array, group, object, string, the point to insert
     (opt.) 2. Array, group, object, string, where to land next
    OR
        2. Array, group, object, string, the position
    AND
        3. Array, object, group, side, the passengers to get off
 (opt.) 4. String, speed of (1), 'limited' 'normal' 'full', (default: 'normal')
    AND IF (1) is a helicopter
 (opt.) 5. Scalar, the height to fly at, (default: 40)
 (opt.) 6. String, insertion type, 'land', 'fastrope', 'parachute', (default: 'land')
 (opt.) 7. Boolean, true to delete (1) at the end, (default: false)
Return: Void

 

Share this post


Link to post
Share on other sites

thanks. I didnt see that one. i was looking at a different SQF

Share this post


Link to post
Share on other sites

for some reason i'm unable to spawn RHSGREF units. 


_team = [_marker,resistance,0.2,[6,8],"Men",'rhsgref_faction_chdkz_g',[],''] call Zen_SpawnInfantry;

game says there's no soldier found in this faction, while in the config it's clearly marked that this is their faction, and their category is "Men". Any idea?

Edit: I saw the examples you gave but they no longer work.

20170331135803_1.jpg

 

 

Edit 2: never mind, answered my own question again. i needed to look of vehicle class. so i got this - vehicleClass = "rhs_vehclass_infantry";

Share this post


Link to post
Share on other sites

new problem:

2bcx77.jpg

whenever i try to spawn RHS vehicles with crews in there, i get these things...

Share this post


Link to post
Share on other sites

It's likely that the vehicle isn't correctly configured so as a work around you'll have to spawn the vehicle using

Zen_SpawnVehicle

Spawns a vehicle of (2).  If the height is greater than 0, the vehicle starts in flight.
Uses ASL over the ocean.  Do not use a human classname, only inanimate objects.
Usage : Call
Params: 1. Array, group, object, string, the place to spawn
        2. String, the classname of the vehicle to spawn
 (opt.) 3. Scalar, the height above the ground to spawn the vehicle, (default: 0)
 (opt.) 4. Scalar, the direction the vehicle faces, in degrees, (default: 0)
 (opt.) 5. Boolean, true to set the vehicle's position exactly at the point, (default: false)
Return: Object

then spawn the crew using

Zen_SpawnGroup

Spawns each of (2) at (1).  Makes the group the side of the first classname given.
Do not use a non-human class name, only soldiers or civilians.
Usage : Call
Params: 1. Array, group, object, string, the spawn position
        2. Array of strings or String, classname(s) of the units to spawn in order
Return: Group

then use this to move them into the vehicle

Zen_MoveInVehicle

Places all (1) in (2) instantly.  It is fully multiplayer compatible and synch'd.  Extra
units will be left behind.
Usage : Spawn
Params: 1. Array, group, object, side, units
        2. Object, the vehicle
 (opt.) 3. String, where to put the units, 'Cargo', 'Driver', 'Turret', 'All', (default: 'Cargo')
 (opt.) 4. Array, string, turret to put units, 'All' 'Commander' 'Gunner' 'CargoFFV', (default: ['All'])
Return: Void

 

If you read a few posts above, we discussed another user having the exact same issue. There is some info there as well.

Share this post


Link to post
Share on other sites

Hey Zenophon!

Zen_SpawnInfantry

Spawns (4) units of side (2) as a group with skill (3) at (1).  (5,6) are based upon
config file organization and are subject to change by BIS.
Usage : Call
Params: 1. Array, group, object, string, the spawn point
        2. Side, of the units to spawn
        3. Skill, see Zen_SetAISkill documentation (2) (Object Functions)
    AND
        4. Scalar, how many units to spawn
    OR
        4. Array:
            1. Scalar, the minimum number of units to spawn
            2. Scalar, the maximum number of units to spawn
    OR
        4. Array:
            1. Scalar, minimum value of a Gaussian distribution
            2. Scalar, center (average) value of a Gaussian distribution
            3. Scalar, maximum value of a Gaussian distribution
    AND
 (opt.) 5. String, the type of soldiers to spawn, (default: 'Men'), 'MenDiver' 'MenRecon' 'MenSniper'
 (opt.) 6. String, the faction of soldiers to spawn, (default: 'All'), 'BLU_F', 'IND_F', 'OPF_F', 'BLU_G_F'
 (opt.) 7. Array of strings, classnames to blacklist from spawning, (default: [])
 (opt.) 8. Array or string, DLC type(s), 'All' for all DLC, (default: '')
Return: Group

 

Quote

Using the config viewer in the editor, 5, 6, and 8 would be 'vehicleClass', 'faction', and 'expansion' data fields.  Note that units are sorted and categorized in the editor based upon these, so e.g. all the Apex guerrilla units share the same 3 values (and thus are all in the same unit submenu).  You can also make use the blacklist argument to exclude any units from that set you don't want.  The code for those Apex units would be:


_group = [_pos, resistance, "infantry", [3,4], "Men", "IND_C_F", ["I_C_Soldier_base_unarmed_F", "I_C_Pilot_F"], "Expansion"] call Zen_SpawnInfantry;

where we've left out the unarmed unit and the pilot (and confusingly the expansion value is 'Expansion', but that's the value for all Apex classes).

 

I think in your next update that you should include the descriptions of 5,6 and 8 in your documentation so that people know what exactly to look for in the config viewer especially when using AddOn units! I know I stumbled through this on my own and was able to figure it out but it took some time. The info above would have been immensely helpful to know!

Share this post


Link to post
Share on other sites
4 hours ago, cdn_biggdogg said:

It's likely that the vehicle isn't correctly configured so as a work around you'll have to spawn the vehicle using


Zen_SpawnVehicle

Spawns a vehicle of (2).  If the height is greater than 0, the vehicle starts in flight.
Uses ASL over the ocean.  Do not use a human classname, only inanimate objects.
Usage : Call
Params: 1. Array, group, object, string, the place to spawn
        2. String, the classname of the vehicle to spawn
 (opt.) 3. Scalar, the height above the ground to spawn the vehicle, (default: 0)
 (opt.) 4. Scalar, the direction the vehicle faces, in degrees, (default: 0)
 (opt.) 5. Boolean, true to set the vehicle's position exactly at the point, (default: false)
Return: Object

then spawn the crew using


Zen_SpawnGroup

Spawns each of (2) at (1).  Makes the group the side of the first classname given.
Do not use a non-human class name, only soldiers or civilians.
Usage : Call
Params: 1. Array, group, object, string, the spawn position
        2. Array of strings or String, classname(s) of the units to spawn in order
Return: Group

then use this to move them into the vehicle


Zen_MoveInVehicle

Places all (1) in (2) instantly.  It is fully multiplayer compatible and synch'd.  Extra
units will be left behind.
Usage : Spawn
Params: 1. Array, group, object, side, units
        2. Object, the vehicle
 (opt.) 3. String, where to put the units, 'Cargo', 'Driver', 'Turret', 'All', (default: 'Cargo')
 (opt.) 4. Array, string, turret to put units, 'All' 'Commander' 'Gunner' 'CargoFFV', (default: ['All'])
Return: Void

 

If you read a few posts above, we discussed another user having the exact same issue. There is some info there as well.

well, i can use BIS creating/spawning functions as well, same things. vehicle patrol works, nevertheless.

Share this post


Link to post
Share on other sites

The "Vehicle is of unknown vehicleClass type" is just a warning that did not recognize the type of vehicle and spawned the default rifleman as the crew (b_soldier_f, etc.) rather than a tank crewman, helicopter pilot, etc..  There should still be a crew in the vehicle.  For example, these lines

_rhs_veh = [player, "rhsgref_ins_g_btr70"] call Zen_SpawnVehicle;
0 = [_rhs_veh] call Zen_SpawnVehicleCrew;

produce the error but result in a working vehicle.  You can use Zen_GiveLoadout and similar to change the crew's appearance, or as cdn_biggdogg said use Zen_SpawnGroup/Zen_SpawnInfantry and Zen_MoveInVehicle.

 

The Generic error in expression at 'sleep' looks like the result of running in an unscheduled environment.  If you're using the function from an EH, you'll need to use 'spawn' to get a scheduled environment.  This is discussed the FAQ.

 

Since the usage of addon vehicles/units is much more prevalent than when I wrote Zen_SpawnVehicleCrew, there's no reason the function can't keep up with the times.  For the next release (for which it's about time), Zen_SpawnVehicleCrew will use the classname defined in the vehicle's config under 'crew' ("rhsgref_ins_g_crew" in the case of this BTR-70).  That will allow it to automatically spawn addon units that fit their vehicle; if a vehicle lacks this property or the user gives a side that disagrees (so you can still force e.g. Blufor in a FIA truck), the old method will be used.

 

On 4/2/2017 at 0:46 PM, cdn_biggdogg said:

Hey Zenophon!

 

I think in your next update that you should include the descriptions of 5,6 and 8 in your documentation so that people know what exactly to look for in the config viewer especially when using AddOn units! I know I stumbled through this on my own and was able to figure it out but it took some time. The info above would have been immensely helpful to know!

 

I'll put the names of the class properties into the function's description.  Unfortunately, it's easy to miss the FAQ file; it's an odd combination of general questions and a few important details (class properties and the scheduled environment mainly).

Share this post


Link to post
Share on other sites

Update and Release #49
Introduction

 

Greetings fellow scripters and Armaholics, in this latest installment, I will continue to discuss the development of the framework and, of course, shamelessly advertise the framework in any way possible.

If this sounds boring, you can download the latest version from the original post. As always, the links to Google Drive for the .7z and .zip versions are already up to date. For those looking for older versions, go to file>revisions. The new version will be on Armaholic soon. Please bring any technical issues or mistakes to my attention, so e.g. people don't download the wrong version etc.

 

Changelog

 

This release focuses mostly on the dialog system.  The first important addition is support for control eventhandlers provided by the engine using the Event property; the full list is in the documentation.  The arguments of the EH will be passed, along with the standard arguments from data and linked controls; there is no limit to the number of events that can be stacked.  For the arguments and exact behavior of each EH see the BI wiki (https://community.bistudio.com/wiki/User_Interface_Event_Handlers).  Note that only EH's for controls are handled through this property; display EH's for the whole dialog must be added manually to (findDisplay 76).

 

The code behind Zen_RefreshDialog has been improved and updated to fix some issues and provide a smoother user experience.  It no longer resets which item in a list the user had selected; note that this is tracked by index only, if you rearrange elements of the list the selected value will change.  Zen_RefreshDialog also supports a variable update time, for smooth transitions between values.  I will be working on further optimizations in the future to improve the response time of Zen_RefreshDialog.

 

The map control can now be manipulated using the MapPosition and MapZoom properties; this allows you to scroll the map in response to user actions.  An important note: because the user can manually move/zoom the map, the MapPosition/MapZoom value of a map control is not necessarily the true; in order to restore the position/zoom of the map, that value must have changed in the control's data before you use Zen_RefreshDialog.  That means that you need to slightly change the position, e.g. with (vectorAdd [random 5, 0, 0]); otherwise, Zen_RefreshDialog will not know that the control requires updating.

 

A new StructuredText control type is supported; this control uses parseText on the regular Text property to interpret HTML/XML-like codes in the text.  Refer to the BI wiki (https://community.bistudio.com/wiki/Structured_Text) for the formatting of such strings.

 

Zen_InvokeDialog now has a parameter to catch the Esc key and prevent it from closing the dialog.  Warning: this will lock the user into the dialog and prevent them from closing it or exiting the mission; if the dialog does not provide another way to close it, the user will have to Alt-F4 out of the game.

 

4/18/17

 

Spoiler
  1. Fixed: Framework preprocessor library prevents repeated definition
  2. Fixed: Zen_FindCenterPosition caused an error if given an empty array
  3. Fixed: Zen_UpdateControl would not update Map control type
  4. Improved: Zen_RefreshDialog accuracy of detected changes
  5. Improved: Zen_RefreshDialog causes less flickering
  6. Improved: Zen_RefreshDialog restores the currently selected list item
  7. Improved: Zen_SpawnVehicleCrew uses the crew classname defined by the vehicle's config if possible
  8. Added: Zen_CreateControl properties Event, MapPosition, MapZoom, and Transparency
  9. Added: Zen_RefreshDialog parameter for control change time
  10. Added: Zen_CreateControl type StructuredText
  11. Added: Zen_InvokeDialog parameter to prevent Esc key exits
  12. Documentation: Improved Zen_SpawnInfantry
  13. Documentation: Updated for Zen_InvokeDialog, Zen_RefreshDialog
  14. Documentation: Updated Notepad++ SQF language and autocompletion file with ArmA 1.68 stable commands

 

 

Share this post


Link to post
Share on other sites

hey, just wanna say thank you here.

I've been using your framework in my Freelancers mission, and it works perfectly. Thanks to your framework, my scenario became so popular :P

Share this post


Link to post
Share on other sites
10 hours ago, Atlas1205 said:

hey, just wanna say thank you here.

I've been using your framework in my Freelancers mission, and it works perfectly. Thanks to your framework, my scenario became so popular :P

 

Hey Atlas, have you released any of your scenarios?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×