Not logged inOpenClonk Forum
Up Topic C4Script for everything

This board is threaded (i.e. has a tree structure). Please use the Reply button of the specific post you are referring to, not just any random button. If you want to reply to the topic in general, use the Post button near the top and bottom of the page.

Post Reply
In Response to Günther

> What's with for example vertex lists? What C4Value type whould that be?


An array would be the most obvious :-)

> 1. Do you think the prefix C4 for those is razonable?


"reasonable"? Every class has C4 as a prefix. Uniformity is important.

>>- C4IDs are replaced by (pointers to) proplists
> How does this look like?


At the moment it's almost imperceptible by the scripter - Definitions still have an id, and id literals in the script still work if a definition with that id is present. They just evaluate to a pointer to the definition (with c4value type proplist). All engine functions which took an id get that id now from the proplist. Most should be converted to directly operate on a proplist instead.

> 2. How does inheriting work? Would it be possible to have objects which do not inherit from C4Object/C4Def, which one can not create in the game but use for inheritance? (-> Svens OOP suggestion)


Yes, that's the whole point. The technical term is prototype-based programming.

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill