Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] Event cast on multiple objects

Author
Message
luskos
16
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 26th Apr 2010 02:28 Edited at: 27th Apr 2010 20:16
Hi guys,
this is my first code snippet, and i`m very proud to announce my peace of code.What it does it`s self explanatory.It makes certain event to apply to severeal objects at the same time without interupting of each other.The first version was too buggy, i was a bit lazy and the result was not what i was aiming at.I make an effort, put myself in shape and everything goes like i imagine it.The code was completly rewriten, but work as a miracle now.Enjoy!

The code is showing few things:

It shows how to cast the event on many objects and in the same time every object does what is needed of it without interupts of others(first version of my code does the oposite, second object doing the same was interupting the first stoping it in space before reaching the point where it`s needed to reach).In this snippet there are several plains which at mouseclick change their position and rotation at the same time.

There you can also learn about mouse toggle, it`s good trick to learn.I learn it hard way(like the cave man learn about fire).This was causing problems at first because without mouse toggle objects was launching to their target when they was picked by mouse with click + left button hold, one after another.

There is some UDT`s and array manipulation also.



Feedback appreciated!

EDIT: Comments added.

Where there is a will, there is a way.
I often edit my posts, that`s who i am
Daygamer
14
Years of Service
User Offline
Joined: 16th Mar 2010
Location: United States
Posted: 26th Apr 2010 23:34
It looks really cool. Great job, luskos. I admit I'm not educated enough to know everything that's going on in the code, but I get the general idea. thanks for sharing it!

Have a nice day, God Bless You!
luskos
16
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 27th Apr 2010 19:50
I`ll make comments in it and edit the first post so everybody can understand what is going on and learn from it.

Where there is a will, there is a way.
I often edit my posts, that`s who i am

Login to post a reply

Server time is: 2024-04-24 21:56:51
Your offset time is: 2024-04-24 21:56:51