News UnrealEd Files Mods FragBU Liandri Archives
BeyondUnreal Forums

Go Back   BeyondUnreal Forums > Unreal Development > Coding

Reply
 
Thread Tools Display Modes
Old 15th Jun 2008, 04:45 PM   #1
captaindee
Registered User
 
Join Date: Jun. 13th, 2008
Posts: 3
Kismet SequenceAction + Getting the right Pawn?

Hi all,

I'm trying to script our mod such that we display an icon (a SpriteComponent, to be seen by all players) over the head of the player when they activate a trigger. Below is the code I've hooked into Kismet.

The commented out code (two lines) is Attempt #1. The other code is Attempt #2. In Attempt #1, the pawn is always the server's pawn, even if the client avatar activates the trigger. In Attempt #2, the pawn is always the client's pawn. Log messages on both client and server confirm this.

What I need is the pawn of the person who is doing the activation. I'm very confused. Any idea why this isn't working, or what I should be doing?

Any help would be massively appreciated.

Thanks!

- Captain Dee -


Quote:
class SeqAct_ShowTaskIcon extends SequenceAction;

var() Object PawnInput;
var() Object TaskInput; // Not being used right now

simulated event Activated()
{
// local DMI_Pawn pawn;

// pawn = DMI_Pawn(Controller(PawnInput).Pawn);

local SeqVar_Object ObjVar;
local DMI_Pawn P;

foreach LinkedVariables(class'SeqVar_Object', ObjVar, "Pawn")
{
P = DMI_Pawn(ObjVar.GetObjectValue());
if (P != None)
{
`log("*** SHOW ICON ***");
`log("*** KISMET PAWN INFO: " @ P);
P.ShowIcon(0);
}
}
}

defaultproperties
{
ObjName="Show Task Icon"
ObjCategory="Paranoia"

InputLinks(0)=(LinkDesc="In")

OutputLinks(0)=(LinkDesc="Out")

VariableLinks.Empty
VariableLinks(0)=(ExpectedType=class'SeqVar_Object',LinkDesc="Pawn",PropertyName=PawnInput)
VariableLinks(1)=(ExpectedType=class'SeqVar_ParanoiaTask',LinkDesc="Task",PropertyName=TaskInput)
}
captaindee is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 03:26 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.

Copyright ©1998 - 2012, BeyondUnreal, Inc.
Privacy Policy | Terms of Use
Bandwidth provided by AtomicGamer