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.

Author
Message
Metamophic
22
Years of Service
User Offline
Joined: 23rd Aug 2003
Location:
Posted: 9th Sep 2003 04:21
i type this in the dbpro alienware demo:

make object cube 1,20,20,20

do

if spacekey=1 then delete object 1

loop


it tells me "object does not exist".
whats the deal?

www.freewebs.com/metamorphicsoft
Metamophic
22
Years of Service
User Offline
Joined: 23rd Aug 2003
Location:
Posted: 9th Sep 2003 04:22
when i press the space key

www.freewebs.com/metamorphicsoft
spooky
23
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 9th Sep 2003 04:32
The deal is that it deletes object, but space key is detected in more than one pass of loop. Simply check object still exists when you press key. Please note proper syntax of make object cube and spacekey()

make object cube 1,20
do
if spacekey()=1 and object exist(1) then delete object 1
loop

If your mansion house needs haunting, just call Rentaghost!
Metamophic
22
Years of Service
User Offline
Joined: 23rd Aug 2003
Location:
Posted: 9th Sep 2003 04:42
thanks. yes, i forgot the () but darkbasicpro requires width, height, and depth for make object cube.

www.freewebs.com/metamorphicsoft
Ian T
23
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 9th Sep 2003 04:55
He was prolly thinking of the Box command .

You might also want to add Sync On at the beginning and Sync in your loop... elsewhise your program will stutter, flicker, and run slower...

--Mouse: Famous (Avatarless) Fighting Furball
Read It: http://www.angryflower.com/itsits.gif
Learn It: http://www.angryflower.com/bobsqu.gif
Metamophic
22
Years of Service
User Offline
Joined: 23rd Aug 2003
Location:
Posted: 9th Sep 2003 05:41
this is at the end of my game's loop:

if object hit(2,3) and object exist(3) then delete object 3


2 is the bullet, 3 is the tank. global collision is on. it tells me "object does not exist"

www.freewebs.com/metamorphicsoft
Metamophic
22
Years of Service
User Offline
Joined: 23rd Aug 2003
Location:
Posted: 9th Sep 2003 05:44
"if object hit(2,3)=1" doesnt help

www.freewebs.com/metamorphicsoft
Metamophic
22
Years of Service
User Offline
Joined: 23rd Aug 2003
Location:
Posted: 10th Sep 2003 01:47
okay heres my entire source.
it shuts down as soon as it compile and it tells me,"runtime error 7008: object does not exist at line 21" the same code works perfectly in DBC

www.freewebs.com/metamorphicsoft
spooky
23
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 10th Sep 2003 03:12
Change to:



Your biggest problem was the odd '=' sign you had in collision expression.

Also, do not test for collision between two objects if one of the objects may not exist. Unfortunately DBPro tests both sides of AND condition even of first condition is false, otherwise you could have just said:



Also make sure bullet moves in steps less than size of tank otherwise it will pass right through it without coliding!

If your mansion house needs haunting, just call Rentaghost!
Metamophic
22
Years of Service
User Offline
Joined: 23rd Aug 2003
Location:
Posted: 10th Sep 2003 04:14
thanx!!

www.freewebs.com/metamorphicsoft

Login to post a reply

Server time is: 2026-07-25 08:11:59
Your offset time is: 2026-07-25 08:11:59