Home   Help Search Login Register  

Author Topic: Is unit reloading?  (Read 445 times)

0 Members and 1 Guest are viewing this topic.

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Is unit reloading?
« on: 25 Oct 2004, 03:51:50 »
I have a static MG that i want to check for when it reloads a magazine... mainly for scripting purpouses but im not sure what path to go down to get this one working...  ???
Proud Member of the Volunteer Commando Battalion

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Is unit reloading?
« Reply #1 on: 25 Oct 2004, 06:56:51 »
Heya Messy...

I take it you're looking to dymanically add magazines to it or something?

I'd use something like:

MG ammo "Browning" == 0

Just check that ammo name, I'm not entirely sure I've got that right...

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:Is unit reloading?
« Reply #2 on: 25 Oct 2004, 11:48:38 »
not exactly buddy - its to be added to a script in the addon  ;) but needs to know each time the thing reloads, be it by counting how many magazines it starts with and then checking each time it loses one... but i forsee this may not work if the unit reloads from an ammo truck...

i was thinking along the lines of counting each time it had fired 200 times (ammo belt length) using the eventhandlerfired and then fire off the stuff i want to happen, and then reset the counter... thing is, there could be several of these buggers on the map, so would have to be able to deal with counting only for the weapon in question

oh, and the thing automatically reloads being static and all  ;)
Proud Member of the Volunteer Commando Battalion

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Is unit reloading?
« Reply #3 on: 26 Oct 2004, 09:14:37 »
Ahh ok... sorry I thought you meant the stock standard BIS M2.

Hmm... tricky one.
I think either way you're going to need a variable to count something, be it magazines or bullets :P
The variable will have to be local, so either way you're going to end up needing to run one script per unit too 'keep' the variable for that particular unit.

I'm not sure if the fired eventhandler would work... dunno if it counts single bullets on full auto firing mode properly (I may well be wrong about that btw ;) ).

I'd still lean towards counting the ammo, and detecting when the ammo > counter variable.
I'm not sure how you'd put that into a script bundled with the addon though.

I could write that script for a mission easily, but that's not really any help to ya ;D

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:Is unit reloading?
« Reply #4 on: 26 Oct 2004, 14:18:32 »
well... i know that eventhandlerfired counts each single round (due to another nifty script i have) so thats not too much of an issue... its just like you said, counting the rounds, and having a seperate local variable for each MG  :-\
Proud Member of the Volunteer Commando Battalion