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
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (degenerate_762), 1,128 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 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 | 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