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
5 registered members (AndrewAMD, alibaba, Konsti, 2 invisible), 1,418 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
ent_remove doesn't remove #128491
05/07/07 20:01
05/07/07 20:01
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline OP
User
JazzDude  Offline OP
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
Why doesn't this work?

Code:

ACTION Player
...
ent_create("knife.mdl",my.x,attach_weapon);
if(my.health <= 0){ent_remove("knife.mdl");}
...



Re: ent_remove doesn't remove [Re: JazzDude] #128492
05/07/07 20:16
05/07/07 20:16
Joined: Dec 2005
Posts: 252
MyOwnKingdom
nipx Offline
Member
nipx  Offline
Member

Joined: Dec 2005
Posts: 252
MyOwnKingdom
because you have to use a pointer for ent_remove.

==>>

Code:

//now you is the pointer to my knife model
you=ent_create("knife.mdl",my.x,attach_weapon);

//now remove you and you is the knife
ent_remove(you);




should work


nipx

Re: ent_remove doesn't remove [Re: nipx] #128493
05/07/07 20:21
05/07/07 20:21
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline OP
User
JazzDude  Offline OP
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
Thanks, Nipx, but it didn't work. No error, tho.

Re: ent_remove doesn't remove [Re: JazzDude] #128494
05/07/07 20:24
05/07/07 20:24
Joined: Dec 2005
Posts: 252
MyOwnKingdom
nipx Offline
Member
nipx  Offline
Member

Joined: Dec 2005
Posts: 252
MyOwnKingdom
do you call any wait before you remove the model?


nipx

Re: ent_remove doesn't remove [Re: nipx] #128495
05/07/07 20:43
05/07/07 20:43
Joined: Aug 2002
Posts: 3,258
Mainz
oliver2s Offline
Expert
oliver2s  Offline
Expert

Joined: Aug 2002
Posts: 3,258
Mainz
Try this:

Code:
entity* ent_knife;

ACTION Player
...
ent_knife = ent_create("knife.mdl",my.x,attach_weapon);
if(my.health <= 0){ent_remove(ent_knife);}
...



Re: ent_remove doesn't remove [Re: oliver2s] #128496
05/07/07 21:10
05/07/07 21:10
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline OP
User
JazzDude  Offline OP
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
I appreciate the suggestions.

But that ornery knife just won't go away.
Perhaps the reason is in some other part of the script rather than the player action.

Re: ent_remove doesn't remove [Re: JazzDude] #128497
05/07/07 21:15
05/07/07 21:15
Joined: Nov 2006
Posts: 141
South Africa
quasarchangel Offline
Member
quasarchangel  Offline
Member

Joined: Nov 2006
Posts: 141
South Africa
Do some easy debugging. Use an snd_play() function to "hear" which functions are being run or which ifs are being entered. If you can't here the sound then you know its not getting to that point in the script.
Otherwise, post some more of your code.


God DID give us a manual on how to change this world...
Re: ent_remove doesn't remove [Re: quasarchangel] #128498
05/07/07 21:27
05/07/07 21:27
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline OP
User
JazzDude  Offline OP
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
I thing that's what beep() is for.

Thanks, guys. I found a workaround, or maybe a better way to do it.

I put the health condition in the attach_weapon action and that works.

Re: ent_remove doesn't remove [Re: JazzDude] #128499
05/07/07 21:28
05/07/07 21:28
Joined: Nov 2006
Posts: 141
South Africa
quasarchangel Offline
Member
quasarchangel  Offline
Member

Joined: Nov 2006
Posts: 141
South Africa
lol, no comment


God DID give us a manual on how to change this world...

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