Jump to content

Ruud033

Former Developers
  • Posts

    1081
  • Joined

  • Last visited

Everything posted by Ruud033

  1. Can you also run the program in compatibility mode?
  2. I'd be up for this lol . Anyways, I've fixed the issue already. I used a different code: class Rx_SeqAct_ModifyPT extends SequenceAction; var bool bAccessible; var string Tooltip; var string PTName; var int TeamNumber; event Activated() { local SeqVar_Object ObjVar; local TestPT TestActor; foreach LinkedVariables(class'SeqVar_Object', ObjVar, "ModifiedActor") { TestActor = TestPT(ObjVar.GetObjectValue()); if (TestActor != None) { TestActor.OnModifyPT(self); // 'self' is to pass the SeqAct to have the rest of params } } } defaultproperties { ObjName="Modify Purchase Terminal" ObjCategory="Ren X" Variablelinks(5)=(ExpectedType=class'SeqVar_Int', LinkDesc="Team Number",MinVars=1,MaxVars=1,PropertyName=TeamNumber) Variablelinks(4)=(ExpectedType=class'SeqVar_Bool', LinkDesc="Accessible",MinVars=1,MaxVars=1,PropertyName=bAccessible) Variablelinks(3)=(ExpectedType=class'SeqVar_String', LinkDesc="PT Name",MinVars=1,MaxVars=1,PropertyName=PTName) Variablelinks(2)=(ExpectedType=class'SeqVar_String', LinkDesc="Tooltip",MinVars=1,MaxVars=1,PropertyName=Tooltip) Variablelinks(1)=(ExpectedType=class'SeqVar_Object', LinkDesc="ModifiedActor",MinVars=1,MaxVars=1,PropertyName=ModifiedActor) bCallHandler=false }
  3. UUUUURRREEEEKAAAAAA AAAHHWW YEAAH ITS WORKING!! With a little help from our UDK forum friends: https://forums.epicgames.com/threads/990565-How-can-I-fire-a-function-in-class-X-from-SeqAct-Y?p=31935540#post31935540 And the Wiki: https://udn.epicgames.com/Three/UnrealScriptIterators.html I've changed the SeqAct a bit. I knew it was not firing the function in the TestPT.uc as it should.. So I had to trigger it somehow. I figured that I'd use the same thing the GetCredits node does, namely; Activated() So, here it is: class Rx_SeqAct_ModifyPT extends SequenceAction; var bool bAccessible; var string Tooltip; var string PTName; var int TeamNumber; event Activated() { local TestPT TestActor; foreach class'WorldInfo'.static.GetWorldInfo().AllActors(class'TestPT', TestActor) { if (TestActor != None) { TestActor.OnModifyPT(self); } } } defaultproperties { ObjName="Modify Purchase Terminal" ObjCategory="Ren X" Variablelinks(4)=(ExpectedType=class'SeqVar_Bool', LinkDesc="Accessible",MinVars=1,MaxVars=1,PropertyName=bAccessible) Variablelinks(3)=(ExpectedType=class'SeqVar_String', LinkDesc="PT Name",MinVars=1,MaxVars=1,PropertyName=PTName) Variablelinks(2)=(ExpectedType=class'SeqVar_String', LinkDesc="Tooltip",MinVars=1,MaxVars=1,PropertyName=Tooltip) Variablelinks(1)=(ExpectedType=class'SeqVar_Int', LinkDesc="Team Number",MinVars=1,MaxVars=1,PropertyName=TeamNumber) bCallHandler=false } works in the SDK 100%! Will test in the server ASAP. But I think it'll be fine.. I hope. This is what it looks like in Kismet right now, it's quite user friendly I think. Edit: Found a bug. Once I place multiple actors in the same level, they all get assigned the same properties, even though I use multiple SeqActs.. For example, they all get teamnumber 255! I think we need to use a local array or something instead of: local TestPT TestActor
  4. I dunno what you're up to exactly.. if you could tell me via PM first then I'll decide
  5. Interesting! Vehicle combat in the mountains! I'd think of gameplay as well tho.. Make sure you have several vehicle routes! It might be interesting to use different passage levels?
  6. im not using the volume the reason the map is laggy is that its not completely optimized yet ... and for some reason i cant get lod's to work on foliage with a wind material I've copied your bushes and them LOD's work fine?? Anyways, your current cull on those bushes is like 16000 !! Looking at your dense forest, i'd say 5000 would suffice as well.. Also, you don't really cull trees once you're in the middle.. it might also be an idea to cull some rocks from the different bases, say you're in the GDI base, you could cull some out-of-sight rocks in the Nod base. Not to mention the tiberium cave..
  7. That's a great initiative!!! I also started out that way once! Now I'm nose deep in the code itself lol.. If you need help don't be afraid to ask, be sure to create your own topic here @ the forums first though, it's the best way to ask for help. (inside your own topic) Dude, I'm suprised to see you active again! Where have you been? So, what are you running, what windows version?
  8. I've edited it a bit more. It compiles correctly but still does not work somehow!?? class TestPT extends Rx_BuildingAttachment implements (Rx_ObjectTooltipInterface) placeable; var CylinderComponent CollisionCylinder; var StaticMeshComponent PTMesh; var TEAM TeamNum; var bool bAccessable; var string tooltip; var string PTname; replication { if(bNetDirty && ROLE == ROLE_Authority) TeamNum, tooltip, bAccessable, PTname; } function OnModifyPT(Rx_SeqAct_ModifyPT FireAction) { local int KismetTeamNum; local string KismetToolTip, KismetPTName; local bool bKismetAccessible; KismetTeamNum = FireAction.TeamNumber; KismetTooltip = FireAction.Tooltip; KismetPTName = FireAction.PTName; bKismetAccessible = FireAction.bAccessible; `log("Updating PT through Kismet"); TeamNum = TEAM(KismetTeamNum); PTName = KismetPTName; Tooltip = KismetTooltip; bAccessable = bKismetAccessible; } 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 PTname; } 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(); } } defaultproperties { SpawnName = "_PT" SocketPattern = "Pt_" CollisionType = COLLIDE_TouchAllButWeapons bCollideActors = True bAccessable = false tooltip = "Press [ {GBA_USE} ] to access the PURCHASE TERMINAL" PTname = "Hacked Purchase Terminal" TeamNum = 255 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_Authority //bCollideActors = True //bBlockActors = True //BlockRigidBody = True //bCollideComplex = true //bWorldGeometry = true } class Rx_SeqAct_ModifyPT extends SequenceAction; var(PurchaseTerminal) bool bAccessible; var(PurchaseTerminal) string Tooltip; var(PurchaseTerminal) string PTName; var(PurchaseTerminal) int TeamNumber; defaultproperties { ObjName="Modify Purchase Terminal" ObjCategory="Ren X" Variablelinks(4)=(ExpectedType=class'SeqVar_Bool', LinkDesc="Accessible",MinVars=1,MaxVars=1,PropertyName=bAccessible) Variablelinks(3)=(ExpectedType=class'SeqVar_String', LinkDesc="PT Name",MinVars=1,MaxVars=1,PropertyName=PTName) Variablelinks(2)=(ExpectedType=class'SeqVar_String', LinkDesc="Tooltip",MinVars=1,MaxVars=1,PropertyName=Tooltip) Variablelinks(1)=(ExpectedType=class'SeqVar_Int', LinkDesc="Team Number",MinVars=1,MaxVars=1,PropertyName=TeamNumber) bCallHandler=false } It won't even update properties in the SDK Running out of idea's here..
  9. FoliageCollisionVolume needs to get fixed, And in order for that we need an SDK update because @ my SDK it compiles just fine!??
  10. New update; testpt.uc class TestPT extends Rx_BuildingAttachment implements (Rx_ObjectTooltipInterface) abstract; var CylinderComponent CollisionCylinder; var StaticMeshComponent PTMesh; var TEAM TeamNum; var bool bAccessable; var string tooltip; var string PTname; function OnModifyPT(Rx_SeqAct_ModifyPT FireAction) { local SeqVar_Bool BoolVar; local SeqVar_Int IntVar; local SeqVar_String StringVar; foreach FireAction.LinkedVariables(class'SeqVar_Int', IntVar, "Team Number") { if(IntVar.intvalue == 0) { TeamNum = 0; } if(IntVar.intvalue == 1) { TeamNum = 1; } if(IntVar.intvalue == 255) { TeamNum = 255; } } foreach FireAction.LinkedVariables(class'SeqVar_String', StringVar, "PT Name") { PTName = StringVar.strvalue; } foreach FireAction.LinkedVariables(class'SeqVar_String', StringVar, "Tooltip") { Tooltip = StringVar.strvalue; } foreach FireAction.LinkedVariables(class'SeqVar_Bool', BoolVar, "bAccessible") { if(BoolVar.bValue == 1) bAccessable = true; else bAccessable = false; } } replication { if(bNetDirty && ROLE == ROLE_Authority) TeamNum, tooltip, bAccessable, PTname; } 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 PTname; } 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(); } } defaultproperties { SpawnName = "_PT" SocketPattern = "Pt_" CollisionType = COLLIDE_TouchAllButWeapons bCollideActors = True bAccessable = false tooltip = "Press [ {GBA_USE} ] to access the PURCHASE TERMINAL" PTname = "Hacked 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_Authority //bCollideActors = True //bBlockActors = True //BlockRigidBody = True //bCollideComplex = true //bWorldGeometry = true } Rx_SeqAct_ModifyPT.uc class Rx_SeqAct_ModifyPT extends SequenceAction; defaultproperties { ObjName="Modify Purchase Terminal" ObjCategory="Ren X" Variablelinks(4)=(ExpectedType=class'SeqVar_Bool', LinkDesc="Accessible",MinVars=1,MaxVars=1) Variablelinks(3)=(ExpectedType=class'SeqVar_String', LinkDesc="PT Name",MinVars=1,MaxVars=1) Variablelinks(2)=(ExpectedType=class'SeqVar_String', LinkDesc="Tooltip",MinVars=1,MaxVars=1) Variablelinks(1)=(ExpectedType=class'SeqVar_Int', LinkDesc="Team Number",MinVars=1,MaxVars=1) bCallHandler=false }
  11. So, I'm chatting with HandEpsilon for a sec now, and I'm using this post to show where we're at; TestPT.uc class TestPT extends Rx_BuildingAttachment implements (Rx_ObjectTooltipInterface) abstract; var CylinderComponent CollisionCylinder; var StaticMeshComponent PTMesh; var repnotify TEAM TeamNum; var repnotify bool bAccessable; var repnotify string tooltip; var repnotify string PTname; function kismetrep(UTSeqAct_ReplicatePT) { // what to do here?? } replication { if(bNetDirty && ROLE == ROLE_Authority) TeamNum, tooltip, bAccessable, PTname; } 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 PTname; } 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(); } } defaultproperties { SpawnName = "_PT" SocketPattern = "Pt_" CollisionType = COLLIDE_TouchAllButWeapons bCollideActors = True bAccessable = true tooltip = "Press [ {GBA_USE} ] to access the PURCHASE TERMINAL" PTname = "Hacked 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_Authority //bCollideActors = True //bBlockActors = True //BlockRigidBody = True //bCollideComplex = true //bWorldGeometry = true } and the Sequence UTSeqAct_ReplicatePT.uc class UTSeqAct_ReplicatePT extends SequenceAction; defaultproperties { Variablelinks(4)=(ExpectedType=class'SeqVar_Bool', LinkDesc="Accessible",MinVars=1,MaxVars=1) Variablelinks(3)=(ExpectedType=class'SeqVar_String', LinkDesc="PTname",MinVars=1,MaxVars=1) Variablelinks(2)=(ExpectedType=class'SeqVar_String', LinkDesc="Tooltip",MinVars=1,MaxVars=1) Variablelinks(1)=(ExpectedType=class'SeqVar_Int', LinkDesc="Team Number",MinVars=1,MaxVars=1) }
  12. With the help of your script I've cleaned up the kismet. I am now destroying - creating actors and therefore FORCING bNetInitial to fire. Therefore the PT's will get replicated in any situation. This is the new kismet (works in the SDK, works in server) http://prntscr.com/8j66v6 Edit: works in server, just the Modify Property that does not update by itself.. The PT UI's now spawn properly, but the only thing is the tooltip and bAccesssable don't get changed.. Edit2: nope can't get it to work, i'm gonna try n build a replication node seq event
  13. I will try, if I have spare time.. the thing I'm working on right now seems to be an outcome .. Ah yes, thanks for the tip. Will adjust and try one last time. By the way, could you upload that piece of code you have written for the capturable MCT? That SeqAct? That fires when neutralised and when captured? Thanks in advance, Edit: found it viewtopic.php?f=136&t=75458&hilit=MCT
  14. I gave up on the code above (extending from a different hierachy) it's all so confusing and I can't figure it out. I think its best to have a custom node. You mean a custom node? Could you create one? I know you have created one before in the past.. I also need that sequence where you can use the captured and neutralised points @ the MCT. Meanwhile i've been experimenting in kismet with destroying and spawning actors (which seems to be OK..) http://prntscr.com/8iuu7t
  15. Development so far in the new code hierachy: Rx_ChangeablePT.uc class Rx_ChangeablePT extends Rx_Building_Techbuilding placeable; var StaticMeshComponent PTMesh; var CylinderComponent CollisionCylinder; var bool bAccessable; var string tooltip; var string PTname; var TEAM ReplicatedTeamID; replication { if(bNetDirty || bNetInitial) ReplicatedTeamID; } 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 PTname; } simulated event byte ScriptGetTeamNum() { return ReplicatedTeamID; } 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(); } } defaultproperties { BuildingInternalsClass = Rx_Building_ChangeablePT_Internals 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 = True BlockActors = False CollideActors = True End Object CollisionComponent = CollisionCmp CollisionCylinder = CollisionCmp Components.Add(CollisionCmp) bAccessable = Rx_Building_ChangeablePT_Internals.bAccessable tooltip = Rx_Building_ChangeablePT_Internals.tooltip PTname = Rx_Building_ChangeablePT_Internals.PTname ReplicatedTeamID = Rx_Building_ChangeablePT_Internals.ReplicatedTeamID } And the internals class that goes with it: Rx_Building_ChangeablePT_Internals class Rx_Building_ChangeablePT_Internals extends Rx_Building_Team_Internals notplaceable; var TEAM ReplicatedTeamID; var bool bAccessable; var string tooltip; var string PTname; DefaultProperties { CollisionType = COLLIDE_TouchAllButWeapons bCollideActors = True bAccessable = true; tooltip = "Press [ {GBA_USE} ] to access the PURCHASE TERMINAL"; PTname = "Hacked Purchase Terminal" ReplicatedTeamID = 255 } This gives me a few warnings in the compiler though:
  16. I have thought of it, but I think it's not a solution of any kind. If I am creating an event, I'd have to have an input of some kind. bNetDirty is such an event already and is hard coded into the game, why would I replace this? I'd rather not be dependable upon such an event at all! If I wanted to create an event, I'd have to create a 'replicate' INPUT node. So, that if we use kismet to do something, we fire to the input of this node, so the code can then take over and set the boolean to true, and replicate stuff. This way we work ourselves around the issue that the server can not see the clien't value, by using kismet as in input. You see, the problem here is the input, the trigger, the start that sets the wheel in motion (bNetDirty) First I'll try and build a custom PT out of a different code hierachy, then i'll look into replacing bNetDirty as a variable completely.
  17. So first of, the Kismet, I'm posting the Kismet first because, when you guys reply, you have to scroll up and the code is more important to refer to, and will be the first thing you encounter when replying so.. anyways, lets begin; Note: If any of the screenshots's links are broken, report back in, I'll re-upload them. First of, the general overview: http://prntscr.com/8idfbb Here you see that I use level loaded in the beginning to set a number of parameters when the level loads. These parameters are as following: http://prntscr.com/8idge8 See the screenshot for the complete thing. In short: - bAccessable gets set to False - ToolTip gets set to Press [ {GBA_USE} ] to buy an Orca [900 credits] or something similar for other vehicles - TeamNum gets set to 3, because the MCT also starts out at TeamNum=3 from the start. The settlement of the team could also start out at 255 but, at first I had a different kismet sequence which involved a comparison between one of the PT's as victim for measurement. I had a sequence that involved checking whether the PT's were not already set to a team, and if they were already at, say, GDI, they won't get assigned the set of properties again when the MCT is also at GDI. I will include this sequence again in the future, to reduce the amount of re-assigning. Therefore it needs to start out at team 3 because then A==B and it won't update properties when someone triggers the update. For now, we need to fix the replication first so forget that you've just read this. Here you can see that I use a couple of trigger volumes to initiate a comparison in Kismet between the MCT as object variable and 3 different teamnumbers, namely: - GDI (team 0) - Nod (team 1) - Neutral (team 255) If one of these match up, the PT's will get a set of properties assigned to them because A == B. The set of properties consist of: http://prntscr.com/8idi7z - bAccessable tickbox not being ticked for modification since it's properly set at Level Loaded - ToolTip tickbox not being ticked for modification since it's properly set at Level Loaded - TeamNum set to (GDI in this case, GDI is team 0) the correct team So, for a quick summary before you start spitting trough the code which is already posted: I've made a mutator based upon the existing PT code. I did not extend the existing PT code but I decided to completely make a custom PT based upon a copy of the existing one. So what does this mean? I copy-pasted Rx_BuildingAttachment_PT.uc and BuildingAttachment_PT_GDI.uc and renamed them both in filename, and internally, in the file itself, so the extensions etc.. all work out. (class Rx_BuildingAttachment_PT_GDI extends Rx_BuildingAttachment_PT) <-- that stuff. (class TestPT_Placeable extends TestPT) <--- into that stuff Why did I do this and not just extend Rx_BuildingAttachment_PT? Because I now had an overview of the used code and hierachy used. I'm not a coder with awesome coding skills and an advanced IDE program, mostly I just use Notepad++ for these things. I have an IDE program but I don't know how to use that properly. So what I've been doing is adding bits and pieces to TestPT_Placeable.uc because I have already placed TestPT.uc in my level (Crash_Site). I can then update the mutator's code and quickly test it out by replacing the mutator only. Untill this far I've added these pieces of code (with partial succes thus far, will get back to this) for experimentation, but have failed me so far. First I started out with this: x. Test number 0.5 (because it failed before building scripts) replication { if ( bNetDirty) TeamNum; } And also this second piece: replication { if ( bNetDirty) Armor, ArmorMax, CurrentBackWeapons, AirstrikeLocation; } Because RypeL had sent this to me via Skype. Quickly after lots of errors and UDKFrontend.exe bleeding and screaming to me I figured that I didnt need the second part involving Armor, Armormax etc.. because we're not having any of those variables in the PT anyway, so I deleted the second piece and was left over with test number 1: replication { if ( bNetDirty) TeamNum; } Rebuilding scripts with the first piece of code only did work, however, it failed to replicate ingame. So I've been researching a lot into replication and looking at the existing code of the capturable MCT. I have then tried this: 2. Test number 2 replication { if(bNetDirty && ROLE == ROLE_Authority) TeamNum, tooltip; } That didnt work for me either. I can remember it only worked once or twice by accident but after several testing runs it didnt work out anymore. During the one or two times it did work, I was alone in the server. I did notice the ToolTip was set properly. So short conclusion: The tooltip and the bAccessable variables get set properly! (good job Agent!) I figured it had something to do with server-client replication. So I've tried reconnecting with test number 2 and voila! The PT UI updated. (In other words, bNetInitial fired I think or some magic happened) With that knowledge in mind, I have done some experimenting. 3. Test number 3 replication { if(bNetDirty || bNetInitial) TeamNum, tooltip; } This piece of code was in Rx_Building_Techbuilding_Internals.uc I had copied this piece of code because I know the captureable MCT (which uses this) works. Sadly this piece of code didnt work for me. I find it really strange that the Logic || OR is there and the capturable MCT still works but that's a different story. To finish up the replication function write-out, I'm ending with a hypothesis: http://wiki.beyondunreal.com/Everything ... _to_ask%29 I think bNetDirty is not the way to go to fire the replication on the server: So, I think the server does not know if the client's variable has changed or not. Maybe we need to use a different boolean to shake up things and get this script working?!? So, I turned my head into different RemoteRoles. I figured that if I could change the Role of the actor the bNetDirty would fire somehow.. Don't ask me why I'm thinking this but it's a guess I made. I've been reading that link I gave you in my hypothesis. 4. Test number 4 So I've tried this piece of code (because I think it might work best and also matches existing code on RenX buildings etc etc.. its still a guess though): replication { if(bNetDirty && ROLE == ROLE_Authority) TeamNum, tooltip; } With this role: RemoteRole = ROLE_SimulatedProxy That did'nt work. Same situation as before 5. Test number 5 So I've tried changing the role into: RemoteRole = ROLE_AutonomousProxy That didn't work out either. Same situation as before 6. Test number 6 So I've tried changing the role into: RemoteRole = ROLE_Authority That didn't work either. So. I got kinda stuck, out of fury and frustration I even tried several combo's of Roles and replication functions.. those didnt work either. I already deleted those and I don't remember what they exactly were so I didnt post them. With all these setbacks I began to wonder If I could not approach this issue in a different way by doing an analysis of an existing WORKING object first. I decided to take the capturable MCT (Rx_CapturableMCT.uc) as a study object and try to learn something from it. The biggest difference between the TestPT.uc and Rx_CapturableMCT.uc is that they come from a different hierachy. See also: http://prntscr.com/8i9krt I've studied the hierachy and could only find ONE significant difference with these 2, namely: - The TestPT.uc hierachy replicates in Rx_BuildingAttachment via: replication { if ( bNetInitial && Role==ROLE_Authority ) OwnerBuilding; } and - The Rx_CapturableMCT.uc hierachy replicates in Rx_Building_TechBuilding_Internals via: replication { if(bNetDirty || bNetInitial) ReplicatedTeamID,FlagTeam,CP; } Now I've written everything I know in this post. I'm at the end of my knowledge here. I'm gonna try and build a new PT out of the Rx_CapturableMCT.uc hierachy as I said earlier (the post with the picture in it) and see how that goes. If any of the coders has ANY idea how to fix the replication in the original TestPT.uc I'll be anxious to hear that, I have absolutely no clue what so ever how to solve this other than rebuilding the PT from a different hierachy. - Signing off for this post, Ruud
  18. Yeah I sort of get the frustration there That would be nice, if you can take a look at it. Meanwhile i'm continuing experimentation. The replication part does not work. The ingame UI does not update, so that is reason for me to bug out on the current way of thinking and going into a different code hierachy by extending (pluggin into) a different hierachy, namely, the one from the capturable MCT because I know that works. Next post will be about the combinations I've already tried and the kismet I'm using.
  19. F*ck man, I'm all out of options! I've tried everything, even asked Agent for help and she couldn't help me out. I've tried all combinations with: RemoteRole = ROLE_AutonomousProxy if(bNetDirty && ROLE == ROLE_Authority) if(bNetDirty || bNetInitial) And other stuffs i forgot to mention and I'm kinda sick of it. I have the feeling that we're coming from a wrong code hierachy here, I'll do an analysis of the code hierachy and base my new PT upon the capturable MCT. Why? Because I know that atleast works. Did some hierachy research, see the attached picture. I think I'll be extending from: - Rx_Building_Techbuilding - Rx_Building_Team_Internals For the second item, i'll just copy paste (the existing) Rx_Building_Techbuilding_Internals and get rid of all the health related stuff. I'll also delete the RxIFC_Capturable implementation. This way we can not capture or give health to the newly created extension. Then only 1 thing also remains, that is the default TeamID, I'll add that as well. So this is what im gonna do: http://prntscr.com/8i9krt I really really REALLY do not know why the TestPT does not work at all, it really frustrates me. I've been looking at code inside of Rx_Building_Attachment and could not find out how what or why it functions in terms of replication. Anyways, I'm trying to make a new PT actor this way, if this works, huuray!! if it does not, I'm giving up on this. I'll then just create and destroy actors in Kismet I think (IF that works, didnt even test that yet) God this is frustrating..
  20. Hey guys, Im using this post for discussion. I'm trying to switch the Purchase terminal's team via Kismet (Modify Property) This works server side. However, client side, it does not update in a multiplayer game, so I think it has somethign to do with replication. At the moment i'm using mutators to test the code. This is what I have so far; It's mostly a copy of Rx_BuildingAttachment_PT.uc TestPT.uc class TestPT 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 "Hacked 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(); } } replication { if ( bNetDirty && ROLE == ROLE_Authority) TeamNum, tooltip; } defaultproperties { SpawnName = "_PT" SocketPattern = "Pt_" RemoteRole = ROLE_SimulatedProxy //should this not be ROLE_AutonomousProxy? CollisionType = COLLIDE_TouchAllButWeapons bCollideActors = True bAccessable = true; tooltip = "Press [ {GBA_USE} ] to access the PURCHASE TERMINAL"; bAlwaysRelevant = True bGameRelevant = True bOnlyDirtyReplication = True NetUpdateFrequency=10.0 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 } I use this as a base, in the original PT's there is also a base for the PT's. Since I had to modify this code I have made a copy and thus a new base. The placeable actor is as follows: TestPT_Placeable.uc class TestPT_Placeable extends TestPT placeable; defaultproperties { TeamNum = 255 } I've only been editing in TestPT.uc so far to get the stuff rolling. I think this code is the most important, RypeL also mentioned this; replication { if ( bNetDirty && ROLE == ROLE_Authority) TeamNum, tooltip; } However, it still does not work, ive tested this already in the CT server.
  21. Made some progress!! I've got the PT teamswitch working! So we now get updated teams when we look at the PT http://prntscr.com/8hsx8y The only thing left to do is the tooltip string (Press E to do shit) That also needs to be replicated. Will do that when I have time.
  22. Looking good there! I really like the Helipad you've developed too Can't wait to try this out! I am currently testing stuff with the PT, I can get the teamnumber updated already, but I seem to have to replicate some more stuff in code.. to be continued!
  23. Looks promising! Would be really cool if there's something to do down there.. Would make combat more interesting I think.
×
×
  • Create New...