Gamestudio Links
Zorro Links
Newest Posts
Z9 getting Error 058
by jcl. 07/22/26 06:42
ZorroGPT
by TipmyPip. 07/21/26 17:54
New Zorro version 3.11
by jcl. 07/21/26 13:42
Lapsa's very own thread
by Lapsa. 07/18/26 13:40
Purchase A8 full licence version
by ukgamer. 07/17/26 05:52
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (TipmyPip, 1 invisible), 1,395 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
riggi89, shuhari, KD1990, Ephraim, Student_64151
19223 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
empty pointer after level_load #130615
05/18/07 19:40
05/18/07 19:40
Joined: Mar 2005
Posts: 969
ch
Loopix Offline OP
User
Loopix  Offline OP
User

Joined: Mar 2005
Posts: 969
ch
Heya!

I'm having troubles with empty pointers after level_load...namely within these lines:
Code:
mtl.skill1 = pixel_for_vec(vector((d3d_fogcolor1.blue*ent_terrain.terr_fogcol_fac)+ent_terrain.terr_add_blue,(d3d_fogcolor1.green*ent_terrain.terr_fogcol_fac)+ent_terrain.terr_add_green,(d3d_fogcolor1.red*ent_terrain.terr_fogcol_fac)+ent_terrain.terr_add_red), 100, 8888);	
mtl.skill2 = pixel_for_vec(vector(ent_terrain.terr_amb_fac*150,ent_terrain.terr_amb_fac*150,ent_terrain.terr_amb_fac*150),100,8888);



A "while(!ent_terrain){wait(1);}" after the level_load diden't help in this case.

Any ideas?

Thanks!

Re: empty pointer after level_load [Re: Loopix] #130616
05/18/07 20:01
05/18/07 20:01
Joined: Mar 2005
Posts: 969
ch
Loopix Offline OP
User
Loopix  Offline OP
User

Joined: Mar 2005
Posts: 969
ch
Ok...I found out that if I set "material.enable_render = on" instead of "material.enable_view = on" it works. But meterial.enable_render slows down the fps

Is there a workaround to "reload" mtl.skills (in conection with entity pointers) after level_load...without having to use material.enable_render = on ??

Thanks!

Re: empty pointer after level_load [Re: Loopix] #130617
05/19/07 05:00
05/19/07 05:00
Joined: Oct 2003
Posts: 702
Z
zazang Offline
User
zazang  Offline
User
Z

Joined: Oct 2003
Posts: 702
I think you can add this line "while(!ent_terrain){wait(1);}"
at the start of the function that causes error,instead of
placing them after level_load.


I like good 'views' because they have no 'strings' attached..
Re: empty pointer after level_load [Re: zazang] #130618
05/19/07 12:21
05/19/07 12:21
Joined: Mar 2005
Posts: 969
ch
Loopix Offline OP
User
Loopix  Offline OP
User

Joined: Mar 2005
Posts: 969
ch
That won't work....not for initializing a material as event in the material script

Re: empty pointer after level_load [Re: Loopix] #130619
05/19/07 12:28
05/19/07 12:28
Joined: Oct 2003
Posts: 702
Z
zazang Offline
User
zazang  Offline
User
Z

Joined: Oct 2003
Posts: 702
oh I see...how about placing this line "while(!ent_terrain){wait(1);}"
just before you attach the material to your entity..like

..
while(!ent_terrain){wait(1);}
my.material = mtl;
..

cheers
zazang


I like good 'views' because they have no 'strings' attached..

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1