Comrades in Arms Discussion Board

Full Version: Mission making questions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
(05-17-2015, 08:21 AM)Outlawz7 link Wrote: [ -> ]Write one then use those functions to display it.

https://community.bistudio.com/wiki/nearestLocations

Here's a quick one

Code:
_nearbyLocations = nearestLocations [ position player, ["NameCity","NameCityCapital","NameLocal","NameMarine","NameVillage"], 5000];
_nearestLocation = _nearbyLocations select 0; 
_locationText  = text _nearestLocation;
_messageText = format["Near %1...",_locationText];
_introTitle = [[[_messageText, "<t size='1.0' font='puristaMedium'>%1</t>",50]],safezoneX,0.6,"<t color='#FFFFFFFF' align='left'>%1</t>"] spawn BIS_fnc_typeText;
And thanks again outlaws, this was exactly what i wanted.
6. This is a question about arranging the order of tasks. 

I have Task A and Task B. A has to be completed before B can. But if you fail A you cannot complete B, even if you meet the conditions for B to succeed after failing A. My way of doing this is deleting the taskb module with deletevehicle. Is there a "neater" way of doing this, also maybe to make it fit more suitably into a seperate and more complex framework.

I use triggeractivated task_A
(06-01-2015, 09:33 AM)Lightspeed link Wrote: [ -> ]6. This is a question about arranging the order of tasks.

I have Task A and Task B. A has to be completed before B can. But if you fail A you cannot complete B, even if you meet the conditions for B to succeed after failing A. My way of doing this is deleting the taskb module with deletevehicle. Is there a "neater" way of doing this, also maybe to make it fit more suitably into a seperate and more complex framework.

I use triggeractivated task_A

Ugh, first of all I would not recommend using the modules since they are known to have issues on dedicated. Use a Task tracker instead, either FHQ or Shuko's

The way I would do it is to automatically fail both tasks when one fails.
Lightspeed, please say you are going to use the FHQ task tracker and not the buggy BIS tasks module...
I use the fhq task tracker to tick off tasks as objectives are completed.
But I'm slightly confused, i place triggers inside the editor and they have never failed to fire in any of my coop missions....never ever!
(06-01-2015, 12:35 PM)Lightspeed link Wrote: [ -> ]I use the fhq task tracker to tick off tasks as objectives are completed.
But I'm slightly confused, i place triggers inside the editor and they have never failed to fire in any of my coop missions....never ever!

Okay, you mentioned tasks so I was assuming you were talking about the task modules while you were referencing triggers.

Just add the relevant conditions to the Conditions field of the trigger then.

I'm trying to create an event handler script that ignores damage dealt when unit is hit and instead delivers the damage that i want like. If i decide on damage 0.1 it should take 10 hits regardless of damage to kill him, will this work?



Code:
p1 addEventHandler ["HandleDamage", {false}]; 
p1 addEventHandler ["Hit", {p1 setDamage (0.2 + Damage p1)}];
Quote:this addEventHandler ["HandleDamage",{damage (_this select 0)+((_this select 2)/8)}]

The '8' being the value that lowers received damage by dividing it.

https://community.bistudio.com/wiki/Arma...ndleDamage

Not sure what exactly you want, but read up on event handlers:
https://community.bistudio.com/wiki/Arma...ndlers#Hit
Quote:Does not fire when a unit is set to allowDamage false.

Quote:_object allowDamage false
has the same effect as
_object addEventHandler ["HandleDamage", {false}]
https://community.bistudio.com/wiki/allowDamage
Ill need some time to digest all the links  ;D
9. How does one rig a firing target to call a trigger like in the BI firing drill challenges.

Hi i have a question about headgear. Say i want to make a custom class loadout by calling from init and i want the headgear to be random out of a specific set of classnames. How is this done
Code:
_randomHeadgear = ["H_Bandanna_khk","H_Bandanna_cbr","H_Bandanna_sgg","H_Bandanna_gry","H_Bandanna_camo","H_Shemag_olive","H_ShemagOpen_khk","H_ShemagOpen_tan","H_Watchcap_blk","H_Watchcap_khk","H_Cap_oli","H_Booniehat_grn","H_Booniehat_tan"] call bis_fnc_selectRandom;
_this addHeadgear _randomHeadgear;
Also, this.
Thanks Outlawz.


Alwarrn i saw that on the changelog but it wasnt what i was looking for. I dont understand everything on that article too, no idea what is a string, bool or array.
(12-04-2015, 03:02 PM)Watchmen link Wrote: [ -> ]Thanks Outlawz.


Alwarrn i saw that on the changelog but it wasnt what i was looking for. I dont understand everything on that article too, no idea what is a string, bool or array.
What do you mean, it's not what you are looking for? It's exactly what you are looking for.
Pages: 1 2 3