meathelix
11-20-2009, 12:57 PM
I'm working on the foundation of a new GameType. To test it out, I wanted to make a new kismet sequence action that can talk to the gameType object for scoring, etc. I haven't gotten that far, however, because I can't get the Activated event to fire.
Here's the code:
class SeqAct_ScoreGoal extends SequenceAction;
var() Object myObject;
var() Object outObject;
event Activated()
{
local int i;
`log("woohoo!");
outObject=myObject;
for(i=0; i<Targets.length; i++)
{
PlayerController(Targets[i]).PlayerReplicationInfo.Team.Score += 1;
PlayerController(Targets[i]).PlayerReplicationInfo.Team.bForceNetUpdate = TRUE;
}
}
defaultproperties
{
bCallHandler=false
ObjName="Score Goal"
ObjCategory="Test Game Mode"
InputLinks(0)=(LinkDesc="Input")
VariableLinks.Empty
VariableLinks(0)=(ExpectedType=class'SeqVar_Object ',LinkDesc="myObject",PropertyName=myObject)
VariableLinks(1)=(ExpectedType=class'SeqVar_Object ',LinkDesc="OutObject",bWriteable=True,PropertyName=outObject)
}
I'm firing this action off of a trigger event in the game. The action showing up in Kismet, and I have it all wired up. The debug comment I attached to the Kismet node is showing up in game as well, so I know the action is getting triggered from the Kismet end of things.
I added some functionality for it to copy an input object to an output object so I could take the player that triggered it and have a followup kismet object that acts on the output object just so I could see if anything inside the action was working.
I was at least hoping the 'log statement would fire, but the log doesn't show any "woohoo!", and I don't see any other evidence that anything is going on inside the action.
Am I missing something here?
Here's the code:
class SeqAct_ScoreGoal extends SequenceAction;
var() Object myObject;
var() Object outObject;
event Activated()
{
local int i;
`log("woohoo!");
outObject=myObject;
for(i=0; i<Targets.length; i++)
{
PlayerController(Targets[i]).PlayerReplicationInfo.Team.Score += 1;
PlayerController(Targets[i]).PlayerReplicationInfo.Team.bForceNetUpdate = TRUE;
}
}
defaultproperties
{
bCallHandler=false
ObjName="Score Goal"
ObjCategory="Test Game Mode"
InputLinks(0)=(LinkDesc="Input")
VariableLinks.Empty
VariableLinks(0)=(ExpectedType=class'SeqVar_Object ',LinkDesc="myObject",PropertyName=myObject)
VariableLinks(1)=(ExpectedType=class'SeqVar_Object ',LinkDesc="OutObject",bWriteable=True,PropertyName=outObject)
}
I'm firing this action off of a trigger event in the game. The action showing up in Kismet, and I have it all wired up. The debug comment I attached to the Kismet node is showing up in game as well, so I know the action is getting triggered from the Kismet end of things.
I added some functionality for it to copy an input object to an output object so I could take the player that triggered it and have a followup kismet object that acts on the output object just so I could see if anything inside the action was working.
I was at least hoping the 'log statement would fire, but the log doesn't show any "woohoo!", and I don't see any other evidence that anything is going on inside the action.
Am I missing something here?