Heys guys. so ive been working on a small demo lately, and its been a long time since ive been on blender. I chose to make a game that is lowpoly and easy to design. A small problem i have is the parts that are destructible. One of the parts is a ceiling, where if shot at the parts that are hit tiles will fall. nothing fancy but just choosing to add some realism. I made it so that if its a mouse over and you left click the tile it would fall (just a temporary thing) but it didnt work so i switched to a keyboard action and it worked. i didnt add any mouse scripts is this why it didnt work?
also how could i add the mouse to the game without getting the mouse icon? i plan on using crosshairs, not a mouse.
thanks
i didn’t have a look at BluePrintRandom’s solution but for the falling tiles:
started out with a Rigid Body tile. then added an always sensor(not in pulse mode) that runs once when game starts and connected that to an Edit Object actuator to Suspend Dynamics as well as a Mouse actuator to make the cursor visible(split these off the And controller). then add a Mouse Over and Left Click sensor and connect them to an And controller and send them to an Edit Object actuator to Restore Dynamics. when you run it, just click on a tile and watch it fall. copy and paste them for the whole ceiling.
For the crosshairs, if this is a first person shooter you can add an overlay scene that only has the crosshairs. you can skip the actuator for making the mouse visible on the tiles then.
delay 0. duration 1-----and-------parent to object in game
you just have to add
if MOA.positive and LeftMouse.positive:
if 'Fall' in MOA.hitObject:
MOA.hitObject.removeParent()
import bgecont = bge.logic.getCurrentController()
own=cont.owner
MOA=cont.sensors['MouseOverAny']
Click =cont.sensors['Mouse']
if 'Cursor' not in own:
own['Cursor']=bge.logic.getCurrentScene().objects['Cursor']
own['Cam']=bge.logic.getCurrentScene().active_camera
else:
if MOA.positive:
Dist, v2world, v2local = own['Cam'].getVectTo(MOA.hitPosition)
V2 = own['Cam'].worldPosition+( v2world*(Dist-.05))
own['Cursor'].worldPosition=V2
if Click.positive:
if 'Fall' in MOA.hitObject:
MOA.hitObject.removeParent()
Your wisdom is enlightening Monster. Now I have been searching through some old games on youtube, a link here is to a game I used to play as a kid. One of my favorites. Cant believe it but this is almost an exact idea of what Id like to do! This might add some insight to what I would like to achieve.
In all honesty the graphics could just as well be the same. Its the gameplay that makes it memorable. I noticed seeing this all over again, that the effects were top notch for a playstation 1. everything could take damage, everything changed the scene. Very well put together. https://www.youtube.com/watch?v=IT6Ef2So2Jo