entitycollided - how do i get more than one?
Blitz3D Forums/Blitz3D Beginners Area/entitycollided - how do i get more than one?
| ||
how do you get more than one answer out of entitycollided? entity = EntityCollided (carpiv,ID) only returns 1 entity. But what if my object collides with two or more of the same type? There doesn't seem to be a way of finding the other entities of this type short of searching the whole collision space for my carpiv and checking the type of each one. is there an array of entites collided by type? no way to index over them like with countcollisions, and CollisionEntity(obj,i) it seems like something is missing! I want to have all the info before i start coding around it. i can certainly check the whole collisionentity(obj,i) space and check getentitytype() if necessary. thanks all |
| ||
. As far as I know thats the way to do it. |
| ||
iterate through the types during each loop? For o.object = each object if entitycollided (carpiv,o\entity) i'm kinda not sure what you're asking. could you give an example? |
| ||
Something like this any good ... for c = 1 to countcollisions( carpiv ) entity = collisionentity( carpiv , c ) ID = getentitytype( entity ) ;do stuff next |