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 Professional Discussion / Can any one check my code,I am all confused today.

Author
Message
Daniel wright 2311
User Banned
Posted: 14th Oct 2011 02:33 Edited at: 14th Oct 2011 03:31
How would you re right this code to make it work?? I AM USING SPARKYS DLL.Any help is truly a appreshiated.



my signature keeps being erased by a mod So this is my new signature.
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 14th Oct 2011 03:02
Is that just a section of your code as there's no sign of any objects being created or existing in the code...?

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Daniel wright 2311
User Banned
Posted: 14th Oct 2011 03:10 Edited at: 14th Oct 2011 03:11
This is just the enemies section of my code,it will not work correcly, I have the enemy types set in arrays but I just cant seem to get the enemys to work unless they all share the same animations at once.

Objects 9 to 11 are my objects ,Im trying to get them to act as enemies, they do,but all at once.I need them to act by them selfs , so if one follows me all of them dont unless there called in the distance call.

my signature keeps being erased by a mod So this is my new signature.
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 14th Oct 2011 03:24
I will have another look through this when my heads a little clearer. I'd definitely recommend indenting your code though, it's hard to follow loops, ifs and endifs, etc without them being indented.

It's got to be something very simple to do with your 'e' loop counter.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Daniel wright 2311
User Banned
Posted: 14th Oct 2011 03:26
Yea, sorry about not indenting, I will go back to it and indent some of it for you,thanks for your help.

my signature keeps being erased by a mod So this is my new signature.
Jaeg
20
Years of Service
User Offline
Joined: 16th Mar 2006
Location: Indiana
Posted: 14th Oct 2011 11:48
Is the problem you are having with your animation code where it say they all play at the same time?
If that's the case change your enemy type to this


and then this to each if condition in your for loop:



You would have to change where ever you change the animestate variable to compensate for these changes as well. If this is the problem you where having then you were on the right track.

Go ahead. Walk into Mordor.

Ball State University - Biology Major
Daniel wright 2311
User Banned
Posted: 14th Oct 2011 21:32 Edited at: 14th Oct 2011 22:22
@Jaeg

Never mind,fixed it all,thanks for your help

my signature keeps being erased by a mod So this is my new signature.

Login to post a reply

Server time is: 2026-07-10 06:08:07
Your offset time is: 2026-07-10 06:08:07