Hello everybody!
I was wondering if somebody documents the changes to the C4Script.
Something like a "Script changes list" (and maybe a "Planned changes list") would be really helpfull I think.
Old and new developers could quickly check the list and adjust old scripts.
Of course, this only makes sense if the changes aren't toooo big (they aren't, right? =)
I was wondering if somebody documents the changes to the C4Script.
Something like a "Script changes list" (and maybe a "Planned changes list") would be really helpfull I think.
Old and new developers could quickly check the list and adjust old scripts.
Of course, this only makes sense if the changes aren't toooo big (they aren't, right? =)
c1c542ea4b8c:
4cfa1c35dc2f:
5e902ff52ab4:
6df28415dac6:
4870be5588d7:
43a154afa674:
- Added keyword 'nil', representing an uninitialized value; nil is only equal to itself.
4cfa1c35dc2f:
- Removed target object parameter of several functions that defaulted to
this
anyway (for a full list see changed docs files in the changeset). Calling those functions outside of object context raises an exception at runtime. - Renamed GetColorDw to GetColor and SetColorDw to SetColor. Old functions have been removed completely.
5e902ff52ab4:
- Removed numbered Vars, Locals, Globals.
6df28415dac6:
- Associative arrays! (We call them proplist. You'll probably not need the prototyping, so I'm not explaining this here.)
var data = { key: "value", key2: 47 }; data["key2"] == 47
- Objects and definitions are now proplists. Actmaps are proplists. Most of it is overridable at runtime. See dynamite script or Clonk script for examples.
4870be5588d7:
- Post-test loop "do-while" implemented.
43a154afa674:
- Allow negative subscripts into arrays.
foo[-1] == foo[GetLength(foo)-1]
I'm currently not aware of any planned C4Script changes that will happen in the near future. There might be unplanned changes though, depending on what is needed to make new features work.
I'll probably replace named local variables with proplists. The namespace collisions between them and the properties interfacing with the engine are unfortunate, but probably worth the simplification. And the Definition()-Function will go away, it's just too hard to maintain in the face of savegames. Instead, I'll add initialization of local variables/properties. That's a bit more work on the script side, but will make savegame restore way easier.
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill