Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 863 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 4 of 4 1 2 3 4
Re: Save as .wmb [Re: sivan] #398447
04/02/12 09:01
04/02/12 09:01
Joined: Jul 2007
Posts: 619
Turkey, Izmir
Emre Offline OP
User
Emre  Offline OP
User

Joined: Jul 2007
Posts: 619
Turkey, Izmir
Thanks!
Albedo and ambient are automatically saved by wed. My code working like so. laugh
That's simply wmb format and i can't change it. I can't add alpha value and using skill is good way for your editor.


As you know Albedo is saved as entity->albedo with my code. (Also ambient.) This can sometimes cause problems. You can set it default value as Wed.
file_var_write (wmb_handle,your.albedo);skipline;
file_var_write (wmb_handle,50);skipline;

file_var_write (wmb_handle,your.ambient);skipline;
file_var_write (wmb_handle,0);skipline;

Re: Save as .wmb [Re: Emre] #473239
06/23/18 03:57
06/23/18 03:57
Joined: Jul 2007
Posts: 619
Turkey, Izmir
Emre Offline OP
User
Emre  Offline OP
User

Joined: Jul 2007
Posts: 619
Turkey, Izmir
I realized something when i solved this problem. If the name of the model is longer than 8 characters, the model type must be set 7.

A similar code can be used.

Code:
str_for_entfile(tempstr,you);
				
if(str_len(tempstr)>12)//model name+4character for ".mdl"
{
yourtype+=1;// or whatever you want to use		
}



and there is no need put "ndef" for material if type is 7. So just close the line;

Code:
if(yourtype>0)
{

	file_var_write (wmb_handle,your.albedo);skipline;
	file_var_write (wmb_handle,0);skipline;//path
	file_var_write (wmb_handle,0);skipline;//attach
	//file_str_write (wmb_handle,"ndef"); skipline; // if no material put ndef
}





Page 4 of 4 1 2 3 4

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

Gamestudio download | chip programmers | 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