noob question

can anyone give me an .blend example of a mouse pointer when click to an cube object will display an message…

pls help me

hi

here is it :slight_smile:

this example contains:
on layer 1:
cube - clickobject
empty - addObjectObject

on both the cube and the empty is an actuator which adds a plane.

on layer 2:
a plane ( the added object)

there are 2 python scripts:
one to add the Rasterizer.showMouse(1) function
and one which does the actual mouse actions

to show you how you click multiple objects i added the sphere and included its click event in the MouseOver.py

have fun playing around,
greetings
manarius

Attachments

mouseclick.blend (508 KB)

wow its works great… but i didn’t understand the process why…

can you explain it to me more… an can you change the object added into a text…

What you do is click on the second layer on the header of the screen( All the white boxes that are above the buttons window) After clicking that it should pull up a white plane, click <space<Add<Text, Then click TAB to go into edit mode, type what you want it to say then hit TAB again. Next hit ALT C(While text is selected) and click MESH. Next go to the first layer again, click on the cube, go to game logic, then switch the Add object from Plane to “Font” on both Edit Objects( Be sure to capitalize) Next hit P, it should play and when you click on the cube it should add the text, but it will be looking at an odd angle, so go back to the second layer, select the text and hit TAB, then A to select all, then hit R then X then 90, ENTER, you might want to move it to the side so it will not be in the middle of your block(Do this in edit mode). Go back to the first layer and hit P, it should work, hope this helps. :slight_smile:

i cant understand it better to show some example… for more understanding

Well I don’t know how to upload .blend files, a website where I can do that would be great.

Just for info, you can attach blends here in the forum.

Here, check out this file, hope it helps.

Attachments

mouseclick[1].blend (807 KB)