righteo hi guys im new to this forum.
so ive got an image ( its an orange square so far ) and i have converted it into a material i think i done it correctly then i put this inot my csv
material,hud_test
then into my makemod.bat i put
xcopy images ..\..\raw\images /SY
xcopy materials ..\..\materials /SY
7za a -r -tzip z_mp_mod.iwd images
so after all this i made a gsc called hud_image.gsc which inside has the following code
init()
{
precacheShader( "hud_test" );
level thread onPlayerConnect();
}
onPlayerConnect()
{
while(1)
{
level waittill("connecting", player);
player thread onPlayerSpawned();
}
}
onplayerspawned()
{
self endon("disconnect");
while(1)
{
self waittill("spawned_player");
self.hud_image = newHudElem(self);
self.hud_image.alginX = "center";
self.hud_image.alignY = "middle";
self.hud_image.x = 50;
self.hud_image.y = 200;
self.hud_image.alpha = 1;
self.hud_image.fontScale = 1.4;
self.hud_image.hideWhenInMenu = true;
self.hud_image setshader("hud_test", 50, 50);
}
}
so inside this i have precached the hud_test material as i think i should precache it then i made the element to hold it.
The init() is called from globallogic under onstartgametype with this thread scripts\hud_image::init();
but the big problem is when im ingame and spawned my image isnt there it is a green square with little purple squares in it which what i think means no image.
so can anyone help