Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 666 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
terrain PASSABLE flag does not work #444581
08/14/14 12:29
08/14/14 12:29
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline OP
Expert
sivan  Offline OP
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
Hi,

I just tested in my editor why ground/water terrain identification does not work properly when wmb is compiled by WED, while it does work when I compile from my editor. I'm sure it was fine when I made this script in Sept-Oct 2013, using an older engine version.

Apparently, when PASSABLE flag is checked in WED, the temporary $$m file is correct, the 10th flag measured from last one is 1, but somehow when cycling through all the entities on level load, it is detected as unset. (temporarily I check file name to include "water" which is a crap solution) The same check works when I compile from my editor.

please test it whether it works or not, thanks!


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: terrain PASSABLE flag does not work [Re: sivan] #444603
08/14/14 22:34
08/14/14 22:34
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
I assume your editor is generating wmb files, too? Have you compared possible command line options?
Can't you use actions for terrains which are supposed to be PASSABLE? Don't forget there is ent_type() too.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: terrain PASSABLE flag does not work [Re: Superku] #444619
08/15/14 10:15
08/15/14 10:15
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline OP
Expert
sivan  Offline OP
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
it uses the same compiler by 1st generating the .$$m file from script, then the same build window opens up, the only difference is that I set by script some level related stuff, and set the 1st 20 skills for entities from script. everything works fine.

after loading the level by level_load(), my script cycles through all the entities, checking for terrains by ent_type, works, but then the "if (is(temp_ent, PASSABLE))" fails in case of a WED output, and identifies it as a ground terrain, but the PASSABLE flag was set both in WED and my editor for the water hmp entity, and also clearly can be seen in both $$m files.

Last edited by sivan; 08/15/14 10:16.

Free world editor for 3D Gamestudio: MapBuilder Editor
Re: terrain PASSABLE flag does not work [Re: sivan] #444620
08/15/14 11:13
08/15/14 11:13
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline OP
Expert
sivan  Offline OP
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
here is a short corresponding script:


Code:
if (file_exists_onepath(temp_str))
		{
			ENTITY* temp_ent = ent_create( NULL , nullvector , NULL);
			
			temp_ent = ent_next(NULL); 				// get first entity
			
			int counter_int = 0; 						// for progress bar
			
			while (temp_ent) 								// repeat until there are no more entities
			{
				// terrains - assign only actions when they are unassigned - needed for terrain editing!
				if (ent_type(temp_ent) == (var)4)
					{
//						printf("terrain founc : %s", _chr(str_for_entfile(NULL, temp_ent)));
						
						if (is(temp_ent, PASSABLE))
							{
								wait(1);									
//								printf("Water found : %s", _chr(str_for_entfile(NULL, temp_ent)));
//								if (proc_status(TerrHmp_WaterAction) == (var)0)
									{
										my = temp_ent;			// must be set!	MB.2.31 fix
										TerrHmp_WaterAction();																
									}
							}
						else
							{
								wait(1);	
//								printf("Ground found : %s", _chr(str_for_entfile(NULL, temp_ent)));	
//								if (proc_status(TerrHmp_GroundAction) == (var)0)
									{
										my = temp_ent;			// must be set!	MB.2.31.fix
										TerrHmp_GroundAction();
									}
							}	
					}



Free world editor for 3D Gamestudio: MapBuilder Editor

Moderated by  HeelX, rvL_eXile 

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