I'm trying to run a custom kismet event but I'm unable to attach it to my actor.
When I checked at run-time the GeneratedEvents array is empty!
My class extends directly from Actor:
and have the kismet event attached to it in the default properties
My kismet node is:
But when I try to pass through the GeneratedEvents the list is empty! There aren't even the normal events from actor such as touch and etc!
GeneratedEvents.Length is 0!
When I checked at run-time the GeneratedEvents array is empty!
My class extends directly from Actor:
PHP Code:
class DarkRaidSquad extends Actor
placeable;
PHP Code:
DefaultProperties
{
Begin Object Class=SpriteComponent Name=Sprite
Sprite=Texture2D'EditorResources.Ambientcreatures'
HiddenGame=true
HiddenEditor=false
AlwaysLoadOnClient=False
AlwaysLoadOnServer=False
SpriteCategoryName="DarkRaidSquad"
End Object
Components.Add(Sprite)
EditorSprite=Sprite
DRTeam=1//Defaults to enemy team
SupportedEvents.Add(class'SeqEvent_DarkRaidSquad');
}
PHP Code:
class SeqEvent_DarkRaidSquad extends SequenceEvent;
/** Fired when the squad finds an enemy */
function SquadWokeUp(Actor inOriginator, Actor inInstigator)
{
local array<int> ActivateIndices;
ActivateIndices[0] = 0;
if (inOriginator != None && bEnabled && (!bPlayerOnly || (inInstigator != None && inInstigator.IsPlayerOwned())))
{
CheckActivate(inOriginator,inInstigator,false,ActivateIndices);
}
}
DefaultProperties
{
ObjName="Squad Trigger"
ObjCategory="DarkRaidSquad"
OutputLinks(0)=(LinkDesc="Wake")
}
PHP Code:
event SquadWokeUp()
{
local int idx;
local SeqEvent_DarkRaidSquad dmgEvent;
// search for any damage events
for (idx = 0; idx < GeneratedEvents.Length; idx++)
{
dmgEvent = SeqEvent_DarkRaidSquad(GeneratedEvents[idx]);
if (dmgEvent != None)
{
// notify the event of the damage received
dmgEvent.SquadWokeUp(self, self);
}
}
}