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 / Pro: Array-Array collisions.

Author
Message
Xender
18
Years of Service
User Offline
Joined: 28th Apr 2006
Location:
Posted: 20th Jun 2006 17:03 Edited at: 20th Jun 2006 17:17
i have a set of bullets in an array, and also a set of enemies in an array, what i need to have happen is that thwen of the bullets hits one of the enimies, it randomly puts the eneimes in another spot, is there any way to do that, because dont you have to have someting special when do an array-arry collision detection (and would it be easier if i have the bullets cubes too?) here is my bullet and enemy code (functions)
before main loop:

enemies before loop too:

and then their gosubfunctions called in loop:

so when i do collision should i just have it be like for x=1 to maxenemies and then right below that for b=1 to 100, and then just be like if collision x,b+100 = true or 1 or whatever, then do my code. or would that only check for collision between the first bullet and first enemy?

edit: here is my full code, i did something and i dont kno what or when so that now my enemies just... well they dont go random but yea
Xender
18
Years of Service
User Offline
Joined: 28th Apr 2006
Location:
Posted: 20th Jun 2006 23:25 Edited at: 21st Jun 2006 01:10
i added this to see if it wold work thinking this is about as basic as i could get it to be :

well figures it doesnt work.... i really really need help on this can any one help me?

EDIT: yay fixed the random position of my enemies, and some other miner stuff...... but just the collission is left... does ne one know how to do this?

EDIT 2: i fell stupid , yet smart, i think i got it, time to just see if i can do what i want to do, now when they hit it says "yay we are hitting w00t" so now .. yea i got it .. thks... ..yea




EDIT 3: yea... for when you get hit enough times.... i want a game over screen that is very simple... but i cant get it i just want to clear the screen (cls) and print game over, then do wait key then end.. this is what i have, but it doesnt display game over, just freezes and watis for u to push a key then ends
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 21st Jun 2006 05:12
Try putting "sync" between printing the text and wait key.

Login to post a reply

Server time is: 2024-11-26 17:21:06
Your offset time is: 2024-11-26 17:21:06