Ok, so i want the spell (Call Lightning) to Apper/Cast after the player steps on the "Encounter Trigger" to spawn a monster into the area. But not to deal damage to either the monster or the player.
So to fix it up, the player steps on the area where the trigger is, to there far left and right two huge monsters are spawned and when they enter the area thats when i want "Call Lightning" to be Cast/Appear near the area with the monster.
If anyone can help. it would be great.
OnEnter/OnSpawn
Débuté par
Omega27
, août 07 2011 09:28
#1
Posté 07 août 2011 - 09:28
#2
Posté 07 août 2011 - 09:59
You do not want to cast the spell, you just want to use the visual effect.
effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_M);
effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_M);
#3
Posté 07 août 2011 - 10:39
void main()
{
object oPC = GetEnteringObject();
location lSpawn1 = GetLocation(GetWaypointByTag("your_wp_tag1"));
location lSpawn2 = GetLocation(GetWaypointByTag("your_wp_tag2"));
if (!GetIsPC(oPC))
return;
object oSpawn1 = CreateObject(OBJECT_TYPE_CREATURE, "your_creature_resref", lSpawn1);
object oSpawn2 = CreateObject(OBJECT_TYPE_CREATURE, "your_creature_resref", lSpawn2);
/*
Try the VFX without the delay first. If the timing is off, then comment out the first two lines and uncomment
the two lines with the Delay. You'll have to adjust the delay timer to suit the effect you are trying to achieve.
*/
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_LIGHTNING_M), oSpawn1);
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_LIGHTNING_M), oSpawn2);
//DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_LIGHTNING_M), oSpawn1));
//DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_LIGHTNING_M), oSpawn2));
}
{
object oPC = GetEnteringObject();
location lSpawn1 = GetLocation(GetWaypointByTag("your_wp_tag1"));
location lSpawn2 = GetLocation(GetWaypointByTag("your_wp_tag2"));
if (!GetIsPC(oPC))
return;
object oSpawn1 = CreateObject(OBJECT_TYPE_CREATURE, "your_creature_resref", lSpawn1);
object oSpawn2 = CreateObject(OBJECT_TYPE_CREATURE, "your_creature_resref", lSpawn2);
/*
Try the VFX without the delay first. If the timing is off, then comment out the first two lines and uncomment
the two lines with the Delay. You'll have to adjust the delay timer to suit the effect you are trying to achieve.
*/
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_LIGHTNING_M), oSpawn1);
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_LIGHTNING_M), oSpawn2);
//DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_LIGHTNING_M), oSpawn1));
//DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_LIGHTNING_M), oSpawn2));
}
#4
Posté 07 août 2011 - 09:21
To Lightfoot and Pstemarie, im still a bit new at scripting. So with this do i need to make my own script from scratch? Or is there something i needto edit.I have something similar like this with VFX during a conversation.
#5
Posté 07 août 2011 - 11:20
Use the script Pstemarie provided add it to a triggers onenter, ensure that you have 2 waypoints laid out and their tags in the indicated spots, also ensure you have the critter resref in the indicated spots in the above script and you should be good.
#6
Posté 07 août 2011 - 11:47
Baragg wrote...
Use the script Pstemarie provided add it to a triggers onenter, ensure that you have 2 waypoints laid out and their tags in the indicated spots, also ensure you have the critter resref in the indicated spots in the above script and you should be good.
What Baragg said...
#7
Posté 08 août 2011 - 03:51
Thanks for the help guys.





Retour en haut






