1
$\begingroup$

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)?

$\endgroup$
6
  • $\begingroup$ Adding an answer $\endgroup$ Apr 14, 2015 at 22:53
  • $\begingroup$ I just found out, but I'll accept it. Also, can you read and reply to my comment about the question relating with my animation not responding quick enough? $\endgroup$
    – blackhole
    Apr 14, 2015 at 22:56
  • $\begingroup$ Will look at it soon $\endgroup$ Apr 14, 2015 at 23:00
  • $\begingroup$ I used all my daily votes today, So I can't UV you until the day restarts. $\endgroup$ Apr 14, 2015 at 23:14
  • $\begingroup$ @X-27 whats UV? Sounds like unvote. I am rather confused. $\endgroup$
    – blackhole
    Apr 14, 2015 at 23:16

1 Answer 1

3
$\begingroup$

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

$\endgroup$
1
  • $\begingroup$ 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! $\endgroup$
    – blackhole
    Apr 14, 2015 at 23:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .