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 / How to use the properties of the VISUAL EDITOR in AGK 2 Tier 1

Author
Message
Zolarius
16
Years of Service
User Offline
Joined: 8th Jul 2007
Location: Vancouver, WA USA
Posted: 14th Sep 2018 03:53
I have built 2 scenes for my game and would like to get the properties into my code. So far, I have retrieved the [ID.Name] and the manual demonstrates how to access the custom variables A,B,C,D but there is no reference on how to access
[Contents.Text or Font, Position X,Y,Size,Depth,Angle,Scale,Alignment,Color,Alpha,Physics Stuff] etc... It seems to me that if you can set these values in the editor you should be able to load and manipulate them in your code.

I think it would much easier if the Visual Editor code ported to AppGameKit 2 tier 1 would setup each ID as a Type that would include all of the options already defined and ready to use.

e.g.

Type ID(1)
Name as String
Image_Name as String
POS_X as Float
POS_Y as Float
Size_X as Float
Size_Y as Float
Angle as Float
Depth as Integer
Horz as String or Integer if 0 or 1 used
Vert as String or Integer if 0 or 1 used

etc...
End Type

Has anyone figured out how to do this yet?

If So, please give some examples.

P.S. I am not a PROFESSIONAL programmer. But I do have an analytical mind and am capable of figuring stuff out if pointed in the right direction.
In other words PLEASE keep the examples simple to understand and make plenty of comments on what is happening.

Thank You very much!

Zolarius
Full time contractor -- Struggling programmer since 1985!
Many ideas and no completions yet! Hoping AppGameKit will solve that for me. Thanks TGC and members for your support.
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 14th Sep 2018 09:38
There's no special commands needed, once you have the ID in your code you just use the standard AppGameKit commands to get the properties.
life's one big game
spec= 4ghz, 16gb ram, AMD R9 2700 gpu
Zolarius
16
Years of Service
User Offline
Joined: 8th Jul 2007
Location: Vancouver, WA USA
Posted: 15th Sep 2018 18:00
Could you include an example of getting one of the properties that is not included in the manual?

or

Verify this is correct...

Using a TYPE style setup..

Using the visual editor command to get the ID.

ID = VisualEditor_GetID ( "Block_1", 1 )
Block(1).X = GetSpriteX(ID)
Block(1).Y = GetSpriteY(ID)

etc...



Full time contractor -- Struggling programmer since 1985!
Many ideas and no completions yet! Hoping AppGameKit will solve that for me. Thanks TGC and members for your support.
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 15th Sep 2018 18:49 Edited at: 15th Sep 2018 18:53
yes

then if you later wanted to print say the position of ball 3
life's one big game
spec= 4ghz, 16gb ram, AMD R9 2700 gpu

Login to post a reply

Server time is: 2024-04-20 08:37:04
Your offset time is: 2024-04-20 08:37:04