Home   Help Search Login Register  

Author Topic: Who, and what is in the vehicles ?  (Read 530 times)

0 Members and 1 Guest are viewing this topic.

The_argyll

  • Guest
Who, and what is in the vehicles ?
« on: 31 Aug 2004, 05:29:47 »
I have 2 vehicles, and I want to give the commander of each, through a common script file, the ability to display a hint containing the magazine, weapon, and personel carried in a vehicle, how do I do this ? This is for multiplayer games, and I believe the hint shows to both parties (its only a 2 player script im working on atm).

Here is my AddAction I am using to call it.
CusActView = _Crew1 AddAction["View Inventories", "Inventories.sqs"];
CusActView = _Crew2 AddAction["View Inventories", "Inventories.sqs"];

_Crew1 is the first vehicle commander.
_Crew2 is the second vehicle commander.


Some code along similar lines for a vehicles own weapons and ammo state wouldnt go amiss either, and neither would some formatting advice for Hints, such as can I show more than one at once, if so, how do I do it, and position them ? And can I change the text colour of hints ?

Thanks.
« Last Edit: 31 Aug 2004, 05:31:30 by The_Argyll »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Who, and what is in the vehicles ?
« Reply #1 on: 31 Aug 2004, 09:12:57 »
You need a format command

hint format ["your text %1\n\nmore text %2", var1, var2]

Syntax not guaranteed.

I don't think you can amend hints:  if you want fancy text or multiple things you'll need titleRsc commands, though I'm exactly sure how/if you can combine that with format.   Get xenofanes font text tutorial anyway.
Plenty of reviewed ArmA missions for you to play

Offline ACF

  • Members
  • *
  • Llama?? Ain't that French for tanks?
Re:Who, and what is in the vehicles ?
« Reply #2 on: 31 Aug 2004, 13:48:17 »
Look at the -Chat commands as an easy alternative to using a (singular stressed) hint.  SideChat, VehicleChat, GroupChat or GlobalChat may be suited to what you're trying to do - they'll work with 'Format'ted strings.

The_argyll

  • Guest
Re:Who, and what is in the vehicles ?
« Reply #3 on: 31 Aug 2004, 16:25:07 »
I was more looking for hints on how to get and output the stuff in the vehicles to a hint frame(All done from Inventories.sqs). The format was more a secondary question. Not a very clear post on my behalf.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Who, and what is in the vehicles ?
« Reply #4 on: 31 Aug 2004, 18:20:00 »
In the script you need to extract the information from the game, then give each piece of info a name (a variable) and then spit those variables out using the hint and format commands.

Extracting the information will be easy in some cases.   For example, if you want to know somebody's primary weapon and put that into a hint you would have in your script

hint format ["primary weapon - %1\n\nsecondary weapon - %2", primaryWeapon loon1, secondaryWeapon loon1]

Is that what you mean?

Plenty of reviewed ArmA missions for you to play