Gamestudio Links
Zorro Links
Newest Posts
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
1 registered members (AndrewAMD), 1,089 guests, and 2 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
Is it allowed to remove pointer in action #347891
11/20/10 20:26
11/20/10 20:26
Joined: Aug 2010
Posts: 26
J
JHA Offline OP
Newbie
JHA  Offline OP
Newbie
J

Joined: Aug 2010
Posts: 26
If I create entity

ent_ptr=ent_create("ball.mdl",Pos,Ent_Action);

and then in the action I have for example

action Ent_Action()
while(1)
{
if(me.z<100)
ent_remove(me);
wait(1);
}

Shouldn't above function remove entity ok? I cannot get it work? Any ideas

Re: Is it allowed to remove pointer in action [Re: JHA] #347894
11/20/10 20:51
11/20/10 20:51
Joined: Apr 2005
Posts: 4,506
Germany
F
fogman Offline
Expert
fogman  Offline
Expert
F

Joined: Apr 2005
Posts: 4,506
Germany
while(me)
{
if(me.z<100)
{
ent_remove(me);
me = NULL;
}
wait(1);
}

should work




no science involved
Re: Is it allowed to remove pointer in action [Re: fogman] #347897
11/20/10 21:13
11/20/10 21:13
Joined: Aug 2010
Posts: 26
J
JHA Offline OP
Newbie
JHA  Offline OP
Newbie
J

Joined: Aug 2010
Posts: 26
Thanks it worked


Moderated by  HeelX, Spirit 

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