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 / exoplosions

Author
Message
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 30th Nov 2003 05:50 Edited at: 30th Nov 2003 06:00
!!!!!OK, THIS, NOT THE ONE IN THE SOURCE CODE!!!!!


and in the source is all the code that im having a problem with

now heres my problem:
the explosion doesnt update itself, it appears, and stays. its the grey blob. i think its because the grenade is dead, so it doesnt go to where i call the function, but i dont know what else to do. any help please?

you should be able to use that code w/o media

=<=Pudgie Wars=>=
Game engine: 20% = Models: 25% = Textures: 1% = Sounds/Music: 0% = www.geocities.com/bigapple_entertainment
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 30th Nov 2003 06:42 Edited at: 30th Nov 2003 06:44
Ok, I personally had real diffuculty reading through your code, but, it looks to me that you are setting the variable that controls weather or not the grenade is hitting the ground to be zero if it hits and the explosion only ever gets played if it equals one... i think.

You need something along the lines of: (Psuedo code)


Hope I Helped...


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 30th Nov 2003 07:13
okay. yeah, my code is really weird i realized when i posted that. hehe, im going to be going through it all soon tho.

i think that might work jess, that was actually what i was thinking right after i posted this. thanx much

=<=Pudgie Wars=>=
Game engine: 20% = Models: 25% = Textures: 1% = Sounds/Music: 0% = www.geocities.com/bigapple_entertainment
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 30th Nov 2003 07:26
That's cool man..

Also, i thought you were going to convert all of your subs to functions?

And another thing, i noticed in teh Source code button, you are using a function called _radar_disp()... is that my radar function?

Gald to Have Helped Once Again


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 30th Nov 2003 08:02
yupyupyup, i was, havnt yet, i will after i get my basic weapons done (grenade being one), and yes that is your radar functions. very useful for now. im going to make my own/edit yours, so it suits me better, but it's perfect for now.

i have a problem
i changed a piece of my code to this

and


im using the same function for _explosions so you can look above (my copy is gay in Dedit so i cant copy or cut ANYTHING, but i can paste for some strange reason...)

the explosion sphere will follow the grenade at ground level, and then when the grenade hits, the explosion sits there and spins.

man this would be eaiser if i had the code sorted better....maybe i will change all of these to functions...

=<=Pudgie Wars=>=
Game engine: 20% = Models: 25% = Textures: 1% = Sounds/Music: 0% = www.geocities.com/bigapple_entertainment
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 2nd Dec 2003 02:57
i really need to know whats wrong! sorry if i sound like a loser who cant do anything by himself. it seems to be right in my mind, but for some reason the computer doesnt like it.

=<=Pudgie Wars=>=
Game engine: 20% = Models: 25% = Textures: 1% = Sounds/Music: 0% = www.geocities.com/bigapple_entertainment
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 2nd Dec 2003 08:28
Darwin, If noone has looked at it by the time i come back home, in about an hour or so, I'll give it a whirl.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 2nd Dec 2003 12:46 Edited at: 2nd Dec 2003 13:02
Ok, before I do this, I am going to do you a massive favour, I am going to go through your code and space it out, and organise it a bit better, and also rewrite your comands to follow a specific format.

And Here it is ( I've probably tripled your line count, but it is much easier to understand now ):


Hope It Helps...


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 2nd Dec 2003 15:08
WhatI changed:


1)
Ok, in that code where you have:


I Have Changed this to:


If put in the new If function so that it wouldn't have to hide the object and reposition it each loop if it was already hidden.

I changed the x position so that when i put in If Object Position X <= Get Ground Height(1,x#,z) for when the object hits the ground, it won't coninually return true when the grenade is at rest.


2)
I Moved This from inside Item_Info:


To inside Grenade_attack:


3)
Where you had:


I changed it so that you wouldn't get the explosion following the grenade across the gound by adding in an Else statement:


Also, you will notice i added the line Position Object 3,oldtx#,0,oldtz# : Show Object 3 This just positions the explosion at the same coordinates as the grenade when hitting the ground and then shows it.


4)
This is the actuall explosion code ( at the end of grenade_attack ):


I simply got rid of the function because of the amount of variables you were useing could not all be used in the function, then returned to be used again, unless you made them global ( ie made them array's ).
Also, the fade command doesn't really seem to do anything, so, after alot of trial and error, I came to the conclution that it is useless.


And here it is, The working code:


You will notice that i have mabey put in some text commands in the loop, this is just for Debugginf purposes, feel free to take them out.!

Hope I Helped...

PS i noticed you are using alot of Print commands which really do kill your FPS, i recomd using the Text command which don't take away so many FPS.

PSS i also noticed that you are uneccessaraly changing the Ink colours in the loop, for example, you had an Ink RGB(255,255,255),0 comand on one line, a Print on the next, then the very same Ink command on the next line! This is bad codeing and could cost you FPS if you're not careful...

PSSS If there's spellign mistakes, screw em, This post is so long and im so tired, i don't really care.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 2nd Dec 2003 18:42 Edited at: 2nd Dec 2003 18:43
JessT: you are awsome. if i ever finish the project, you will be in my credits!

i will try this as soon as i get home. now im excited!

oh also, about the print and such. i was just making a function yesterday using the text command so i dont have to position, change size and font and all that, when i get around to it. thanks

=<=Pudgie Wars=>=
Game engine: 20% = Models: 25% = Textures: 1% = Sounds/Music: 0% = www.geocities.com/bigapple_entertainment
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 3rd Dec 2003 02:16
wow, i just tried this out and have been playing with it. it is a LOT better than i expected! thank you so much JessT!!

=<=Pudgie Wars=>=
Game engine: 20% = Models: 25% = Textures: 1% = Sounds/Music: 0% = www.geocities.com/bigapple_entertainment
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 3rd Dec 2003 02:56
Glad to Help...


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Don Malone
22
Years of Service
User Offline
Joined: 27th Apr 2003
Location: Birmingham, Alabama
Posted: 4th Dec 2003 04:22
JessTicular.

You are one helpful person. It is wonderful that you help so many people and seem so knowledgable.

Thanks for your efforts.

Wasting CPU Cycles since the 286 was a hot machine.
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 4th Dec 2003 04:27
honestly, i would have to say you are the nicest person on these boards.

=<=Pudgie Wars=>=
Game engine: 20% = Models: 25% = Textures: 1% = Sounds/Music: 0% = www.geocities.com/bigapple_entertainment
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 4th Dec 2003 10:14
Quote: "JessTicular.

You are one helpful person. It is wonderful that you help so many people and seem so knowledgable.

Thanks for your efforts."

And
Quote: "honestly, i would have to say you are the nicest person on these boards."




Thanks guys, Really means alot to me...

I just try to help those in need.

And to tell the truth, when i start helping people, i really don't have a clue how to do it, I just come up with an idea, and tehn develop it, and, if it works, great, if not, I try and try again till I get it right.

That's how i approach most things.

And I'm just helpful cos the first few posts I made, the people that were here then were real helpful to me, so I'm showingmy gratitude by helping others, and plus, i know how frustrating it can be when you just can't get something right, no matter what you try... lol...

Thanks again.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy

Login to post a reply

Server time is: 2025-05-22 06:30:56
Your offset time is: 2025-05-22 06:30:56