Announcement

Collapse
No announcement yet.

[Issue] Updating actors' defaultproperties with kismet

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [Issue] Updating actors' defaultproperties with kismet

    Hey people,
    With the development of my map, I've got an issue.
    I've got an actor (an invisible one) that sits in front of a purchase terminal. See the picture below. The highlighted actor is the invisible actor we're talking about:

    http://prntscr.com/8f5qzd

    The whole idea of this actor is that it displays a text string if one of the players is standing in front of it and that it displays either a neutral, enemy or friendly team.
    Picture of the terminal:

    http://prntscr.com/8f5rrk

    I can change the internal properties of this terminal via kismet (atleast I think I can) by using this kismet:

    http://prntscr.com/8f5tbk


    http://prntscr.com/8f5tqj

    As you can see in the second picture, I 'Modify Property' on the invisible actor using a specific set of settings. If you want to understand those settings you have to see the script of the invisible actor, which is below:

    Code:
    class Rx_BuildingAttachment_PT extends Rx_BuildingAttachment implements (Rx_ObjectTooltipInterface)
    	abstract;
    
    var TEAM                    TeamNum;
    var CylinderComponent       CollisionCylinder;
    var StaticMeshComponent PTMesh;
    var bool bAccessable;
    var string tooltip;
    
    simulated function string GetTooltip(Rx_Controller PC)
    {
    	if (PC.GetTeamNum() == GetTeamNum() && class'Rx_Utils'.static.OrientationToB(self, PC.Pawn) > 0.1)
    		return Repl(tooltip, "{GBA_USE}", Caps(UDKPlayerInput(PC.PlayerInput).GetUDKBindNameFromCommand("GBA_Use")), true);
    	return "";
    }
    
    simulated function bool IsTouchingOnly()
    {
    	return true;
    }
    
    simulated function bool IsBasicOnly()
    {
    	return false;
    }
    
    simulated function string GetHumanReadableName()
    {
    	return "Purchase Terminal";
    }
    
    simulated event byte ScriptGetTeamNum()
    {
    	return TeamNum;
    }
    
    simulated function bool AreAircraftDisabled()
    {
    	local Rx_MapInfo mi;
    	mi = Rx_MapInfo(WorldInfo.GetMapInfo());
    	if( mi != none )
    	{
    		return mi.bAircraftDisabled;
    	}
    	return true;
    }
    
    simulated function StartCreditTick()
    {
    	SetTimer(0.5f,true,'CreditTick');
    }
    
    simulated function StopCreditTick()
    {
    	if (IsTimerActive('CreditTick'))
    	{
    		ClearTimer('CreditTick');
    	}	
    }
    
    
    simulated function StartInsufCreditsTimeout()
    {
    	SetTimer(5.0f,false,'InsufCreditsTimeout');
    }
    
    simulated function StopInsufCreditsTimeout()
    {
    	if (IsTimerActive('InsufCreditsTimeout'))
    	{
    		ClearTimer();
    	}	
    }
    
    
    // simulated function MenuClose()
    // {
    // 	StopCreditTick();
    // 	StopInsufCreditsTimeout();
    // 	if( PTMenu != none )
    // 	{
    // 		`log("" $self.Class $"================================================");
    // 		ScriptTrace();
    // 		PTMenu.Close(true);
    // 		PTMenu = none;
    // 		`log("Rx_BuildingAttachment_PT::Rx_GFxPurchaseMenu pass");
    // 	}
    // }
    
    defaultproperties
    {
    	SpawnName     = "_PT"
    	SocketPattern = "Pt_"
    
    	RemoteRole          = ROLE_SimulatedProxy
    	CollisionType       = COLLIDE_TouchAllButWeapons
    	bCollideActors      = True
    	bAccessable = true;
    	tooltip = "Press <font color='#ff0000' size='20'>[ {GBA_USE} ]</font> to access the PURCHASE TERMINAL";
    
    	Begin Object Class=StaticMeshComponent Name=PTMeshCmp
    		StaticMesh                   = StaticMesh'rx_deco_terminal.Mesh.SM_BU_PT'
    		CollideActors                = True
    		BlockActors                  = True
    		BlockRigidBody               = True
    		BlockZeroExtent              = True
    		BlockNonZeroExtent           = True
    		bCastDynamicShadow           = True
    		bAcceptsDynamicLights        = True
    		bAcceptsLights               = True
    		bAcceptsDecalsDuringGameplay = True
    		bAcceptsDecals               = True
    		RBChannel                    = RBCC_Pawn
    		RBCollideWithChannels        = (Pawn=True)
    	End Object
    	Components.Add(PTMeshCmp)
    	PTMesh = PTMeshCmp
    
    	Begin Object Class=CylinderComponent Name=CollisioncMP
    		CollisionRadius     = 75.0f
    		CollisionHeight     = 50.0f
    		BlockNonZeroExtent  = True
    		BlockZeroExtent     = false
    		bDrawNonColliding   = True
    		bDrawBoundingBox    = False
    		BlockActors         = False
    		CollideActors       = True
    	End Object
    	CollisionComponent = CollisionCmp
    	CollisionCylinder  = CollisionCmp
    	Components.Add(CollisionCmp)
    
    	//RemoteRole          = ROLE_SimulatedProxy
    	//bCollideActors      = True
    	//bBlockActors        = True
    	//BlockRigidBody      = True
    	//bCollideComplex     = true
    	//bWorldGeometry = true
    	
    }
    And, the second script which defines the team and is placeable:

    Code:
    class Rx_BuildingAttachment_PT_GDI extends Rx_BuildingAttachment_PT
        placeable;
        
    defaultproperties
    {
    	TeamNum = TEAM_GDI
    }
    So, when I update the following parameters via 'Modify Property' in kismet
    • bAccessable = true;
    • tooltip = "Press <font color='#ff0000' size='20'>[ {GBA_USE} ]</font> to access the PURCHASE TERMINAL";
    • TeamNum = TEAM_GDI

    It works perfectly in the SDK when I play in in the SDK. However, as soon as I upload the map to one of our servers and start playing it there, the whole script does not seem to function and values which I enter via 'Modify Property' do not come through. The invisible PT actor simply goes back to it's default values -or- does not get changed at all!


    So, the problem here is that the actor does not update the values entered by kismet somehow. How can I fix this?

    Personally, I think it has something to do with the replication after watching this video https://forums.epicgames.com/threads...r-in-UDK-VIDEO
    Notice that in the code I provided earlier, the replication is disabled by the: '//'
Working...
X