K, it works (only the client), but, that's not my target. =)
I want create some items, like in an Shooter or RPG, and all players can collect them in your own inventory. As well back into the 3d world for the other players.
And, for the best way, I need the 'event_click'-event for this action.
The Locoweed Tutorial use events for the weapon-projectiles and ammos, but I do not understand how it works.
He set the emask of this Entitys on ENABLE_IMPACT and in the event function of this, there are no event_type lines.
Why?
I'am confused.
Locoweed Tutorial (ammo example):
function ammo_event()
{
if ((you.weapon == WEAPON_COMPRESSION_RIFLE) && (my.power_up_type == POWER_UP_AMMUNITION_CARTRIDGE))
{
if (you.ammunition_remaining < AMMO_MAX)
{
you.ammunition_remaining += int(random(15)) + 1;
if (you.ammunition_remaining > AMMO_MAX)
{
you.ammunition_remaining = AMMO_MAX;
}
ent_playsound (you, snd_power_up, 60);
send_skill(you.ammunition_remaining, 0);
ammo_cartridge_count -= 1; // 1 less cartridge in level
ent_remove(my); // remove ammo
}
}
else
{
.
.
.
}
function ammo_function()
{
my.ENABLE_IMPACT = ON; // event for hit by another moving entity
my.EVENT = ammo_event; // event function
.
.
.
}