Quest persistence work
Quest persistence work.
This commit is contained in:
@@ -1,11 +1,28 @@
|
||||
// Port PC
|
||||
///////////////////////////////////////////////////
|
||||
// Clears all actions and jumps the caller to the provided object.
|
||||
// (Useful when this needs to be delayed.)
|
||||
void ClearAndJumpToObject(object oDestination);
|
||||
|
||||
void ClearAndJumpToObject(object oDestination)
|
||||
{
|
||||
ClearAllActions();
|
||||
JumpToObject(oDestination);
|
||||
}
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastUsedBy(); // Get the user of the object
|
||||
object oDest = GetObjectByTag("pirate1"); // way point tag.
|
||||
if(GetIsPC(oPC))
|
||||
{
|
||||
AssignCommand(oPC,JumpToObject(oDest));
|
||||
}
|
||||
effect eVFX;
|
||||
object oTarget;
|
||||
|
||||
// Get the creature who triggered this event.
|
||||
object oPC = GetLastUsedBy();
|
||||
|
||||
// Find the location to which to teleport.
|
||||
oTarget = GetWaypointByTag("WP_PIRATE01");
|
||||
|
||||
// Teleport the PC.
|
||||
eVFX = EffectVisualEffect(VFX_IMP_UNSUMMON);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oPC);
|
||||
DelayCommand(1.0, AssignCommand(oPC, ClearAndJumpToObject(oTarget)));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user