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.

Dark GDK / Code Example needed GDK

Author
Message
3dmasters
14
Years of Service
User Offline
Joined: 3rd Nov 2009
Location:
Posted: 23rd May 2010 19:38
Hello All,
I would like some sample code for pressing a button in game
playing a animated mesh.

1. Mesh is animated from frame 1 to 100 move the monitor down.

2. Mesh is animated from frame 101 to 200 bring the monitor up.


Can someone help me out please
Thank you,
Leroy

Here i am!!!
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 23rd May 2010 20:26
what do you mean by "bring the monitor up" and "move the monitor down"?

Your signature has been erased by a mod - Please reduce it to 600x120 maximum size
3dmasters
14
Years of Service
User Offline
Joined: 3rd Nov 2009
Location:
Posted: 23rd May 2010 20:49
Thank you for your responce.
I mean,
Have animated a monitor that unfolds from the celling to a position
in front of the character from pressing a button in game like a play button.....

Leroy

Here i am!!!
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 23rd May 2010 21:07 Edited at: 23rd May 2010 21:09
oh you mean like a laptop? well all you need is this:
first, your laptop model should be made up of two parts (or lets say, 2 limbs), 1 for the monitor and one for the keyboard, now lets assume that LIMBID is the ID of the screen limb, here's what you can do


3dmasters
14
Years of Service
User Offline
Joined: 3rd Nov 2009
Location:
Posted: 23rd May 2010 21:56
Hey nice example,
However i am looking more for having a button in game that looks like a VCR play button and you press with the mouse. then the animation starts... Do you have example for that.
Thank you,
Leroy

Here i am!!!
haliop
User Banned
Posted: 23rd May 2010 22:36
how about opening the refrence document and doing it on your own?
try to do it yourself we have enough work on our hands , ask questions about the code but dont ask for samples...
3dmasters
14
Years of Service
User Offline
Joined: 3rd Nov 2009
Location:
Posted: 23rd May 2010 22:40
Wow, nice smart ass answer. If the refrence manual was good enought i would have to ask a question here.

Here i am!!!
haliop
User Banned
Posted: 24th May 2010 06:14
you need to try it man.
i'll explain what is written above for making peace bla bla bla
look


Quote: "
I would like some sample code for pressing a button in game
playing a animated mesh.

1. Mesh is animated from frame 1 to 100 move the monitor down.

2. Mesh is animated from frame 101 to 200 bring the monitor up.

"


... " i would like some sample code "...
why not asking
" how do i animate a mesh with a key "
i have tried several bla bla bla
but it seams like you didnt even tried..
do you get my point?

and then after Hassan giving it to you
you ask for another
Quote: "
However i am looking more for having a button in game that looks like a VCR play button and you press with the mouse. then the animation starts... Do you have example for that.
"

Hassan gave you a code , you liked it but not so much , trust me Hassan can build you all of your program , but why should he?

to me it looks like you wont spend time learning yourself , you just want us to make the hard work for you..

and if it walk like a duck , first quote, and talk like a duck , second quote, its a duck.

pls understand we have a lot of work on our hands, you cant just come here and ask for samples and then when "its nice" but not what you wanted you ask for another.. learn learn learn like the rest of us , its ok to ask question we would like to help , but you cant really rely only on us. go learn for yourself.
haliop
User Banned
Posted: 24th May 2010 06:18
btw , to animate something using a button , you have 2 choices
1 , a 3d button - look for dbPickObject in the refrence under 3D basic section.
2 , a 2d button which wont help you , you have to take the dbMouseX and dbMouseY and check its position relative to the 2D button which will probably be a sprite.

you can search the forum , or even better go to the TheGameCreators.com , and in the search feature type what you need ,
Animating using Buttons , you may get some DarkBasicPro instead of DarkGDK commands but they are the same jsut without the db ,spaces,braces..
3dmasters
14
Years of Service
User Offline
Joined: 3rd Nov 2009
Location:
Posted: 24th May 2010 09:09
In respone, TO; " trust me Hassan can build you all of your program , but why should he?"

Do you speak for other people like Mr. Hassan. Because if you do you need to learn how to be more Professional about speaking for him.

Secondly how dare you tell what i can to or not do here on the messages board. Let me tell you something, You better get used to me being around this message board because i am hear to say. So you better get used to it. Games are for kids watch you seem to be playing with me and it's not funny.

NOw please get a life and go bother someone who gives a damm.
I am hear to learn something about the game engine weather you like or not.


Next time you see a posting from me move on even if you think you have answer because in only three posts i don't like and i don't like who you think you are UNDERSTAND?


Thank you,
Leroy

Here i am!!!
haliop
User Banned
Posted: 24th May 2010 12:25
sorry man that wasnt my intention and i may have cross the line.
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 24th May 2010 15:19 Edited at: 24th May 2010 15:21
this is what you need:
1- check if the mouse is clicked
2- if so, check if the mouse is over the button (dbPickObject)
3- if so, check if we are close enough (normal distance formula)
4- if so, we are ready to open
some code:


hope it helps

3dmasters
14
Years of Service
User Offline
Joined: 3rd Nov 2009
Location:
Posted: 25th May 2010 01:46
Thank you for your responce Hassan,
This what i was looking for outstanding example.
THank you for helping me out...

Also haliop,

No problem, i am here to learn how to work with this engine.

Thank you,
Leroy

Here i am!!!

Login to post a reply

Server time is: 2024-10-02 05:30:09
Your offset time is: 2024-10-02 05:30:09