Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / loop not working?

Author
Message
Wikaman1
16
Years of Service
User Offline
Joined: 17th Aug 2008
Location: Scotland
Posted: 13th Dec 2009 18:32 Edited at: 13th Dec 2009 18:33
I want to position a health bar above each enemy using a for loop ...however when I run this I only see one health bar above one enemy..

not in loop:


in loop:

Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 13th Dec 2009 18:47
you are positioning the whole 5 bars over one object everytime in the first for loop, so only the last once will take all the bars, if you want each one to take one bar make it like:


NOTE: i ( eg. 11 ) + 20 = 31, so the healthbar with ID 31 is positioned over the object i ( 11 ).

i hope that helped.

Wikaman1
16
Years of Service
User Offline
Joined: 17th Aug 2008
Location: Scotland
Posted: 13th Dec 2009 19:15
thank you for the quick reply, that worked perfectly

Login to post a reply

Server time is: 2024-10-01 20:17:03
Your offset time is: 2024-10-01 20:17:03