Is it possible to make a placeable, like a pedestal to cast a spell into a waypoint?
Tried using the UserDefinedEvent for this, and SignalEvent but couldn't get it to work.
It worked using a creature, but not with a normal placeable.
Code below:
void main()
{
object oSelf = OBJECT_SELF;
object oLoc = GetNearestObjectByTag("Spawn_loc");
location lLoc = GetLocation(oLoc);
int nSpell = SPELL_RAY_OF_FROST;
int nEvent = GetUserDefinedEventNumber();
switch(nEvent)
{
case(14):
{
ActionCastSpellAtLocation(nSpell, lLoc, TRUE, TRUE);
break;
}
}
}
Put this into the OnUserDefined script for the pedestal.
SignalEvent command for case 14 is on a conversation with an altar.
Code below:
SignalEvent(GetNearestObjectByTag("Pedestal"),EventUserDefined(14));
Is there a way to make this work?
I tried also tweaking with the AssignCommand but it didn't produce results either.
Thank you in advance.
Comments
Am I missing something here, or cant placeables cast spells?
I can simulate a beam, etc by EffectVisualEffect and ApplyEffectToObject or location.
Created an user defined event for the visuals. No spells involved.
Thank you everybody for your answers and help.