Home   Help Search Login Register  

Author Topic: get weapons from cars trunk  (Read 2220 times)

0 Members and 2 Guests are viewing this topic.

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
get weapons from cars trunk
« on: 16 Sep 2007, 19:17:05 »
Is there anyway to check what weapons are in a cars trunk ? so i can have the player steal weapons for a resistance movement and theyll get what he gave them ?

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: get weapons from cars trunk
« Reply #1 on: 16 Sep 2007, 19:35:01 »
You might clear the weaponCargo of the truck, and then add what you wish there, so you'll know pretty well which weapons are stored in the truck, same for ammo.

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re: get weapons from cars trunk
« Reply #2 on: 16 Sep 2007, 19:52:30 »
no... i want da player 2 get 2 some base and fill da truck w/ what he wants... den check what he got...

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: get weapons from cars trunk
« Reply #3 on: 16 Sep 2007, 20:26:41 »
I'd like to know this as well!  :D

(not helpful, I know, but just letting you know).

I've  tried weapons/magazines, they don't return anything. I was thinking about using the weaponPool (since you can query the weapon pool, and also add/remove from it using objects), but I don't think the weaponPool is accessible at all outside of campaigns (is it?).

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re: get weapons from cars trunk
« Reply #4 on: 16 Sep 2007, 20:37:00 »
doesnt seem 2 b.... :P

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: get weapons from cars trunk
« Reply #5 on: 16 Sep 2007, 20:37:17 »
So the player picks up a weapon and places it on the truck, right?

First all of clearweaponscargo and magazinecargo of the truck.
and then you may do the following in a loop:
get player weapons array, get player magazines array.
compare these values with previous ones, if any decreases or increases check if player is quite close to truck. if increases, you may consider the player took the new weapon of magazine from the truck, if decreases, just the opposite.

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re: get weapons from cars trunk
« Reply #6 on: 16 Sep 2007, 20:42:04 »
ugly... but doable

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: get weapons from cars trunk
« Reply #7 on: 16 Sep 2007, 21:57:33 »
So there is no known way of finding out by default what weapons are in a crate and such?  :( I was actually wanting this for another little (ugly) script I'm doing which is basically just a "hire soldier/buy vehicle/weapon" type of dialog, and in the workings of this particular (ugly) little script (or actually collection of scripts) it'd be swell if there were some way of finding out the weapon/magazine cargo of a "weaponholder" object.

But ah. I can figure it out.  :D

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: get weapons from cars trunk
« Reply #8 on: 17 Sep 2007, 20:13:27 »
this was one of the requests made of BIS way back in the early beta stages if ArmA (by yours truly), and to date it hasn't been implemented.

seems like a pretty elementary thing to know: what's in the crate/cargo space. evidentally not quite important enough though... maybe in the next patch, we can but hope  :confused:

Offline sharkattack

  • Former Staff
  • ****
Re: get weapons from cars trunk
« Reply #9 on: 17 Sep 2007, 20:51:35 »
Quote
no... i want da player 2 get 2 some base and fill da truck w/ what he wants... den check what he got...

i might have and probably do have  the wrong end of stick ... but if you approach truck after loading it and wait for gear action to appear ... if you activate it or press G  the weapons  stored in the truck  will be displayed ...  to load the truck do the same ... approach it ... wait for gear action then drop weapon and it becomes part of trucks cargo
 :-[
sorry to post a bone answer ... probably miles away
but  not sure exactly when and how you want see which weapons you stored on truck
« Last Edit: 17 Sep 2007, 21:00:21 by shark attack »
"HOLY SARDINE" - see Shark-Attack meet his match

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re: get weapons from cars trunk
« Reply #10 on: 17 Sep 2007, 22:58:31 »
nah... i wanna check what weapons have been put in da truck nd den give em2 oder group....

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: get weapons from cars trunk
« Reply #11 on: 17 Sep 2007, 23:04:47 »
The use a custom menu action instead of the default one
ad the custom menu action to the truck: put there current weapons and ammo. The player aproaches the truck, activates the action and loses all his current weapons and ammo, and you store them in a custom array.

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re: get weapons from cars trunk
« Reply #12 on: 17 Sep 2007, 23:05:56 »
great workaround  :good: dats what ill do... if dere was only a way 2 forbid da player from usin da default action...

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: get weapons from cars trunk
« Reply #13 on: 17 Sep 2007, 23:10:53 »
Didnt test, but perhaps, if you set the ammoCargo to 1 the player will not be able to add new cargo to the truck using the default menu action.