Page 1 of 4

So, Deco don't spawn pawns.

Posted: Tue Aug 01, 2017 8:14 pm
by Red_Fist
Cuz it sucks that they don't, seems there should be some code to make that work only. Not a mutator or elaborate features added in, just "decoration" spawn pawns, only pawns.

You would think it's an easy find some file, or topic, on the internet, but it isn't.

Yes I know AKCoop does that, but I want code or an actor for mapping, and no other function.

I assumed any deco that breaks would just spawn ANY actor you wanted, but I think they geared it for "Pickups",,,dropped.

It won't even allow you to paste or type a pawn class in the deco contents properties. :cry:

Re: So, Deco don't spawn pawns.

Posted: Tue Aug 01, 2017 8:36 pm
by nogardilaref
It's not that Decoration doesn't allow the spawn of pawns, it actually only allows the spawn of Inventory (weapons, ammo, pickups, etc).
You could even try to set it to spawn projectiles, other decoration, effects, etc, and it wouldn't work for the exact same reason.

Furthermore, it's fairly obvious, from the code itself that is, that such a feature wasn't well thought at all. They needed decoration to spawn hidden items in Unreal, so they just added "contents", "content2" and "content3", so they didn't even think in adding it as an array of things, and didn't even bother to maintain their own naming conventions, all of which indicates rushed work towards a deadline, and it stayed that way.
No one can really blame them, we probably wouldn't even have UT otherwise.

Anyway, your only hope is for a custom decoration with a property where you can set anything to be spawned from. This means that either you extend the decoration class you want yourself, or someone does it for you and wraps it into a small neat package. I would suggest to tackle the former, but you can try your luck and request the latter.

Re: So, Deco don't spawn pawns.

Posted: Tue Aug 01, 2017 9:13 pm
by sektor2111
I thought that this problem was already debated.
If not, we can recall some... features. Item spawned will have ROLE_DumbProxy - visually speaking it is a bit borked at this point. I'm not curious about such pawns looking like sh!t in Net-Games.

Code: Select all

		dropped = Spawn(tempClass);
		dropped.RemoteRole = ROLE_DumbProxy;
		dropped.SetPhysics(PHYS_Falling);
		dropped.bCollideWorld = true;
		if ( inventory(dropped) != None )
			inventory(dropped).GotoState('Pickup', 'Dropped');
Then if we check class in detail we have VARS

Code: Select all

var() class<inventory> contents;
var() class<inventory> content2;
var() class<inventory> content3;
I believe Inventory is not Pawn exactly like a fish is not a car.
However, this is doable with a bit of coding - AS USUAL :| .

Re: So, Deco don't spawn pawns.

Posted: Tue Aug 01, 2017 9:17 pm
by Barbie
Hmm, why not spawn with a CreatureFactory and a SpawnPoint? Just set Decoration.Event == CreatureFactory.Tag == SpawnPoint.Tag.

Re: So, Deco don't spawn pawns.

Posted: Tue Aug 01, 2017 9:32 pm
by sektor2111
Yeah, good question...

Re: So, Deco don't spawn pawns.

Posted: Wed Aug 02, 2017 3:20 am
by Red_Fist
Barbie wrote:Hmm, why not spawn with a CreatureFactory and a SpawnPoint? Just set Decoration.Event == CreatureFactory.Tag == SpawnPoint.Tag.
I have a lot of deco to break and I already have a creature factory and keypoint (Higors non navpoint version) for each one, up to 40 already. And that is just barrels and need way more of them and also will have the pottery and vases.

Probably be 200 400 , not sure how I want to space things out yet.

Each deco is going to spawn only one pawn. I made a new skaarj pawn so far. it's just a map idea I want to do without using AKcoop2

Re: So, Deco don't spawn pawns.

Posted: Wed Aug 02, 2017 5:04 am
by sektor2111
And then probably it will not be Bot Support here... unless you want to put some love in map.

Re: So, Deco don't spawn pawns.

Posted: Wed Aug 02, 2017 11:26 am
by Barbie
Red_Fist wrote:Probably be 200 400
This sounds like you'll need a custom solution... What about an Actor that spawns another (configurable) Actor (a ScriptedPawn in your case) if triggered at the triggerer's location with triggerer's rotation? Then you can assign different Events to your barrels, pottery and vases, use 3 different of above described "ThingSpawner" to spawn things at their locations.

Re: So, Deco don't spawn pawns.

Posted: Wed Aug 02, 2017 5:35 pm
by Red_Fist
Problem is no matter how I trigger it, each deco has to have it's own event, I don't want any other broken unless it's a shot or damage.

So if I triggered the creature factory with a round robin or some other thing other than the exact barrel that got broken event, then others get triggered even if the barrel is not broken-damage.

Then on top of that I need to use even more creature factories per area for regular spawned pawns more than one, only a few placed pawns per area.

so the map will have a huge amount of these factories. :evil:

Re: So, Deco don't spawn pawns.

Posted: Wed Aug 02, 2017 7:46 pm
by nogardilaref
Well, there comes a time in the life of every dedicated mapper, when they need to learn how to do at least some very basic scripting. :tu:
And they are never the same again once they do.

Re: So, Deco don't spawn pawns.

Posted: Wed Aug 02, 2017 10:15 pm
by Barbie
Red_Fist wrote:Problem is no matter how I trigger it, each deco has to have it's own event, I don't want any other broken unless it's a shot or damage.
Probably you didn't get the idea: if a Decoration is destroyed, it fires its Event. The "ThingSpawner" receives this event and spawns a thing at the location of the Decoration that has fired the event (=the Decoration that was destroyed). So you'll need such a "ThingSpawner" only for each group of things (pawns) you want to spawn.

Re: So, Deco don't spawn pawns.

Posted: Wed Aug 02, 2017 10:43 pm
by Red_Fist
That is what I have, barrel event spawns factory, but that means I need two more actors for each deco than if the deco did it itself.

And I did try to mess with the code but you can't make another top "decoration" class it won't compile because it refers back to abstract which I think means the engine only knows one word to work "decoration".
So that means you have to insert some added code as a subclass of decoration to override or change the top class, telling it to only spawn pawns. :noidea

Re: So, Deco don't spawn pawns.

Posted: Wed Aug 02, 2017 11:12 pm
by Barbie
Maybe someone else can explain him what I mean... :noidea

Another option: tell us what you want to achieve - probably we can code you a solution for it.

Re: So, Deco don't spawn pawns.

Posted: Thu Aug 03, 2017 2:03 am
by Red_Fist
The only code would be to make all breakable deco to spawn a pawn.

OK, do you mean make each deco class spit out the same pawn but only drop it at the "location" of that deco ?

Each breakable type vases barrels will only have the same pawn per type.

Check your PM (Barbie)

Re: So, Deco don't spawn pawns.

Posted: Thu Aug 03, 2017 3:42 am
by JackGriffin
If you are interested in doing a deco improvement you are welcome to grab this:
NKdbYbFk3bQ

There's more to it than what you see. I pretty much added effects to all the standard deco classes and even coded a replacement mod that will swap them at runtime for you:
w9oyS-D4XZU

Decoration damage is monitored so that wooden objects will burn if hit with an energy weapon, otherwise they just bust apart. It's logically based.

This is for Unreal but it would directly translate into UT with very little (to no) effort. The mod will preserve contents of any replaced deco and you could easily address the issues around pawn spawning. The effects are nice and not overdone but you are welcome to do whatever you want with it, as always.