Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (TipmyPip, 1 invisible), 18,789 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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 | 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