Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

New Premium Module: Tyrants of the Moonsea! Read More
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

Placeables to cast spells

ForgeForge Member Posts: 4
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

Sign In or Register to comment.