UE3 - UT3 Cast failing

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Cowlike

New Member
Feb 21, 2008
125
0
0
In a custom SequenceAction I need to get a pawn from a linked object:
Code:
event Activated()
{
	local FortStandard F;
	local SequenceVariable S;
	local Pawn P;
	local Object instig;

	instig=SeqVar_Object(VariableLinks[1].LinkedVariables[0]).GetObjectValue();

	if (instig.IsA('Pawn'))
	{
		P=Pawn(instig);
	}

	if (instig.IsA('Controller'))
	{
		P=Controller(instig).Pawn;
	}


	if (P==none)
	{
		`log("Bad instigator for FortStandardAction :"$instig);
	}
And sometimes it doesn't work, I get in the log :
"ScriptLog: Bad instigator for FortStandardAction :UTPlayerController_2"
But it was a controller, is my code above wrong ?
 

Cowlike

New Member
Feb 21, 2008
125
0
0
I guess you're right, didn't occur to me... I will use the controller instead then. Thanks.