Aller au contenu

Photo

Activating Rod Of Wonder with a trigger


  • Veuillez vous connecter pour répondre
1 réponse à ce sujet

#1
Badwater

Badwater
  • Members
  • 113 messages
I would like to set up a trigger so that when a character crosses it, the PC gets the same effect as if Rod of Wonder was used on the PC. It would seem that placing x0_s3_rodwonder OnEnter is not sufficient. What do I need to do to get a trigger to execute a default script like this?

#2
Failed.Bard

Failed.Bard
  • Members
  • 774 messages
void main()

 object oPC = GetEnteringObject();
 object oCaster = GetNearestObject (OBJECT_TYPE_PLACEABLE);
 // Needed if PC only 
 if (!GetIsPC (oPC)) return;

AssignCommand (oCaster, ActionCastSpellAtObject (499, oPC, METAMAGIC_ANY, TRUE, 0, PROJECTILE_PATH_TYPE_DEFAULT, TRUE));
}


  I didn't have any luck trying to get the trigger to cast it, but it will work with either the nearest placeable being the caster, or the PC themselves.