AGS new keywords: Help me sorting it all out

Started by Monsieur OUXX, Mon 18/01/2016 15:42:55

Previous topic - Next topic

Crimson Wizard

#20
Quote from: Monsieur OUXX on Tue 12/04/2016 15:39:39
I didn't understand this sentence :
QuoteThe built-in types like GUI are permitted to have pointers via the builtin keyword
Since forever, I've been having pointers to, let's say, GUIButtons, inside my structs (I believe? Or did I fantasize this?).

So where does "builtin" step in? Is it used only in the built-in AGS script headers (not visible in the Editor, obviously), or are you sayin gthat they could be of benefit somewhere else, for the end-scripter?

"Builtin" allows pointers INSIDE managed struct, not pointers TO managed struct. Pointers TO managed struct were always allowed (this is how managed structs are used in general).

Builtin keyword was introduced in 3.4.0, and is applied to managed types, which instances are created only by engine (on its own rules).
There is no way this keyword can benefit scripter, because after applying "builtin" keyword to your own struct you can no longer create objects of these types.

E: Actually, I think that no "builtin" structs have a managed pointer declared inside them either (even though they could), they rather have properties that return these pointers.

Monsieur OUXX

Quote from: Crimson Wizard on Tue 12/04/2016 16:56:57
There is no way this keyword can benefit scripter, because after applying "builtin" keyword to your own struct you can no longer create objects of these types.

OK thanks
 

SMF spam blocked by CleanTalk