okay well I want to make a race restriction on my module, HOWEVER I am not entirely sure how to go about it and I do not want to ban every race entirely so I had decided to create a small script (with help of Lilac) to make the object it has a conversation with if the player is the appropriate race (for now only allowing humans & the subrace werewolf/vampire), or when they got a widget that allows them to play the race, then it will teleport the player into the game.
here is the script but when I put the restriction in then the porting does not work. It is possibly something entirely simply I am missing here >.<
void ClearAndJumpToObject(object oDestination);void ClearAndJumpToObject(object oDestination){ClearAllActions();JumpToObject(oDestination);}void main(){effect eVFX;object oTarget;// Get the PC who is in this conversation.object oPC = GetPCSpeaker();// If the PC is not a certain race.if ( GetRacialType(oPC) != RACIAL_TYPE_DWARF &&GetRacialType(oPC) != RACIAL_TYPE_ELF &&GetRacialType(oPC) != RACIAL_TYPE_GNOME &&GetRacialType(oPC) != RACIAL_TYPE_HALFLING &&GetRacialType(oPC) != RACIAL_TYPE_HALFELF &&GetRacialType(oPC) != RACIAL_TYPE_HALFORC ){// Find the location to which to teleport.oTarget = GetWaypointByTag("WP_INGAME");// Teleport the PC.eVFX = EffectVisualEffect(VFX_IMP_UNSUMMON);ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oPC);DelayCommand(3.0, AssignCommand(oPC, ClearAndJumpToObject(oTarget)));}





Retour en haut







