UE3 - UDK "ModfyProperty" variable arguments solution

  • 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.

lorendroll

New Member
Aug 27, 2011
1
0
0
I can't figure out how to increment object property via Kismet. I'm using ModifyProperty function but it doesn't allow to input variable property value (calculated somewhere else). I can only set it constant in property array string.

Partitialy solved by compiling inheritor of SeqAct_ModifyProperty:
Code:
class SeqAct_ModifyPropertyValue extends SeqAct_ModifyProperty;

var string Value;

event Activated()
{
	Properties[0].PropertyValue=Value;
}

defaultproperties
{
	ObjName="Modify Property Value"
	VariableLinks(1)=(ExpectedType=class'SeqVar_String',LinkDesc="Value",bWriteable=false,PropertyName=Value)
}

But this code doesn't work for the first time it fires, but works somehow for the second... Please help me find a better solution.

Also, I wrote a script specially for changing Drawing Scale of actor:
Code:
class SeqAct_ModifyDrawScale extends SequenceAction;

var string Value;
var object Target;

event Activated()
{
	Actor(Target).SetDrawScale( float(Value) );
}

static event int GetObjClassVersion()
{
	return Super.GetObjClassVersion() + 1;
}

defaultproperties
{
	ObjName="Modify DrawScale"
	ObjCategory="Object Property"
	VariableLinks(0)=(ExpectedType=class'SeqVar_Object',LinkDesc="Target",PropertyName=Target)
	VariableLinks(1)=(ExpectedType=class'SeqVar_String',LinkDesc="Value",bWriteable=false,PropertyName=Value)
}

But the only problem is collisions. Works properly with projectiles and player, but behave like non-modified when collides with static meshes or other rigid body... I tried using SetPhysicalCollisionProperties, SetCollisionType, SetCollisionSize, SetZone, SetCollision, SetPhysics functions... and no result. I looked at collision box (via console: show COLLISIONS) and everything was fine.
 
Last edited: