Jump to content
Sign in to follow this  
monty67t

ammo crates with an RTS type menu

Recommended Posts

What's up everybody? I have a question about ammo crates and/or an armory. Is it possible to have a building or ammo crate that pops up a menu like in RTS so you can see what weapon you are choosing? For example, you are in your base and you have an armory, when you walk up to the building a menu pops up showing you the weapons you can choose from. You simply click on what you want and abracadabra, it's there for you. Any help is greatly appreciated.

EXAMPLE PIC, BUT WITH WEAPONS AND NO PRICE OF COURSE

RTS35.jpg

Thanks,

Monty

Share this post


Link to post
Share on other sites

AFAIK there is no reliable way to count the amount of weapons and/or ammo in a crate. I don't think it's possible to create a dialog with that data.

Edit: You could do it another way though. First, make a crate and clear its weapon and magazine cargos. Then, use some global variables to define how much stuff is in the crate ( monty_crate1_ak74 = 6 , for instance). Then you would create a small, repeating trigger over the crate. The trigger should activate a dialog script when the player is close to the crate, and it should deactivate it when the player is away. The dialog script would simply create a Listbox or Combobox which listed weapons and magazines. You'd select the desired weapons and magazines, then you'd hit an OK button, which would close the dialog and set your weapons to the new settings. As an icing on the cake, you could create a weaponhandler at your feet to make it look like you dropped your previous weapon. Because you'd be using global variables to define weapon/ammo quantities, you can check when the crate is "empty".

Share this post


Link to post
Share on other sites

Way over my head bro. I know how to fill ammo crates, that's about it. For example this is my old script for filling ammo crates with BAS weapons.

Quote[/b] ]_ammo = _this select 0

_ammo AddWeaponCargo ["BAS_M4ACOG", 5]

_ammo AddWeaponCargo ["BAS_M4MKACOG", 5]

_ammo AddWeaponCargo ["BAS_M4MKReflex", 5]

_ammo AddWeaponCargo ["BAS_M4REFLEX", 5]

_ammo AddWeaponCargo ["BAS_M4REFLEXM203", 5]

_ammo AddWeaponCargo ["BAS_M4ACOGS", 5]

_ammo AddWeaponCargo ["BAS_M4REFLEXS", 5]

_ammo AddWeaponCargo ["BAS_M4REFLEXSM203", 5]

_ammo AddWeaponCargo ["BAS_M14AIMPOINT", 5]

_ammo AddWeaponCargo ["BAS_M24SWS", 5]

_ammo AddWeaponCargo ["BAS_MP5SDAIMPOINT", 5]

_ammo AddWeaponCargo ["BAS_M249", 5]

_ammo AddWeaponCargo ["BAS_M249SPW", 5]

_ammo AddWeaponCargo ["BAS_M240B", 5]

_ammo AddWeaponCargo ["BAS_Beretta", 5]

_ammo AddWeaponCargo ["BAS_AT4Launcher", 5]

_ammo AddWeaponCargo ["BAS_Satcom", 5]

_ammo AddWeaponCargo ["BAS_Soflam", 5]

_ammo AddWeaponCargo ["BAS_M4desACOG", 5]

_ammo AddWeaponCargo ["BAS_M4desMKACOG", 5]

_ammo AddWeaponCargo ["BAS_M4desMKReflex", 5]

_ammo AddWeaponCargo ["BAS_M4desREFLEX", 5]

_ammo AddWeaponCargo ["BAS_M4desREFLEXM203", 5]

_ammo AddWeaponCargo ["BAS_M4desACOGS", 5]

_ammo AddWeaponCargo ["BAS_M4desREFLEXS", 5]

_ammo AddWeaponCargo ["BAS_M4desREFLEXSM203", 5]

_ammo AddMagazineCargo ["BAS_M4Mag", 25]

_ammo AddMagazineCargo ["BAS_M4SMag", 25]

_ammo AddMagazineCargo ["BAS_MKShell", 25]

_ammo AddMagazineCargo ["BAS_M14Mag", 25]

_ammo AddMagazineCargo ["BAS_M24Mag", 25]

_ammo AddMagazineCargo ["BAS_MP5SDMag", 25]

_ammo AddMagazineCargo ["BAS_M249mag", 15]

_ammo AddMagazineCargo ["BAS_M240Mag", 25]

_ammo AddMagazineCargo ["BAS_M433grenade", 15]

_ammo AddMagazineCargo ["BAS_BerettaMag", 15]

_ammo AddMagazineCargo ["BAS_AT4Rocket", 15]

_ammo AddMagazineCargo ["BAS_Soflam", 10]

Then in the init I just put [this] exec "BAScrate.sqs" However, the other stuff you are talking about I am not familiar with. I appreciate the info though.

Thanks,

Monty

Share this post


Link to post
Share on other sites

Well, if this isn't for a Mission-Making Contest entry, then I could send you a working example smile_o.gif . If it is an entry, then if I sent you a template it would probably be counted as a team effort (And then I wouldn't be able to submit my mission crazy_o.gif ).

Share this post


Link to post
Share on other sites

I am not entering in the mission editing competition. You can save this as proof tounge_o.gif . Please send away.

Thanks,

Monty

Share this post


Link to post
Share on other sites

OK, I'll make it tomorrow and send it over.

Share this post


Link to post
Share on other sites

Just a question monty, have you ever played rts? the ammo crates have a nice and easy dialogue which could be just what your looking for...

edit: heres a pic, theres preset loadouts already made, or you can make your own

PIC1.jpg

PIC2.jpg

Share this post


Link to post
Share on other sites
Quote[/b] ]Just a question monty, have you ever played rts?

tounge_o.gif Um, did you read the title of this thread? OF COURSE I'VE PLAYED RTS! tounge_o.gif

Yeah, I am wanting to do the same thing but without the cost. Thanks bro!

Monty

Share this post


Link to post
Share on other sites

Without the cost? there IS no cost.

You select your weapons and go. Simple.

Share this post


Link to post
Share on other sites

Thanks for pointing that out Zig, you sure are smart.

Share this post


Link to post
Share on other sites

What the hell?

You said:

Quote[/b] ]Yeah, I am wanting to do the same thing but without the cost. Thanks bro!

But there IS no cost! I don't see what you mean by that.

Share this post


Link to post
Share on other sites

Nothing personnal was meant by it Zig. You can relax.

Monty

Share this post


Link to post
Share on other sites

Yo! M21man, were you able to put it together?

Monty

Share this post


Link to post
Share on other sites

Hello, M21man . . . Hello . . . Come in? What happened Mr. I'll have it for you tomorrow? tounge_o.gif

Monty

Share this post


Link to post
Share on other sites

Give me your e-mail address and I'll send it right over.

Concept404 was hacked and is temporarily down, so I can't just upload it to my folder and give you a link sad_o.gif .

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
Sign in to follow this  

×