Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by Zheka. 06/20/24 14:26
Lapsa's very own thread
by rki. 06/19/24 11:27
A simple game ...
by VoroneTZ. 06/18/24 10:50
Face player all the time ...
by bbn1982. 06/18/24 10:25
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (RealSerious3D, rvl, tomaslolo), 685 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
squik, AemStones, LucasJoshua, Baklazhan, Hanky27
19060 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
entity disappear #76548
06/04/06 03:33
06/04/06 03:33
Joined: May 2005
Posts: 222
T
tek Offline OP
Member
tek  Offline OP
Member
T

Joined: May 2005
Posts: 222
I have a character who shoots and I want a certain entity enemy that I made to dissapear when I shoot him, I don't know what code to use for this, does anyone here know ?
Just that the enemy dissapears not to be seen.
and if possible a code that he will dissapear after maybe 3 or 4 seconds
thank you

Re: entity disappear [Re: tek] #76549
06/04/06 03:52
06/04/06 03:52
Joined: Jun 2006
Posts: 96
Straight_Heart Offline
Junior Member
Straight_Heart  Offline
Junior Member

Joined: Jun 2006
Posts: 96
put this in the function that is called when the entity is shot

function get_shot
{

if(event_type==event_impact) // entity was hit by a bullet
{
sleep(4); //wait 4 seconds
my.invisible=on; //turn invisible
my.passable=on; //turn passable


}

}


//////////////////

action get_shot_ent // this is the enemy to be shot
{

my.enable_entity=on; //make the enemy sensible to getting hit with c_move
my.event=get_shot; // run this function when hit


}


You're not as unique as you think you are, try again.
Re: entity disappear [Re: Straight_Heart] #76550
06/04/06 04:55
06/04/06 04:55
Joined: May 2005
Posts: 222
T
tek Offline OP
Member
tek  Offline OP
Member
T

Joined: May 2005
Posts: 222
Thanks alot straight heart it worked.


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