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 / Weapon controls (Positioning etc)

Author
Message
Enlightened Gamer
14
Years of Service
User Offline
Joined: 4th Oct 2009
Location:
Posted: 24th Oct 2009 14:15
Hi guys,

I have been frying my brain trying to get the weapon controls from the example project "iced" to work with my game.

I am having difficulty with it as the comments are not great which makes understanding what is going on very difficult for beginners like me.

No matter what I try it just does not work correctly with my game, could someone please explain what the code is doing how I could edit my code to get it to work.

Here is the code I have so far:


and here is the code for "iced":


I will be very greatful for any help you can provide.
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 6th Nov 2009 03:08
Quote: "No matter what I try it just does not work correctly with my game, could someone please explain what the code is doing how I could edit my code to get it to work."

There is a lot of media referenced in your code. Even though it seems to be media that is included with DBC, it may not all be in 1 place on everyones computer - and for the media that isn't available, then people will just get errors when trying to run your code. So if you could post a mock up version that doesn't require media. it would be easier for people to test your code.

On the problem side, in what way is the Iced code not working in your game? Are the weapons not showing up? Are they not firing? What is or isn't happening?

Enjoy your day.
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 6th Nov 2009 17:47
People on here expect me to pipe up and say this, so I won't disappoint them...

You are asking for trouble doing what you are doing. Trying to shortcut the learning process by copying and pasting code from other programs is asking for trouble.

If you don't understand the code, then what is the point? If it doesn't work - as it currently doesn't - you won't know how to fix it.

You then have to come here asking us to tell you what you should have learned yourself - slowly and step by step.

If anyone is good enough to tell you what to do, you will be back to square one with the next piece of code you 'paste' in.

Take each line that you don't understand and write your own program which uses that command until you understand what it does. (Pressing F1 will give you the list of commands and help files).

By the time you've finished, you'll be able to write your own version without having to copy and paste other people's code.

Tinkering with other people's programs is OK at first, but no way should you use any of that code in your own programs while learning.

Reading tutorials (see the stickies at the top of this board) and learning how to write it yourself is the proper way to go. If you show you are doing this, I'm sure there's not one person who uses this forum who would not help you out if you get stuck.

TDK

Login to post a reply

Server time is: 2024-05-04 06:28:54
Your offset time is: 2024-05-04 06:28:54