Gamestudio Links
Zorro Links
Newest Posts
Removing outliers from files
by jcl. 12/02/26 15:09
SGT_FW
by Aku_Aku. 11/30/26 08:19
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (AndrewAMD, BrainSailor, 1 invisible), 11,474 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 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 | 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