Gamestudio Links
Zorro Links
Newest Posts
How to select between IB accounts by script?
by AndrewAMD. 06/13/26 15:44
Zorro tutorial ideas?
by AndrewAMD. 06/13/26 15:01
Zorro 3.01 recoded MMI function issue
by 11honza11. 06/13/26 11:40
Max Number of Strategies in /Strategy folder
by Martin_HH. 06/12/26 08:50
Stooq now requires an API key
by AndrewAMD. 06/11/26 17:55
Z9 getting Error 058
by k_ivan. 06/10/26 14:38
ZorroGPT
by TipmyPip. 06/10/26 13:07
Z12 live performance
by alx. 06/09/26 20:42
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 2,164 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Student_64151, Koti, curry, DeepxKalsi, Samed
19219 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