Page 2 of 2

Re: Looking for alternative Teamcannon actor.

Posted: Sat Sep 16, 2017 9:40 pm
by EvilGrins
Kinda like UFOs, though when suggesting moving teamcannons I was kinda picturing them sliding along the walls/ceilings.

I've seen tentacles do that.

Why're the candles moving?

Re: Looking for alternative Teamcannon actor.

Posted: Mon Sep 18, 2017 11:47 pm
by Terraniux
The candles are just for testing purposes. Nothing more, nothing less. It's me learning a little bit more what's possible and what's not.

It's a very good thing this community has such nice people with talented skills. :highfive:


Barbie, you can say no to this question, but could you, if have the time, do the same job, for the MiniGunCannon?

You will earn big credit in my CMC project. :satan:

Re: Looking for alternative Teamcannon actor.

Posted: Tue Sep 19, 2017 6:21 am
by JackGriffin
I get where Barbie is coming from but this is a really bad way of doing things, especially if you are going to stack these into a map and run it online. Recode them so they can attach to the mover like everything else and don't use tick. This is going to impact the server, especially in an MH environment. I know you wanted to use standard actors but this is one instance where you are going to need to subclass and script because you are making some fundamental changes to the actor.

Re: Looking for alternative Teamcannon actor.

Posted: Tue Sep 19, 2017 1:31 pm
by Barbie
JackGriffin wrote:Recode them so they can attach to the mover like everything else
Just tell how to do that... The process of moving Actors with a Mover is done by native code - at least I did not find any UScript code for it.

Re: Looking for alternative Teamcannon actor.

Posted: Tue Sep 19, 2017 2:12 pm
by sektor2111
Barbie wrote:The process of moving Actors with a Mover is done by native code - at least I did not find any UScript code for it.
But you can do ignition to that code or power ON that thing from UScript.

Re: Looking for alternative Teamcannon actor.

Posted: Wed Sep 20, 2017 3:55 am
by JackGriffin
Barbie wrote:Just tell how to do that... The process of moving Actors with a Mover is done by native code - at least I did not find any UScript code for it.
I already did. Much like many decorations are bStatic you'll need to drop back to Pawn and build the cannon forward with settings that allow movement. When you do this then you'll be able to attach it and the native code will do it's magic. Basically you just need to remove the code that StationaryPawn is adding because almost all of it is preventing movement of any kind.

Terra, if you want you are welcome to email me and I'll build you something custom that will fit what you need.

Re: Looking for alternative Teamcannon actor.

Posted: Wed Sep 20, 2017 2:39 pm
by Terraniux
@ Jack

Yes I understand your statements. Then I suggest the using of this actor should stay for offline only. Got it.
So far I have not any performance issues, or errors to report in the offline usage. :thuup:


The actor I have now is perfect for my CMC map, and am helped with that.

So yes Jack I would like have this actor for offline and online in the future. But take your time, no haste. Will send pm later.

Thank you. :agree1:

Re: Looking for alternative Teamcannon actor.

Posted: Mon Sep 13, 2021 3:42 am
by Buggie
Found solution.

Code: Select all

class TeamCannonFix expands TeamCannon;

simulated function SpawnBase()
{
	local Actor OldBase;
	Local Actor MyBase;
	
	OldBase = GunBase;
	Super.SpawnBase();
	if (OldBase == None && GunBase != None && AttachTag != '')
	{
		foreach AllActors(class'Actor', MyBase, AttachTag)
		{
			GunBase.SetBase(MyBase);
			if (GunBase.Base != None)
				break;
		}
		SetBase(GunBase);
	}
}

simulated event BaseChange()
{
	if (GunBase != None && Base != GunBase)
		SetBase(GunBase);
}
on each change base we restore it to our GunBase, which attached to desired base. Event-driven solution.

Automatically merged

Above only concept. Ready for use class can be little bigger:

Code: Select all

class TeamCannonFix expands TeamCannon;

simulated function SpawnBase()
{
	local Actor OldBase;
	Local Actor MyBase;
	
	OldBase = GunBase;
	Super.SpawnBase();
	if (OldBase == None && GunBase != None && AttachTag != '')
	{
		GunBase.bHidden = bHidden;
		GunBase.DrawScale = DrawScale;
		foreach AllActors(class'Actor', MyBase, AttachTag)
		{
			GunBase.SetBase(MyBase);
			if (GunBase.Base != None)
				break;
		}
		SetBase(GunBase);
	}
}

simulated event BaseChange()
{
	if (GunBase != None && Base != GunBase)
		SetBase(GunBase);
}

function StartDeactivate()
{
	if (GunBase != None)
		StartingRotation = GunBase.Rotation;
	Super.StartDeactivate();
}
Fix work for hidden cannons.
Fix work for different sized cannons.
Fix deactivate pos for base with changed rotation.

Re: Looking for alternative Teamcannon actor.

Posted: Mon Sep 13, 2021 5:05 am
by TexasGtar
EvilGrins wrote: Sat Sep 16, 2017 9:40 pm Kinda like UFOs, .....................
I kinda like turtles. That's all I got.
------------------------------------
Over my head. But, I almost read the whole thing...so partial credit.
You guys and girl(s) are amazing.

I was going to say something stupid like bStatic=False but sorta glad I didn't embarrass myself.