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 / BIG PROBLEM! HELP! S.O.S! HELP ME! :'(

Author
Message
TGWDNGHN
21
Years of Service
User Offline
Joined: 2nd Oct 2002
Location:
Posted: 23rd Nov 2002 21:35
I was working on my second game ever...an adventure game somewhat like Zelda 64, after my A.I technique proved positive i came across a problem so odd...that it makes no sense...in the following code AIT is AI type (don't worry about it...) this is the first section of the code...I do a for loop to see if object AIP (in this case pbject 1) is colliding with he bullets (objects 101-110). The object only dies when it collides with bullet 101... Memblock Byte(1,AIP) (AIP=1) is whenther the object is dead or not (1= if alive, 0 if dead)...The memblock byte 1,2 thingy is to tell me which bullet killed it... the odd part is that I remved all of this code and made a test programm to see whether the is colliding (or hitting) an object in the first place and it responds to all those pbjects...but not in this for-loop...perhaps something I did?

Here is the code without the [ c o d e ] thingy...it sometimes messes it up
AI:
If AIT=1
For z=101 to 110
If Object Collision(AIP,z)=1 And memblock byte(1,AIP)=1
Write Memblock Byte 1,AIP,0
Write Memblock Byte 1,2,z
Set Object Speed AIP,50
Play Object AIP,400,440
endif
If Object Hit(AIP,z)=1 And memblock byte(1,AIP)=1
Write Memblock Byte 1,AIP,0
Write Memblock Byte 1,2,z
Set Object Speed AIP,50
Play Object AIP,400,440
endif
next z

PLEASE HELP? any Qs that might lead you to solving it?
If life gives you a lemon, shove it up a water gun and squirt it into someone's eyes!

Login to post a reply

Server time is: 2024-03-28 11:40:53
Your offset time is: 2024-03-28 11:40:53