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.

Newcomers DBPro Corner / not everything displaying

Author
Message
Robot
20
Years of Service
User Offline
Joined: 27th May 2004
Location:
Posted: 29th Apr 2005 02:32
When I run this code I only get one monster (M) on the screen but I was expecting 10. I have looked through it line by line and ripped it apart but I cannot seem to find the problem. If anyone can help then thank you.

I am using DBC

The happenings of tommorow are behind us now
walkman99
19
Years of Service
User Offline
Joined: 15th Mar 2005
Location:
Posted: 29th Apr 2005 05:14
Randomize Timer() should not be in the for loop

Change this


to this
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 29th Apr 2005 08:35
Move the Randomize timer() line up just before the FOR line. Your problem is all the M's are starting in same place! You are resetting randomize seed for each enemy, so the generated x and y values would be identical.

Boo!
Robot
20
Years of Service
User Offline
Joined: 27th May 2004
Location:
Posted: 29th Apr 2005 15:17
Yay thank you it worked.

The happenings of tommorow are behind us now

Login to post a reply

Server time is: 2024-09-23 19:36:31
Your offset time is: 2024-09-23 19:36:31