Aller au contenu

Photo

SetEventLocation


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

#1
gordonbrown82

gordonbrown82
  • Members
  • 544 messages
 first this code is run: 
        location lGaleLocation = GetLocation(GetObjectByTag("gale_inquisitor"));
        vector vGaleOrientation = GetOrientationFromLocation(lGaleLocation);
        vector vGalePosition = GetPositionFromLocation(lGaleLocation);
        vector vFinalPosition = Vector(vGaleOrientation.x * 2.0 + vGalePosition.x, vGaleOrientation.y * 2.0 +      vGalePosition.y, vGalePosition.z);
        location lStunLocation;

         event evCustom = Event(EVENT_TYPE_CUSTOM_EVENT_03);
         SetEventLocation(evCustom, 4, lStunLocation);
         DelayEvent(2.0, GetObjectByTag("gale_inquisitor"), evCustom);

and then this:
case EVENT_TYPE_CUSTOM_EVENT_03)

        event eEvent = GetCurrentEvent();
        location lEventLocation = GetEventLocation(eEvent, 4);
        vector vStunPosition = GetPositionFromLocation(lEventLocation);
        Ability_ApplyLocationImpactVFX(90119, lEventLocation);
        DisplayFloatyMessage(GetHero(), VectorToString(vStunPosition), FLOATY_MESSAGE, 16777215, 2.0);
}

the purpose is to try and add the location lStunLocation to evCustom and then to be able to extract that location from the event when EVENT_TYPE_CUSTOM_EVENT_03 is run. the code above doesn't work however and the VFX is shown at 0,0,0 instead of the intended lStunLocation (i've left out the code that gives the lStunLocation for readability.

#2
TimelordDC

TimelordDC
  • Members
  • 923 messages
The one obvious thing is -

evCustom = SetEventLocation(evCustom, 4, lStunLocation);