Jump to content
RabidStoat

Creating a Worldspace for Units

Recommended Posts

** disclaimer - I have only a very basic level of competence at mission scripting - almost all my knowledge is unit config based and entry-level at that ** 

 

Hi guys,

 

With the announcement of Arma III Units by BIS a group of friends and I were finally motivated to actually form a proper clan. It's all very informal and low level at the moment due to numbers but we have big plans.

As a useful aid to joining players I have been asked to make up a small mission in the VR world; it is to show the basic uniform/loadout that will be used as standard for the clan and include individual instances of each member showing off their chosen kit. The idea being that members can familiarise themselves with everyone's appearence and each member will have somewhere to refer back to if they need to reconstruct their loadout for any reason.

 

My initial efforts are here: http://1drv.ms/1Z8D4fH

 

As you can see I have the basics set up (I think) however I am struggling to complete it at my current level of competence. If anyone could provide me with hints as to how to do the following it would be appreciated:-

 

1) Make the Basic unit stand with weapon permenantly lowered (yeah I know, I suck - I really can't work something that simple..)

 

2) I need each Member (identified by [MTS]xxx in their text field) to either have their tag show when a players crosshairs pass over them or have their name displayed as a hint for the same.

 

3) I need to have an addAction available to copy a Member's inventory - either to clipboard or directly onto the player (I assume BIS_fnc_getInventory is the way to go but am struggling to work out how to use it)

 

For the sake of not cluttering things up I haven't included any desc.ext etc. If these need creating to do the job thats fine.

I hope people don't think I'm asking people to do all the work for me here - I'm looking to learn from any help that anyone provides.

 

Many thanks to anyone who contributes

Share this post


Link to post
Share on other sites

2) I need each Member (identified by [MTS]xxx in their text field) to either have their tag show when a players crosshairs pass over them or have their name displayed as a hint for the same.

 

 

https://community.bistudio.com/wiki/drawIcon3DThis could work well and also look more elegant than a simply hint.

 

 

3) I need to have an addAction available to copy a Member's inventory - either to clipboard or directly onto the player (I assume BIS_fnc_getInventory is the way to go but am struggling to work out how to use it)

 

 

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

 

This function makes the loadout available in Arsenal, one would only need to rename it afterwards.

 

 

1) Make the Basic unit stand with weapon permenantly lowered (yeah I know, I suck - I really can't work something that simple..)

 

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

_unit disableAI "ANIM"; 

or

_unit enableSimulation false; 

should work

Share this post


Link to post
Share on other sites

 

This is excellent and would be ideal - however I'm unsure how to get it to display the targeted units identity. What code would I need to substitute for $name in the following to make it work as proposed?

 

 

addMissionEventHandler [""Draw3D"", {   drawIcon3D ["""", [1,1,1,1], position cursorTarget, 0, 0, 0, ""$name"", 1, 0.05, ""Tahoma""];  }];

Share this post


Link to post
Share on other sites
addMissionEventHandler [""Draw3D"", {   drawIcon3D ["""", [1,1,1,1], position cursorTarget, 0, 0, 0, ["%1",name _unit], 1, 0.05, ""Tahoma""];  }];

That should work

Share this post


Link to post
Share on other sites
... ["%1",name _unit],....

 This section caises A3 to crash  :unsure:

Share this post


Link to post
Share on other sites
addMissionEventHandler ["Draw3D", {   drawIcon3D ["", [1,0,0,1], player modelToWorld [0,0,2] , 0, 0, 0,format["%1",name player], 1, 0.05, "PuristaMedium"];  }];

Keep in mind that _unit has to be replaced with a global variable.

 

 

201512200000ie47v0lscq.jpg

Share this post


Link to post
Share on other sites

Ah! Thanks R3vo, trying to work this stuff on no sleep has me missing steps!

Share this post


Link to post
Share on other sites
 

Phew! Working at last. Having to run it per unit makes a wonderful mess of init-lines but heyho.

 

Next step I'm working on is the saving/loading of targets inventories. Is it possible to use cursorTarget to call BIS_fnc_saveInventory?

Share this post


Link to post
Share on other sites

Phew! Working at last. Having to run it per unit makes a wonderful mess of init-lines but heyho.

 

The initPlayerLocal.sqf can probably shorten things a bit.

 

Next step I'm working on is the saving/loading of targets inventories. Is it possible to use cursorTarget to call BIS_fnc_saveInventory?

 

 

Could work, just try it out.

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

×