|
2 registered members (AndrewAMD, 1 invisible),
4,270
guests, and 0
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Predefined Materials - Salvaging and converting an old project
#415107
01/13/13 21:57
01/13/13 21:57
|
Joined: Jan 2013
Posts: 63
Loremaster
OP
Junior Member
|
OP
Junior Member
Joined: Jan 2013
Posts: 63
|
Hello everybody, I try to recover an old 5000-Lines-Plus project from 2003 in A6 / C-Script. In the end I want to convert to Lite-C, but before, I have to bridge the C-Script-Gap between A6 and A8. So far I was able to remove every error, but now I ran into a wall. A6 knew "predefined materials", as described here: At the moment there are 9 predefined materials that are automatically assigned to entities dependent on their type and flags, unless the entity has an own material. You can change the overall lighting of a level by adjusting the properties of those materials:
mat_flat for flat map surfaces mat_shaded for shaded map surfaces mat_terrain for terrain entities mat_model for model entities mat_sprite for sprite entities mat_particle for particles (not yet used) mat_sky for dome or scene sprites (not yet used) mat_metal for any entity with metal flag set mat_unlit for any entity with unlit flag set mat_shadow for defining stencil shadow transparency and diffuse color Unfortunately, though A7 as the step in between showed no problems with that (I tested it with the A7 version available on Conitec), A8 gets the hickups. This code appears to be faulty now:
if (mca_matnummer == 4)
{
str_cpy(mca_MatNameStr, "mat_model");
mca_Object.material = mat_model;
mca_Material = mat_model;
}
It results in matcal.wdl 359:0 () Parameter unknown mat_model So these predefined materials are no longer supported? How can I fix that in C-Script?
|
|
|
Re: Predefined Materials - Salvaging and converting an old project
[Re: Loremaster]
#415108
01/13/13 22:06
01/13/13 22:06
|
Joined: Jul 2004
Posts: 785 Serbia
Iglarion
User
|
User
Joined: Jul 2004
Posts: 785
Serbia
|
|
|
|
Re: Predefined Materials - Salvaging and converting an old project
[Re: Loremaster]
#442930
07/06/14 02:20
07/06/14 02:20
|
Joined: Jun 2014
Posts: 97 Lagos, Nigeria
tolu619
Junior Member
|
Junior Member
Joined: Jun 2014
Posts: 97
Lagos, Nigeria
|
I don't get it. Doesn't mtl_model affect ALL models? This line of code is taken straight out of the manual yet it doesn't work.
#include <mtlFX.c>
...
action toon_warrior()
{
my.skill41 = floatv(50); // Shadow
my.skill42 = floatv(50); // Edgewidth
my.skill43 = floatv(50); // Threshold
my.skill44 = floatv(50); // Smooth
my.material = mtl_toon;
...
}
After I updated my gamestudio to version 8.10.3, I had to comment out all such lines because while the game still runs, the moment it tries to create any entity that has any material assignment within its code, I get an Error E1520 that says "Structs inconsistent - MATERIAL".
|
|
|
Re: Predefined Materials - Salvaging and converting an old project
[Re: Superku]
#443502
07/17/14 18:37
07/17/14 18:37
|
Joined: Jun 2014
Posts: 97 Lagos, Nigeria
tolu619
Junior Member
|
Junior Member
Joined: Jun 2014
Posts: 97
Lagos, Nigeria
|
The files from the include folder should never be copied (or modified) to your own folder (-> 2) ). Really? So what am I supposed to do? If I delete all the include files from my game's folder, will the game use the files as they are in the include folder?
|
|
|
|