Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, Ayumi, ozgur), 678 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Function called by Entity is terminated after Entity is removed? [Re: EvilSOB] #259229
04/04/09 21:04
04/04/09 21:04
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Code:
void print_lol(){
	while(1){
		printf("lol\n");
		wait(-.1);//print lol every 0.1 sec.
	}
}

action remove_me(){
	printf("ent_created");
	
	print_lol();//-> you mean this stops too?
	
	my.skill1=1000;
	while(me){
		my.skill1--;
		if(my.skill1==0){ 
			ent_remove(me);
			printf("ent removed");
		}
		wait(1);
	}
}

void main(){
	video_screen = 0;//dont open video device
	wait(1);
	level_load("");
	ent_create("cube.mdl",nullvector,remove_me);
}


yeah it stops... i demand explanation too.


3333333333
Re: Function called by Entity is terminated after Entity is removed? [Re: EvilSOB] #259230
04/04/09 21:06
04/04/09 21:06
Joined: Jan 2005
Posts: 605
Deutschland, NRW
G
garv3 Offline OP
User
garv3  Offline OP
User
G

Joined: Jan 2005
Posts: 605
Deutschland, NRW
Originally Posted By: EvilSOB
Hopefully SOMEONE can answer this cause it doesnt make sense to me, but it would
explain some odd behavious my actions sometimes give.
Yeah, it makes absolutely no sense! I wonder why I've never been stuck with this before. And maybe this is kind of a bug. Anyway - this behaviour is not correct not to mention logical.


GameStudio Version: A7 Pro v7.86
Re: Function called by Entity is terminated after Entity is removed? [Re: garv3] #259488
04/06/09 13:32
04/06/09 13:32
Joined: Jan 2005
Posts: 605
Deutschland, NRW
G
garv3 Offline OP
User
garv3  Offline OP
User
G

Joined: Jan 2005
Posts: 605
Deutschland, NRW
Ok, here is some of the original code...

The Action:
Code:
action EoR_aktion(){
	c_trace(vector(my.x+bauoptionen_gegner_scan_ausgangspunkt_gewaehlt[0],my.y+bauoptionen_gegner_scan_ausgangspunkt_gewaehlt[1],my.z+bauoptionen_gegner_scan_ausgangspunkt_gewaehlt[2]), vector(my.x+bauoptionen_gegner_scan_ausgangspunkt_gewaehlt[0],my.y+bauoptionen_gegner_scan_ausgangspunkt_gewaehlt[1],my.z-100), IGNORE_PUSH|IGNORE_ME|IGNORE_PASSABLE|IGNORE_SPRITES|IGNORE_CONTENT|USE_POLYGON);
	PARTICLE* bodentextur = ent_decal (spielfeld, baustellen_boden_tga, my.einheiten_reichweite*2, 0);
	my.einheiten_status = im_bau;
	[...]
	bodentextur_fuer_turm_steuern(bodentextur, me); //this line calls the function
	[...]
	EoR_mainFunktion(auge, balken1, balken2, balken3, balken4, balken5, balken6);
}
And the function:
Code:
function bodentextur_fuer_turm_steuern(PARTICLE* bodentextur, ENTITY* turm){
	set(bodentextur, TRANSLUCENT);
	bodentextur.alpha = 100;
	while (turm){
		bodentextur.lifespan = 16000;
		wait(1);
	}
	// The code below this line will never be executed. The function is terminated if the entity is removed
	debug1 = 1;
	while(bodentextur.alpha > 0){
		bodentextur.lifespan = 16000;
		bodentextur.alpha -= time_step;
		wait(1);
	}
	bodentextur.lifespan = 0;
}

So may someone please tell me why?!


GameStudio Version: A7 Pro v7.86
Re: Function called by Entity is terminated after Entity is removed? [Re: garv3] #259491
04/06/09 13:51
04/06/09 13:51
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Hey garv, I reckon this needs bumping to bugs IMHO.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Function called by Entity is terminated after Entity is removed? [Re: EvilSOB] #259494
04/06/09 14:08
04/06/09 14:08
Joined: Jan 2005
Posts: 605
Deutschland, NRW
G
garv3 Offline OP
User
garv3  Offline OP
User
G

Joined: Jan 2005
Posts: 605
Deutschland, NRW
I agree and will open a thread in the bug hunt section.


GameStudio Version: A7 Pro v7.86
Page 2 of 2 1 2

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