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 / Any AppGameKit equal to DBPro Set Object Alpha command ?

Author
Message
Freddix
AGK Developer
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 24th Sep 2018 21:45 Edited at: 24th Sep 2018 21:54
All is in the title.

PS : Same question for Fade Object command please.

Thanks
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 25th Sep 2018 00:41
you can simply use the SetObjectColor(objId,r,g,b,a) command where the rgb values would be the same ie 255 for normal

or you could use a shader here is an example using a shader approach
fubar
PHeMoX
6
Years of Service
User Offline
Joined: 9th Jan 2018
Location:
Posted: 27th Sep 2018 17:50
Am I the only one who is a tad annoyed by how you must set the colour values too with each change to the alpha??

It would be kind of neat if we could change the individual properties with a separate command as well, like SetObjectX() does compared to SetObjectPosition().

It's not the end of the world though.
Jeff Miller
19
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: New Jersey, USA
Posted: 28th Sep 2018 13:01
The context of the post is that Freddix is writing a commercial plugin for AppGameKit similar to the one he wrote for DBP, but also covering some simple commands that DBP had but which AppGameKit lacks. So he is testing interest. There has been very little plugin development for AppGameKit compared to DBP. Some of this might be the perceived need to cover all platforms in AppGameKit where all you needed in DBP was to cover Windows. For example, Ron, who wrote the VR plugin for AppGameKit, also wrote the EZRotate plugin for DBP, and actually wrote one for AppGameKit but is not offering it because it will only work on Windows. I'm all for what Freddix is doing. And if some of the commands will only work in Windows, I want them anyway.
PHeMoX
6
Years of Service
User Offline
Joined: 9th Jan 2018
Location:
Posted: 28th Sep 2018 13:46
Fair enough, well I would be interested, however most of my games do require the AGK2 flexibility of multiplatform support. It's actually largely why I am using AGK2 to begin with. Being limited to Windows-only would definitely not be useful.
Freddix
AGK Developer
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 7th Oct 2018 12:36 Edited at: 7th Oct 2018 12:38
Hi all

@Jeff Miller : Thank you for your message but I think (like PHeMoX) that some DBP commands are really annoying misses in AppGameKit. It think it should be possible for TheGameCreators to add a command to set values individually.
If color & Alpha are stored in the internal AppGameKit Image structure, then it can store Colour and Alpha separatelly.
Then when you set one or the other, it takes the complementary information in the internal AppGameKit image structure.

Currently, to do this, I must reimplement a dynamic list where I store all images color or alpha I set and create my own commands for Alpha and colouring... It's a bit annoying as I think it could be handled internally, and more to this, should be compatible with all platforms supported by AppGameKit. In all case, I try to write plugins compatible for all platforms supported by AppGameKit.

Regards,
PHeMoX
6
Years of Service
User Offline
Joined: 9th Jan 2018
Location:
Posted: 11th Oct 2018 01:46
Yeah shouldn't AGK2 already have a dynamic list per object that holds specific colour or alpha value? I would love to have a SetObjectAlpha(id,0-255) style command, and one for each colour.
Bengismo
6
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 11th Oct 2018 09:13 Edited at: 11th Oct 2018 09:14
Quote: "Yeah shouldn't AGK2 already have a dynamic list per object that holds specific colour or alpha value? I would love to have a SetObjectAlpha(id,0-255) style command, and one for each colour.
"


Internally AppGameKit does indeed have a colour per object, it actually has a per object color and a per object emmissive colour as well as the alpha value.

AGKVector m_Color;
AGKVector m_ColorEmissive;
float m_fAlpha;


In Teir 2 you actually have the commands to set each individual colour seperately
void SetRed( int iRed );
void SetGreen( int iGreen );
void SetBlue( int iBlue );
void SetAlpha( int iAlpha );


Unfortunately, for whatever reason, the commands to set the colours seperately per object have not been added to teir 1

If we had the ability to GET the colours GetObjectColorRed()/Blue()/Alpha etc.... then at least you could get the other 3 and changes just the one you want to but the get commands arenet available either

These would be VERY easy to add...its just a few line into the wrapper file and so they would be accessable via teir 1. Hopefully Paul will consider adding this or anyone (with C/C++ knowledge) could just do it themselves and make a pull request to the teir 2 source so they are added in the next update. Im suprised they werent included long ago.
PHeMoX
6
Years of Service
User Offline
Joined: 9th Jan 2018
Location:
Posted: 13th Oct 2018 20:25
Yeah I hope so Bengismo. They are quite useful. Even GetColorRed/Blue/Green/Alpha etc. would be very useful.

Login to post a reply

Server time is: 2024-04-25 11:00:19
Your offset time is: 2024-04-25 11:00:19