I can't seem to get the right code for a simple left mouse click event... I have looked far and wide too. i always seem to get some kind of abstract error. Please put here the EXACT code that I need to make a simple event. Also, on the collision front, I have decided to switch back to Newton (bullet WAYYYYY TOO HARD) and am trying to make a shooting function. I will ask help for that soon, but if anyone knows a good method of firing rapidly please share. Would it be possible to make a huge array of the same 3d mesh? Please tell.
Thanks.
Events... I Can't get them right! :{
How are you proposing to shoot? Are you considering shooting a 3D mesh as a bullet? If you're going to have a lot of bullets i wouldn't advise this, rather you should look at raycasting.
The abstract error you're getting is to do with the OnEvent function. The parameter should be const SEvent& event, not SEvent event.
The abstract error you're getting is to do with the OnEvent function. The parameter should be const SEvent& event, not SEvent event.
-
- Posts: 170
- Joined: Sun Jul 01, 2007 11:41 pm
- Location: Manchester, UK
It would be better if YOU post YOUR code so we can see whats wrong with it. Post the exact error message aswell.I can't seem to get the right code for a simple left mouse click event... I have looked far and wide too. i always seem to get some kind of abstract error. Please put here the EXACT code that I need to make a simple event.
It seems you've looked about as far as that shiny "new topic" button and as wide as a japanese girl's ........
As for "firing rapidly", drawing and updating a mesh for every projectile would be very cpu intensive - a better option is to cast rays and detect collision with geometry in your scene - if you'd like a visual representation of the path of the projectile, use the same vector that you cast the ray along to orientate and size a textured quad.
AGAIN, there's plently of info already on this forum, and across the rest of the tinterweb on these things. You've made like a thousand new topics in the last 24 hours.
[edit]
I second JP's post

Last edited by SwitchCase on Wed Oct 29, 2008 2:19 pm, edited 1 time in total.
Re: Events... I Can't get them right! :{
the tutorials are showing this pretty well...jhend60 wrote:Please put here the EXACT code that I need to make a simple event.
for example the movement tutorial...

while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:

http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
The mouse events are defined separate from the keyboard events.
http://irrlicht.sourceforge.net/docu/na ... .html#a181
http://irrlicht.sourceforge.net/docu/na ... .html#a181
the usage is the same though...knicholes wrote:It gives a great example on how to handle a keyboard event, but there's nothing about mouse events (lclick, rclick, wheel) in the examples that I could find.

and jddevnet pointed you in the right direction...

and you always can search the forum...
ohh, no, you always should search the forum !!!

while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:

http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java