1

I have two properties, for time's sake, I'll call them x and y. I want to know what x - y is in another property, lets say z. Is there a way where I can have a property always displaying two properties subtracted from each other? I need this as, in my FPS, when a player reloads, but still has lets say 4 bullets out of 30, I need 4 to be subtracted from 30, so when you reload you get 26. How can I do this (logic bricks are fine if possible)?

blackhole
  • 2,390
  • 4
  • 26
  • 64

1 Answers1

3

It actually is possible to subtract a value of one property from another. by using this logic setup on your gun, it will subtract from total ammo the amount of ammo needed to fill the current clip. In this case the clip can hold 30

enter image description here

You can see the result here if you enable the debug properties. Press space to use ammo in clip, press R to reload the ammo in clip.

enter image description here

  • Thanks. Appreciate all the answers you and @Vince Scalia have been giving me. I made so much progress that I could not have made myself in this time. I don't know if you are ready for such a question coming up, I already asked it, but whoever wrote the answer took the bounty money and never replied again. Anyways, thanks! – blackhole Apr 14 '15 at 23:16