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?
Activating Rod Of Wonder with a trigger
Débuté par
Badwater
, nov. 13 2011 11:36
#1
Posté 13 novembre 2011 - 11:36
#2
Posté 13 novembre 2011 - 12:54
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.
{
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.





Retour en haut






