Gamestudio Links
Zorro Links
Newest Posts
New Zorro version 1.83
by jcl
Today at 16:24
Unfreed in -diag
by 3run
Today at 10:30
About STRING* and char
by 20BN
Today at 09:40
I need help
by evangelos
Today at 02:37
Draw stuff from other thread
by Superku
Yesterday at 22:00
Optimize Stop with multi Asset strategy
by Dalla
Yesterday at 21:48
cloth ?
by 3run
Yesterday at 20:48
AUM Magazine
Latest Screens
Evonet Beta v1.0 : Online Project Development Template
Lake scene
Forgotten Tales - Demo version
RPG PARTY
Who's Online
16 registered (easyX, 3run, AndrewAMD, alibaba, FirasTaji, jenGs, 5 invisible), 492 Guests and 3 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
FirasTaji, zentrader, Fenry, DJ_Algo, tang
18005 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: 480
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;
_________________________
"All i've done is set myself free." -Michael (Gabriel-2007)

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

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




_________________________
"All i've done is set myself free." -Michael (Gabriel-2007)

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