skycube change

Posted By: Vyshess

skycube change - 10/04/14 08:26

Hi!
just a little problem.
Does anybody know how I can change the skycube by loading a new level? the manuel says that this can be made by using "ent_morph"
but I don`t know how to write it correct.
Code:
ENTITY* sky =
{
 type = "skycube_level01+6.tga";
 flags2 = SKY | CUBE | SHOW;
}


function level_teleport()
{
 if(level_select == 0)
 {
  ...// at this point the skycube should be changed
  level_load("level01.wmb");
 wait(3);
  }
}
...



what exactly must be writen befor the level load?

ent_morph(sky,skycube_level01) ?
sky = ent_morph(my,skycube_level01)?

doesn`t work. it appears a strange flat 3d objekt at the new level. wtf?
Posted By: Iglarion

Re: skycube change - 10/04/14 09:44

You must morph entity after level loading, not before. In your case, you change the sky in the old level.
Just use ent_morph(sky,"skycube_level02+6.tga"); after a new level is created.
Posted By: Vyshess

Re: skycube change - 10/04/14 14:11

THX!! works perfect now!
© 2024 lite-C Forums