Help with OnEnter Script
#1
Posté 18 décembre 2010 - 08:40
What I was wanting was a script that does the follows;
OnEnter the starter map ---> If the PCs XP = 1 --> Nothing happens for three seconds (3 sec pause) then PC ported to (TAG OF WAYPOINT).
NOTE: If the XP > 1 noting happens.
I don't know how to make the delay for 3 seconds ... it automaticly ports the PC right away.
I thank you in advance for all help offered.
#2
Posté 18 décembre 2010 - 09:17
void main()
{
object oEntering = GetEnteringObject();
object oTarget = GetWaypointByTag("TAG_OF_WAYPOINT_HERE");
location lTarget = GetLocation(oTarget);
if (!GetIsPC(oEntering)) return;
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
if (GetXP(oEntering, >= 1))
{
while (GetIsObjectValid(oTarget))
{
AssignCommand(oEntering, ClearAllActions());
DelayCommand(3.0, AssignCommand(oEntering, ActionJumpToLocation(lTarget)));
oTarget=GetNextFactionMember(oEntering, FALSE);
}
}
}
FP!
Modifié par Fester Pot, 18 décembre 2010 - 09:19 .
#3
Posté 18 décembre 2010 - 09:51
if (GetXP(oEntering, >= 1))
So I tried replaing the line with the line
if (GetHitDice(oPC) > 1) return;
which shows as ERROR also :\\
#4
Posté 18 décembre 2010 - 10:12
void main()
{
object oEntering = GetEnteringObject();
object oTarget = GetWaypointByTag("TAG_OF_WAYPOINT_HERE");
location lTarget = GetLocation(oTarget);
int nCurrentXP = GetXP(oEntering);
if (!GetIsPC(oEntering)) return;
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
if (nCurrentXP >= 1)
{
while (GetIsObjectValid(oTarget))
{
AssignCommand(oEntering, ClearAllActions());
DelayCommand(3.0, AssignCommand(oEntering, ActionJumpToLocation(lTarget)));
oTarget=GetNextFactionMember(oEntering, FALSE);
}
}
}
FP!
#5
Posté 18 décembre 2010 - 10:50
if (nCurrentXP >= 1)
to:
if(nCurrentXP == 1)
The OP said they wanted the PC to only jump if XP equals exactly 1.
#6
Posté 19 décembre 2010 - 03:10
I have been out for a while though.'
#7
Posté 19 décembre 2010 - 07:14
if(GetXP(oPC) > 0) or at least something like it
... jasper taught me that
hi jasper.... *waves*
Modifié par zero-feeling, 19 décembre 2010 - 07:15 .
#8
Posté 19 décembre 2010 - 02:10





Retour en haut







