Home   Help Search Login Register  

Author Topic: Check if player has added a weapon to a cargo  (Read 466 times)

0 Members and 1 Guest are viewing this topic.

Offline Calamity

  • Former Staff
  • ****
  • Calamity Strikes AGAIN!
    • DataCraft Enterprises
Check if player has added a weapon to a cargo
« on: 04 Apr 2004, 07:08:29 »
Does anyone know of a quick way I can determine if the player has added an M16, or other weapon, to the the cargo of a specific vehicle.

I found something in a search of the forums that I might be able to adapt, but it required a Function, and I'm just not ready to start on them yet.

A simple "Count number of M16's in cargo" compare to "count of M16's in cargo taken at beginning of mission", If greater, "set AddedWeapon variable = true."

Something like that. Although I might be able to craft something, It's late and I'm not thinking straight.

Thanks gusy

Calamity.

max_killer_payne

  • Guest
Re:Check if player has added a weapon to a cargo
« Reply #1 on: 04 Apr 2004, 09:57:04 »
Try the hasweapon command:

?man hasweapon "M16": goto "wateva"

#wateva
thing that you want to happen when it detects that he has a weapon


Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Check if player has added a weapon to a cargo
« Reply #2 on: 04 Apr 2004, 12:54:29 »
There is no simple way of finding out what's in an ammo crate, so if you've found any way of doing it at all that's fantastic:  I'd be very glad to know what it is.    Functions are not fundamentally harder than scripts.... although that is about all I know about them.
Plenty of reviewed ArmA missions for you to play

Offline Calamity

  • Former Staff
  • ****
  • Calamity Strikes AGAIN!
    • DataCraft Enterprises
Re:Check if player has added a weapon to a cargo
« Reply #3 on: 04 Apr 2004, 16:49:54 »
Yeah, Deathwish, Actually I'm using the Hasweapon command in a trigger to tell if the player has the M16 as he approaches a helicopter he is supposed to board. If he does, he is instructed to deposit the weapon in a waiting Ammo truck. Right now the player need only drop the weapon. Then the boarding chopper trigger will be satisfied. I need to know if the player put the weapon in the right place.

Any other Ideas guys would help a lot!

Calamity.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Check if player has added a weapon to a cargo
« Reply #4 on: 04 Apr 2004, 16:56:39 »
I'd fake it by using a trigger to ensure that the player has at least gone close to the ammo truck ... plus of course checking that he no longer has the weapon.    Therefore, in order to satisfy the boarding condition, the weapon will have to be either in the ammo truck or, if the player has disobeyed instructions, on the ground next to the truck which for gameplay purposes is close enough.
Plenty of reviewed ArmA missions for you to play

max_killer_payne

  • Guest
Re:Check if player has added a weapon to a cargo
« Reply #5 on: 04 Apr 2004, 18:13:16 »
I remember back in the old days Macguba always used to beat me to answering a post.

Looks like nowadays is no exception  ;D .

Offline Calamity

  • Former Staff
  • ****
  • Calamity Strikes AGAIN!
    • DataCraft Enterprises
Re:Check if player has added a weapon to a cargo
« Reply #6 on: 05 Apr 2004, 05:15:00 »
For game play and expediency, I think I'll use Macgubas suggestion. It'll have to do.
Another imperfect solution to an imperfect world…

Yeah, Macguba really is on top of things. I've only once posted before he did. And that was on a Beta review. I had to stay up late to finish, because I knew if I waited until the morning, that he'd already be there. Really great guy though. I once talked to him off line and he helped me out with some non-editing system configuration questions I had. Really took the time with me.

Anyway, thanks again guys,
Calamity out…

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Check if player has added a weapon to a cargo
« Reply #7 on: 05 Apr 2004, 11:31:43 »
 :-[
Plenty of reviewed ArmA missions for you to play