Gamestudio Links
Zorro Links
Newest Posts
How is this possible ? winning percentage 100%
by MatPed
50 minutes 13 seconds ago
Next contest?
by Michael_Schwarz
Today at 10:33
Help! 1.88.6 Crashes <5 minutes after clicking Trade!
by jcl
Today at 10:28
WFO
by jcl
Today at 10:27
TA-Lib not updated
by jcl
Today at 10:24
CyberCycle Adaptive Cy
by OptimusPrime
Today at 05:26
video memory and d3d_texfree
by Superku
Yesterday at 11:17
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
16 registered (CocaCola, kvm, MatPed, Iglarion, AndrewAMD, brax, Michael_Schwarz, Mio, 2 invisible), 454 Guests and 3 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
fandi, Deedee, avgtrader, aventador, gokhanuck
18103 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: 486
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: 486
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