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 / help with collision

Author
Message
Dark basic help
19
Years of Service
User Offline
Joined: 16th Dec 2005
Location:
Posted: 16th Dec 2005 14:54
[b] Hi I am making a game and in my game there are random coins appearing on my screen
{for count = 1 to 15
coinX(count) = rnd(630)
coinY(count) = rnd(350) + 90
next count}

I want to be able to make a charcter on screen collide with these random coins, but it doesn't seem to be working. can anyone help.
Thanks

needing help!
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 16th Dec 2005 17:31
Just take a look at the Object Hit() command.

When you move your character, (say it's Object 100 and you have 15 coins 1-15), use something like:



This is very basic, but it will get you started.

TDK_Man

SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 16th Dec 2005 22:55
Here is a very good website for DB tutorials...

...maybe one day I'll finish a project

Login to post a reply

Server time is: 2025-05-22 21:47:40
Your offset time is: 2025-05-22 21:47:40