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.

AppGameKit Classic Chat / Virtual Buttons

Author
Message
Rampage
16
Years of Service
User Offline
Joined: 4th Feb 2008
Location: New Zealand
Posted: 23rd Aug 2011 11:16 Edited at: 23rd Aug 2011 11:27
So I'm starting to use the virtual buttons as I am at the point in my application where you would set difficulty etc.

The code:


Is invalid, parameter mismatch through adding the virtual button.

This is strange as it is the method I have been using for all my media.
Why does identification through types not work with Virtual Buttons?
Am I doing something wrong?

Regards,

Max
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 23rd Aug 2011 12:08 Edited at: 23rd Aug 2011 12:11
AddVirtualButton requires 4 parameters.

AddVirtualButton( index, x, y, size )

and doesn't return a value (to bNoob.button, in your snippet) so you can skip the "bNoob.button =" part and put the value from it into the index parameter.

The range of "index" must be from 1 to 12, and the value is not one that is auto-generated, like with the media commands.

Rampage
16
Years of Service
User Offline
Joined: 4th Feb 2008
Location: New Zealand
Posted: 23rd Aug 2011 12:33
Quote: "The range of "index" must be from 1 to 12, and the value is not one that is auto-generated, like with the media commands."

That's what I was wondering. Thanks for the information!

Regards,

Max

Login to post a reply

Server time is: 2024-04-25 08:16:51
Your offset time is: 2024-04-25 08:16:51