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 / 2 Clickable Images at Once

Author
Message
Zeus
18
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Atop Mount Olympus
Posted: 9th Aug 2006 04:47
When I link them they go only to one sub. I need them to go to a certain sub. Is it DO and LOOP?

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 9th Aug 2006 04:49
What? Do you have any code or anything? You're not making sense.

RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 9th Aug 2006 04:49
Alright honestly Jordan, you're asking almost every question that pops into your head while you and your team make this game, without taking 5 minutes to think it over yourself. If you still dont understand the concepts of the different types of loops, how to properly use subroutines, and some of the other questions you've been asking, I doubt you're ready to take on a team project. Im sure you'll ignore this advice but I recommend following some tutorials before continuing on.

Explain your question more if you want help.


Projects: Online CTF Game | Newcommer's Guide to FPS's
Zeus
18
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Atop Mount Olympus
Posted: 9th Aug 2006 04:57
Code,


Advice Taken, READ EVERY TUTORIAL, EVERY INDEX PAGE, ALMOST EVERY WEBSITE, do I have to record a voice?

Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 9th Aug 2006 05:44
I haven't a clue what you're asking.

- I see no plant subroutine label.
- BttnClick is assigned 1 just before the IF statement every time, so no point it even checking it.
- You're assigning mouse coordinate values to float variables when there is no need to since they can only ever return an integer value.
- I see much of you code duplicated for no reason
- Variables are being assigned values in a loop when there's no need to since they never change anywhere else in the code. Assign them outside of the loop.

"Using Unix is the computing equivalent of listening only to music by David Cassidy" - Rob Pike
Dr Manette
18
Years of Service
User Offline
Joined: 17th Jan 2006
Location: BioFox Games hq
Posted: 9th Aug 2006 07:20 Edited at: 9th Aug 2006 08:20
Jordan Stories Games, you are trying to make these games L.A. Assault and that tycoon game, and yet it appears you don't know how to use subroutines. I wanted to make amazing games when I first started, but then I realized I couldn't. The first game I made was a text adventure. It was fun and easy to program. Since you are new to DarkBasic, those games you have been trying to make will only give you headaches and you will always be confused...

Think about all the features that would need to be incorporated in L.A. Assault (which I'm guessing is like GTA):
-Artificial Intelligence
-tons upon tons of 3d models
-tons upon tons of textures
-Shooting
-Driving
-You probably might even have to make a game engine and build the game from that.
-and a lot more features...

Also, it's okay that you're asking questions. But, you're a new guy trying to make a complex game. You're just going to end up asking about everything because you don't know how to do many simple commands yet.
Figure out the code yourself, start with a small game like pong or a text adventure (I'm sure everyone's heard that before). It will be A LOT more fun because you know what you're doing. It will be easier to change the game. Also, you can say that "this is MY game, not just a bunch of code that people gave me". Once you start simple, you will find yourself learning a lot faster, and in no time, you will be doing more complex things.

I'm not trying to be a jerk, I'm just trying to help you. So if you don't agree with me, good luck on your games...you're going to need it!

Bio Fox...four guys, one computer, games like nobody's business.
ZDavis26
18
Years of Service
User Offline
Joined: 22nd May 2006
Location:
Posted: 9th Aug 2006 08:03
I agree with Dr. Manette, dude, I am new at this too. It took me 2 hours to figure out how to code a menu system to begin my game. But guess what I DID IT, without help from anybody. It makes me feel good that I can actually do this and call it my own. Even if it is just words that change colour when your mouse goes over them and takes you to a loading screen when you click New Game. I am going to use it to start a text based RPG. But by the looks of all your questions I am wondering if you could even do a menu system...
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 9th Aug 2006 08:09
Um, you have a return after a do-loop, and i havent seen a label. Add a label first, take out the do and loop statements, then try.

Also, i recommend following the advice of others on the forum. But to be honest, you should have gotten fps creator, or the 3d game maker. We were all newbs once, so that is my advice.

Zeus
18
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Atop Mount Olympus
Posted: 10th Aug 2006 18:31
I have made the label.

lower logic
18
Years of Service
User Offline
Joined: 15th Jun 2006
Location:
Posted: 10th Aug 2006 22:47
Could you explain what you're trying to make this code do, in more detail than "2 Clickable Images at Once"? Perhaps say what should happen when the program starts, what should happen when the user clicks the mouse, explain "2 Clickable Images at Once" in a few more words, and say whatever else the code should do. I think I could help, but not knowing what the code should do makes it hard to figure out how to make it work.
Zeus
18
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Atop Mount Olympus
Posted: 11th Aug 2006 01:40
I need two different images that link to a certain sub routine.

Gamedesign er20
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: The one place you would never look...
Posted: 11th Aug 2006 02:11
I'm not the biggest expert or anything (I just started a couple months ago) but wouldn't the binary moon tutorial teach him most of the stuff he asks?
Quote: "Advice Taken, READ EVERY TUTORIAL, EVERY INDEX PAGE, ALMOST EVERY WEBSITE, do I have to record a voice?"


Cocacola and Pepsi aren't that differnt. Deal with it.
lower logic
18
Years of Service
User Offline
Joined: 15th Jun 2006
Location:
Posted: 11th Aug 2006 05:38 Edited at: 11th Aug 2006 05:41
If you have an image pasted at x,y and it has a width of width and height of height, then you need to do this check to see if the mouse is clicking on it:


Here's a piece of code that makes two images link to a certain sub routine. It is fully commented, so read through it and try to get it to work with your images - right now the snippet generates two images with a few lines of code.

Login to post a reply

Server time is: 2024-11-26 13:32:43
Your offset time is: 2024-11-26 13:32:43