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.

DarkBASIC Discussion / Object collision hell! please help

Author
Message
Compton
21
Years of Service
User Offline
Joined: 4th Dec 2002
Location:
Posted: 12th Dec 2002 13:57
I have this to make some buildings:

for gebouw = 30 to 35
enemyx=200+rnd(4800)
enemyz=200+rnd(4800)
make object box gebouw,100,400,100
penis=get ground height(1,enemyx,enemyz)
position object gebouw,enemyx,penis,enemyz
texture object gebouw,2
next gebouw

for gebouw = 30 to 35
if object collision(1,gebouw)>0
rem enemyx=200+rnd(4800)
rem enemyz=200+rnd(4800)
rem penis=get ground height(1,enemyx,enemyz)
rem position object 9,enemyx,penis,enemyz
CAR1_car_position_wc_x# = oldx#
CAR1_car_position_wc_y# = oldy#
rem gosub stopall
else
oldx# = CAR1_car_position_wc_x#
oldy# = CAR1_car_position_wc_y#
endif
next gebouw

funny thing is, even if I make the buildings without the for and if commands, so just seperate (which is lame if you ask me) it will only collide with object 30!!!! what am I doing wrong here?

Please help!

(and please dont mind the names for ground height and such! I have a dirty mind, sorry!)
Compton
21
Years of Service
User Offline
Joined: 4th Dec 2002
Location:
Posted: 12th Dec 2002 21:25
Stupid me, it should have been =1 not >0 thanx anyhow....
Wolfman
21
Years of Service
User Offline
Joined: 11th Dec 2002
Location:
Posted: 13th Dec 2002 17:45
Im glad you found the answer...But I just got to ask.
What kind of game are you making that has a car and a penis...lol

Compton
21
Years of Service
User Offline
Joined: 4th Dec 2002
Location:
Posted: 14th Dec 2002 00:33
lol I'm not that kind of girl!!!! I swear! hahahaha

Login to post a reply

Server time is: 2024-04-14 06:09:43
Your offset time is: 2024-04-14 06:09:43