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 / My really rubbish code

Author
Message
Los
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Location:
Posted: 29th Mar 2005 02:13
Hi, this code uses media, attached at the bottom .
What I'm trying to do is get somebody to teach me what I'm doing wrong. The problem arose when I added in the tree DIM, and I was making objects that was not matching the array numbers. Array runs from 1 to 9, and the object tree numbers are from 12 to 19. Then I added in the fire objects 21 to 23. I'm getting lost linking these numbers together, and if I need to add in more I will get even more lost. I hate getting lost in my code.
What this project started off with is me getting the water hose working, its great but its not versitile. It's like too much to handle. I'm wondering what I'm doing wrong. The next stage was to get a random tree to set on fire, then further to get a monster to run around wild setting fire to trees. I've lost all control and it would be a muddle of figures to control. I want ease of use, I want short code! heh. It's not like I can use one array to handle my trees either, like

tree( tree number 1-9, object number for tree, 12 - 18, tree positions X,Y.. then a fire ON OFF control)

I will keep this code, but I think it will need alot of refining and function use. I would like to set a tree on fire easily.. inside the program as well, bring up a console and type 9 and it will set fire to tree 5, object 16, get those positions of the object and set a random fire affect to appear around that tree. I'm thinking you may say use functions for every little bit... but then I get lost in every function dude, lists of functions... maybe I need good names for functions (I'm rubbish at that too). I'm getting lost, and all I can think of doing is asking somebody who knows alittle bit of coding to show me a way. Thanks for the time you read, and I hope some people run the code, but what for, this isn't Doom or anything, is it?

p.s. I'm also always adding lines such as IF OBJECT EXIST, when the water sqaure has not been sent out yet.. its just annoying things like this. Even now I can plan out something to hold the water jet by the player, hidden from the camara, checking for collisions... and should only check collisions when I fire. It will take time, but sometimes with my experience and knowledge, I don't think I'm cut out for coding at all.

source is attached.

**Officialy has a mental illness.
" Ahh to finish something! My boy, have you ever accomplished anything? "

Attachments

Login to view attachments
DeHonCha
20
Years of Service
User Offline
Joined: 2nd Dec 2004
Location: A world of my own...
Posted: 30th Mar 2005 01:06
where's the source?

For when they said I couldn't, I did...
X_MEN
21
Years of Service
User Offline
Joined: 14th Sep 2003
Location:
Posted: 30th Mar 2005 05:19
you need to add another dimensions to your tree array

dim tree(10,4)

You can do it if you try

Login to post a reply

Server time is: 2025-05-31 05:45:50
Your offset time is: 2025-05-31 05:45:50