Gamestudio Links
Zorro Links
Newest Posts
Windows permission issues
by HellThunder
Today at 21:51
CSVToHistory.c
by Dalla
Today at 20:42
Position Close not possible
by MatPed
Today at 18:49
Options trading questions
by Zheka
Today at 17:36
Published Gamestudio Games?
by jumpman
Today at 08:05
New Zorro version 1.88
by DdlV
Yesterday at 20:32
Possible to extend assetHistory with own source?
by jcl
Yesterday at 16:32
AUM Magazine
Latest Screens
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Evonet Beta v1.0 : Online Project Development Template
Lake scene
Who's Online
17 registered (Jason_Rogers, alibaba, dmac, AndrewAMD, HellThunder, Dalla, jumpman, 3run, 3 invisible), 505 Guests and 3 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
cepturion, Mon3y, vincitytaymo, just, XJohnny_Hoffmann
18057 Registered Users
Page 4 of 4 < 1 2 3 4
Topic Options
Rate This Topic
#398447 - 04/02/12 11:01 Re: Save as .wmb [Re: sivan]
Emre Offline
Senior Member

Registered: 07/28/07
Posts: 482
Loc: 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;

Top
#473239 - 06/23/18 05:57 Re: Save as .wmb [Re: Emre]
Emre Offline
Senior Member

Registered: 07/28/07
Posts: 482
Loc: 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
}





Top
Page 4 of 4 < 1 2 3 4


Moderator:  HeelX, Lukas, Rei_Ayanami, 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