All special items in our mod are combined in one script "item_activate" that goes in "OnItemActivate" in module-events.
The part where the behaviour of the teleport item is declared goes like this:
if (GetTag (oItem) == "Teleporter")
{
AssignCommand(oSpieler, ActionStartConversation (oSpieler, "use_teleporter", TRUE));
}
This starts the conversation where you can choose where you want to teleport the target (the target can be yourself).
Every teleport-script goes like this:
void main()
{
object oPC = GetItemActivatedTarget();
object oTarget = GetWaypointByTag("WP_Arena_to_Gateway");
location lTarget = GetLocation(oTarget);
int iGender = GetGender(oPC);
effect eVisual01 = EffectVisualEffect(VFX_IMP_MAGIC_PROTECTION);
effect eVisual02 = EffectVisualEffect(VFX_DUR_GLOBE_INVULNERABILITY);
ClearAllActions();
if (iGender == GENDER_FEMALE)
{
PlaySound("vs_chant_necr_lf");
}
if (iGender == GENDER_MALE)
{
PlaySound("vs_chant_necr_lm");
}
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual01, oPC);
DelayCommand(1.8, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual02, oPC));
DelayCommand(3.2, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
}
But when two players are using the teleporter at the same time it happens that one chooses his destination but the other player gets teleported instead of him.
There must be a way ... but I don't know that...