Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
hpl3:engine:script [2013/08/22 12:06] thomas [Global Functions] |
hpl3:engine:script [2013/12/12 08:58] thomas [Saving] |
||
---|---|---|---|
Line 22: | Line 22: | ||
||m|| a member variable || class cMyClass {\\ int mlMember;\\ } || | ||m|| a member variable || class cMyClass {\\ int mlMember;\\ } || | ||
||g|| a global variable, defined outside of a class or function.|| int glMyGlobal; \\ class cMyClass {} || | ||g|| a global variable, defined outside of a class or function.|| int glMyGlobal; \\ class cMyClass {} || | ||
+ | ||id|| this is for tID type.|| tID m_idEntity || | ||
a variable name always starts with a lower case letter, so anything of type not specified must start with a lower case word. Example: | a variable name always starts with a lower case letter, so anything of type not specified must start with a lower case word. Example: | ||
Line 336: | Line 337: | ||
<code c++>[nodatasave] cMyClass@ mNoSaveHandle; | <code c++>[nodatasave] cMyClass@ mNoSaveHandle; | ||
</code> | </code> | ||
+ | |||
+ | However it is almost always better to use the tID type for these situations! | ||
Line 377: | Line 380: | ||
C++ scriptable classes with classes in can not be abstract ones. It must always be the top class in the hierarchy that is used and saved. | C++ scriptable classes with classes in can not be abstract ones. It must always be the top class in the hierarchy that is used and saved. | ||
+ | |||
+ | ===== Specific Guidelines ===== | ||
+ | |||
+ | ==== Helper Functions ==== | ||
+ | |||
+ | * Helper functions should use degrees, not radians |