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 (AndrewAMD, TipmyPip), 12,672 guests, and 5 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
having trouble with enable shoot #293266
10/10/09 09:54
10/10/09 09:54
Joined: Apr 2009
Posts: 141
dakilla Offline OP
Member
dakilla  Offline OP
Member

Joined: Apr 2009
Posts: 141
i am having a bit of a problem with enable/event shoot. here is the script:

function destroy_enemy()
{
effect(destroy_e, 100, my.x, nullvector);
kills += 1;
ent_remove(me);
}

action entity_to_be_destroyed()
...
my.emask |= ENABLE_SHOOT;
my.event = destroy_enemy;
...


when the entity has been 'shot' it runs the entity's event twice, producing an error. how do i only run the event once?
thanks


One day there will be an unfixable bug,
That day is not today.
Re: having trouble with enable shoot [Re: dakilla] #293270
10/10/09 10:14
10/10/09 10:14
Joined: Apr 2006
Posts: 624
DEEP 13
badapple Offline
User
badapple  Offline
User

Joined: Apr 2006
Posts: 624
DEEP 13
function destroy_enemy()
{
//this line should do it
my.event = NULL;

effect(destroy_e, 100, my.x, nullvector);
kills += 1;
//wait one frame before remove
wait(1);
ent_remove(me);
}

Re: having trouble with enable shoot [Re: badapple] #293274
10/10/09 11:53
10/10/09 11:53
Joined: Apr 2009
Posts: 141
dakilla Offline OP
Member
dakilla  Offline OP
Member

Joined: Apr 2009
Posts: 141
thanks alot!


One day there will be an unfixable bug,
That day is not today.

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