Findchild help with Collision
Blitz3D Forums/Blitz3D Beginners Area/Findchild help with Collision
| ||
Hi there Please could someone explain how to use findchild for collision, i wish to set a collision for this level, which is easy enough, as i used the following code: Collision code ;The following is for collision detections for the whole ground floor level EntityType ground_floor_layout,2,True EntityType player_hero,1,False EntityRadius player_hero,3 Collisions 1,2,2,1 The part of the code is in the main loop and this works for the collision of the whole room However a part of the level is a room, which as a carpet, and at the moment, because of the above code, the hero cannot walk over the carpet, as i have set the collision to not walk over. Looking at the help file, i see you could use Findchild command to find the entitie of the carpet, using Rob code (http://www.blitzbasic.com/codearcs/codearcs.php?code=385), i found the level hier which is as followed Hierc Entities Level 24201696 -Child: carpet 24415408 -Child: carpett So i try to use the findchild for two parts of the carpet as followed carpet=FindChild(ground_floor_layout,"carpet") EntityType carpet,1,True carpett=FindChild(ground_floor_layout,"carpett") EntityType carpett,2,True and set the collision as followed Collisions 1,1,0,0 Collisions 2,1,0,0 I'm unsure on what to write for the collision code. How do i use the findchild hier to set the carpet to have no collision. Please could someone explain how to use findchild to achieve what i want. Please help Kind Regards |
| ||
Help please anyone? Does anyone understand what i have written? |