Home   Help Search Login Register  

Author Topic: ammo and gun selection from "dude"  (Read 1187 times)

0 Members and 1 Guest are viewing this topic.

Offline Supergrunt

  • Members
  • *
ammo and gun selection from "dude"
« on: 29 Nov 2007, 19:04:44 »
in my mission the player char (jc) needs to walk up to a guy (r2) and by using a custom action (buy=jc addaction ["get gear","scriptname.sqs"] )
he gets a gear menu just like the weapons crate

any way i can get this to work ?

( putting a ammobox underneath R2 is not an option.....)

the meaning is that JC walks to a guy and can select his gear from this dude (for free) (like a real armory where you get weapons etc. from a employee)

thanks already for any brain damage i inflict on you scripters :P

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: ammo and gun selection from "dude"
« Reply #1 on: 29 Nov 2007, 19:10:08 »
You will need to create a dialog with a listbox showing the different weapons available, add the seller an action with a script to open your selling dialog. Be adviced, this is a lot of work so better try to find an existing resource doing something similar.

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: ammo and gun selection from "dude"
« Reply #2 on: 29 Nov 2007, 19:40:18 »
There are a lot more issues than you think involved in directly transferring equipment to the player, which is why people so often use the ammo box method. You need to be reasonably skilled in creating dialogs and, most importantly, to be able to have a good understanding of ArmA config just to be able to work out whether someone can carry something!

Although I never considered it when I designed it, you could use the shop interface from my SPON Money with all items configured to cost $0. I'm still not at all sure why you can't just have a big ammo box if everything is free, but I'm sure you have your reasons; I certainly can't see that effectively re-creating the inventory menu would be worth the effort, even if you reused the BIS dialog with your own code manipulating it, since this is quite a complex thing to do when there already perfectly good ammo boxes in the game.
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Supergrunt

  • Members
  • *
Re: ammo and gun selection from "dude"
« Reply #3 on: 29 Nov 2007, 20:11:10 »
well i do have my reason for not wanting a big ammo box   (interaction with rebel forces..)  i tried looking at your spon money scripts but i (being a scripting idot)  didn't figure out how to implent it to my mission (yet...) and how to change the money values... i does however contain the exact thing i need so i will start looking at it again (and again and again) to see if i can figure it out....

thanks anyway guys

« Last Edit: 29 Nov 2007, 20:31:54 by h- »

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: ammo and gun selection from "dude"
« Reply #4 on: 29 Nov 2007, 20:48:04 »
The money values can be altered by just using 0 for all the prices in the examplePrices.sqf. The readme that comes with it has some errors/omissions that may be confusing you, so read the discussion in the thread where I try to explain it to someone else who was having problems. If you still can't get it working, post your problems in that thread and I'll see what I can do to resolve them for you. Good luck!
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)