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 / Hi again, I need "HELP"

Author
Message
Rage
21
Years of Service
User Offline
Joined: 9th Nov 2003
Location:
Posted: 22nd Nov 2003 21:46
Hi again, I have 2 questions...

1. How I can make a chain secuenses ?
ex: when sound stop playing make the next thing. or
you're unable to do something until sound stop.

Is it possible or I have to use a timer and calculate the sound duration ? I try using "wait" but makes me freeze all the code


2. How I can make some object move to my mouse pointer position ?
ex: like "Lucas Arts puzzle games" or "Diablo's" or "most of pc strategy games".

I try using "if mouseclick()" and "mousex()" as "object position x" and "mousey()" as "object position z" (because "object position y" will be the ground height and I couldn't move Z from a mouse "mousez()" )

to move smoothly I was thinking to use oldX, oldY and use the code
for x1=oldx to x
next x
or something like that

Can anyone help me

thanks
Sly D
22
Years of Service
User Offline
Joined: 15th Oct 2002
Location:
Posted: 22nd Nov 2003 23:45
For your first question there is a command if sound playing (sound number) which returns one if the sound is playing. So you just check if it is 0 do the rest of your code.

For your other question... i think it should be something like that but i never have done an RTS so can't tell for sure although i have written a snippet for that long time ago. I will try to find it.

Hope i helped!

A cute looking koala with a WHAT!? THEY can't use Kalashnikovs, can they?
Rage
21
Years of Service
User Offline
Joined: 9th Nov 2003
Location:
Posted: 23rd Nov 2003 00:34
Thanks for the sound advice
didn't know about that code

Login to post a reply

Server time is: 2025-05-21 17:14:38
Your offset time is: 2025-05-21 17:14:38