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 / A few questions.

Author
Message
Major Payn
21
Years of Service
User Offline
Joined: 16th Dec 2003
Location: United States of America
Posted: 12th Jul 2004 07:49
Hi!

I am trying to make a little stradegy game in which the point is to set up a beach head so that you can stop the advancing enemy. Right now I am trying to get the basics done, which are the positioning of objects, and then the arrival of the first wave of troops, here is the code so far.....



now there are a few bothersome things about the code that I just dont know how to fix, the first being that after the timer is up it just flashes like crazy, I want it to stop flashing utill I press the enter key, then it should dissapear completely along witht the words "wave 1 inbound!".

Next, Is that after the timer reaches 0 you should no longer be able to move the objects around, which you can still do.

and finally, I have made a landmine object (a cube right now), but the point is that, if the enemy object collides with the landmine object it should die (or in this basic setup, just dissapear), I tried some object collision stuff but keep getting an unrecognized paremter, its in my code just look at the landmine collision part.

Well thats all for now, but I will probably post more questions later in this thread as to now clog up the forum .

Thanks and I look forward to these answers!

P4 3.2Ghz/Alienware area 51/radeon 9800 pro 256mb/sound blaster audigy 2/5.1 surround sound speakers.
dj BlackDragon
21
Years of Service
User Offline
Joined: 23rd Sep 2003
Location: who knows
Posted: 12th Jul 2004 10:58
wel i think i can help you with the timer. you could try putting cls in front of the time code to get that to stop flashing and then you might be set up for that or maybe (im not sure about both of these)the sync rate isnt enough?? try those.
bye,
Ian

urrent Project:Quest for the Five Staffs of Draconia
Major Payn
21
Years of Service
User Offline
Joined: 16th Dec 2003
Location: United States of America
Posted: 12th Jul 2004 13:00
Thanks! I added cls and the text no longer flashes, now I just need to know how to get this collision stuff working, I have object e the enemys, and object k the kill boxes (landmines) I want it so that if one of the enemys touches one of the landmines they will dissapear so I tried the following.....

for e=6 to 15
if object collision (e,k)=1
hide object e
next e

But that gives me an unrecognized paremeter, any ideas, suggestions?

P4 3.2Ghz/Alienware area 51/radeon 9800 pro 256mb/sound blaster audigy 2/5.1 surround sound speakers.
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 12th Jul 2004 14:14
YOu didn't close your If function.

Major, I really suggest that you rewrite your code rather than just getting people to fix up the code that Aura wrote for you.

Becuase you won't learn by doing this.

Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Major Payn
21
Years of Service
User Offline
Joined: 16th Dec 2003
Location: United States of America
Posted: 13th Jul 2004 01:48 Edited at: 13th Jul 2004 01:51
I am learning alot, how am I supposed to learn if I get an error and sit there an hour without knowing how to fix it, I learn by seeing examples, I might not be as perceptive as you, I cant just sit there and start makin freakin GTA 3, I have to have alot of help.

oh and by the way, that was a typo, in the reall code I did add an endif right after the hide object e command, so it looked like this...

for e=6 to 15
if object collision (e,k)=1
hide object e
endif
next e

that still gives me an unrecognized paremeter, I believe it is because its not recogniizing the variables e and k. Any suggestions?

PS: Jess, yes I am using an old version of the code Aura wrote for me, I tried to rewrite it, but it just wasnt nearly as good, so I went with that, By the time Im done with it it will be entirely different. Im learning, just in a different way.

P4 3.2Ghz/Alienware area 51/radeon 9800 pro 256mb/sound blaster audigy 2/5.1 surround sound speakers.
Major Payn
21
Years of Service
User Offline
Joined: 16th Dec 2003
Location: United States of America
Posted: 13th Jul 2004 12:04
Any Ideas on how I can get that object collision working? I need help with this!

P4 3.2Ghz/Alienware area 51/radeon 9800 pro 256mb/sound blaster audigy 2/5.1 surround sound speakers.
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 13th Jul 2004 13:40
For that little snippet, You haven't specified what object number 'k' is.

And since the killbox object numbers range from 16 to 25 then you need to detect those in the collision too.

Try this;


And, Major, if you want to learn, then by example is the best way. But, I still say that you should have used Aura's code as an example, and then written your own, because there will always be parts that you don't understand in the code if you just copy + paste it, which will cause you hell later when you try to debug code that you don't what it's doing, or what it's meant to do.

Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Major Payn
21
Years of Service
User Offline
Joined: 16th Dec 2003
Location: United States of America
Posted: 14th Jul 2004 03:29
Im still getting and unrecognized paremeter at the object collision bit. Heres the code...........



Guns arnt the problem, people are the problems, shoot all the people and guns arnt a problems anymore.
Kohaku
21
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 14th Jul 2004 03:47 Edited at: 14th Jul 2004 08:41
Hello.

on the last bit you have
Quote: "for k=16 to 25 "


and then
Quote: "next t "


Just thought I'd say hi really.

[edit]What Jess said. Have a walk through the code, and try to understand what every command is for, line at a time. You'll find its all quite simple. [/edit]

Infra-Dark
Major Payn
21
Years of Service
User Offline
Joined: 16th Dec 2003
Location: United States of America
Posted: 14th Jul 2004 04:38
Ok no more errors, but I got a problem. It seems as though the first enemy who hits a landmine dissapears, but after that the collision is totally ignored, and the enemys just walk right through the killboxes without dissapearing. here is the code.....



Guns arnt the problem, people are the problems, shoot all the people and guns arnt a problems anymore.
Major Payn
21
Years of Service
User Offline
Joined: 16th Dec 2003
Location: United States of America
Posted: 14th Jul 2004 13:38
Wait I realized that none of the enemys dissapear, so the collision isnt working, thats great(sarcasem). Anybody know how to get that collision working? everything is in the above post.

Guns arnt the problem, people are the problems, shoot all the people and guns arnt a problems anymore.

Login to post a reply

Server time is: 2025-05-25 01:53:57
Your offset time is: 2025-05-25 01:53:57