PDA

View Full Version : Problem getting custom Kismet action to fire Activated event



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?

meathelix
11-21-2009, 12:35 PM
Well, it looks like that action was actually functioning. I tried a different kismet node (destroy actor) to act on the copied object variable and it worked. Apparently logging was the problem, as the 'log statement didn't output to the log at all. Anyone know of a better method of printf debugging?

xGallox
02-22-2010, 06:17 AM
Hi, I usually use a custom HUD with debug functions but i don't know any other method to log messages into a text file.

Can you post here where you find the information/tutorial/referente to create custom Kismet nodes like the SequenceActions?

captpike
05-01-2010, 07:53 PM
sorry if its bad form to reply to a thread this old but I really need to do something like the code in this one, I need a kismet event I can feed data and have it change the team's score

and why does this have a input and a output, should I not be able to to just feed it pawn data and have it do its thing?