The Daily Click ::. Forums ::. Klik Coding Help ::. Setting counters to quotients
 

Post Reply  Post Oekaki 
 

Posted By Message

Coop



Registered
  15/08/2004
Points
  347
30th August, 2004 at 21:34:10 -

When i put this command in it doesnt work. Start of Frame: Set counter to Global Value A/Global Value B*100??
It does nothing, the counter is still at 0 when i get to the screen.
I'm making a shooting game and at the end of the level it sets the number of kills to Global Value A and the number of shots fired to Global Value B. I am trying to make an accuracy percentage. I have two other counters that display the number of kills and the number of shots fired and they work fine.
Is there any reason why its not letting me divide global values?

 
...

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
31st August, 2004 at 02:16:12 -

Check that the counter has a maximum value of over 0, to start with. Then make sure neither global value is 0 to begin with. Make two more counters and set each of them to global A and B respectively, to make sure they are being assigned properly in the previous frame.

 
n/a

Tigerworks

Klik Legend

Registered
  15/01/2002
Points
  3882
31st August, 2004 at 07:42:27 -

Try (Global Value A * 100) / Global Value B
If you're using TGF or something then you can't have decimals. The above method doesn't use decimals to work out the percentage.

 
- Tigerworks

Coop



Registered
  15/08/2004
Points
  347
31st August, 2004 at 18:12:09 -

Thanks

 
...
   

Post Reply



 



Advertisement

Worth A Click