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 / Help with third person laser/bullet shooting? (I want my bullets to be visible too.)

Author
Message
Person99
18
Years of Service
User Offline
Joined: 15th Dec 2005
Location: Good question
Posted: 29th Apr 2007 08:19 Edited at: 29th Apr 2007 08:20
Well, I have a script testing various things, like gravity, collision, movement, etc.

All has gone well, until I decided to try to make a bullet.

Well, I tried to do a laser script. I get an error saying something like "Error: Object does not exist at line #".(Forgot line number)

Here is my game script (Don't worry, it is short) (I added a bunch of comments, so it doesn't confuse newbies):


I don't care if you rip any collision scripts or anything off of it. You have to take the laser code off for the game to work right.

This is my laser code (It is hard to miss, it is encased by two comments.


I want the lasers to be objects, so they are visible, and is then easier to add physical forces to.

Can anyone help me get this working?

The Person99 awards go to: 1. Jack the Ripper for hardest crime scenes. 2. Peter Petrelli for most powers. 3. Superman for longest flight. 4. "The Doctor" for best time travel machine.
Veron
17
Years of Service
User Offline
Joined: 22nd Nov 2006
Location:
Posted: 29th Apr 2007 10:06
The problem is actually "Object Already Exists at line 48." You're creating the sphere for the laser in a DO-LOOP, so it already exists, but it keeps trying to create it. The working code is below, I edited line 47 to get it working.




TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 29th Apr 2007 10:09 Edited at: 29th Apr 2007 10:11
[Edit] Ignore this - Veron posted while I was typing this and answered it.

I'm assuming that as you know both the error line number and the actual error message, the message doesn't relate to the line number indicated.

DB isn't all that accurate with error line numbers due to them not being detected until the screen updates with the Sync - by which time the program counter has moved on a little.

Try running it with Sync Off instead of Sync On and the error number it returns should be a bit more accurate. Switch it back on later when you've located and fixed the problem.

TDK_Man

Person99
18
Years of Service
User Offline
Joined: 15th Dec 2005
Location: Good question
Posted: 29th Apr 2007 21:15
Well, Vernon's edit doesn't give the error, but my script doesn't actually make it move at all, and it just sits at 0, 0, 0.
But he only edited line 47.

I don't know the limb commands very well either, argh.

The Person99 awards go to: 1. Jack the Ripper for hardest crime scenes. 2. Peter Petrelli for most powers. 3. Superman for longest flight. 4. "The Doctor" for best time travel machine.

Login to post a reply

Server time is: 2024-09-25 21:19:23
Your offset time is: 2024-09-25 21:19:23