So, Deco don't spawn pawns.

Tutorials and discussions about Mapping - Introduce your own ones!
Red_Fist
Godlike
Posts: 2164
Joined: Sun Oct 05, 2008 3:31 am

So, Deco don't spawn pawns.

Post 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:
Binary Space Partitioning
nogardilaref
Masterful
Posts: 577
Joined: Tue Jun 20, 2017 1:00 pm
Personal rank: ⚋⚊⚌☰⚞⌖⚟☰⚌⚊⚋

Re: So, Deco don't spawn pawns.

Post 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.
User avatar
sektor2111
Godlike
Posts: 6410
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: So, Deco don't spawn pawns.

Post 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 :| .
User avatar
Barbie
Godlike
Posts: 2802
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: So, Deco don't spawn pawns.

Post by Barbie »

Hmm, why not spawn with a CreatureFactory and a SpawnPoint? Just set Decoration.Event == CreatureFactory.Tag == SpawnPoint.Tag.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
sektor2111
Godlike
Posts: 6410
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: So, Deco don't spawn pawns.

Post by sektor2111 »

Yeah, good question...
Red_Fist
Godlike
Posts: 2164
Joined: Sun Oct 05, 2008 3:31 am

Re: So, Deco don't spawn pawns.

Post 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
Binary Space Partitioning
User avatar
sektor2111
Godlike
Posts: 6410
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: So, Deco don't spawn pawns.

Post by sektor2111 »

And then probably it will not be Bot Support here... unless you want to put some love in map.
User avatar
Barbie
Godlike
Posts: 2802
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: So, Deco don't spawn pawns.

Post 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.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Red_Fist
Godlike
Posts: 2164
Joined: Sun Oct 05, 2008 3:31 am

Re: So, Deco don't spawn pawns.

Post 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:
Binary Space Partitioning
nogardilaref
Masterful
Posts: 577
Joined: Tue Jun 20, 2017 1:00 pm
Personal rank: ⚋⚊⚌☰⚞⌖⚟☰⚌⚊⚋

Re: So, Deco don't spawn pawns.

Post 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.
User avatar
Barbie
Godlike
Posts: 2802
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: So, Deco don't spawn pawns.

Post 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.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Red_Fist
Godlike
Posts: 2164
Joined: Sun Oct 05, 2008 3:31 am

Re: So, Deco don't spawn pawns.

Post 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
Binary Space Partitioning
User avatar
Barbie
Godlike
Posts: 2802
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: So, Deco don't spawn pawns.

Post 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.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Red_Fist
Godlike
Posts: 2164
Joined: Sun Oct 05, 2008 3:31 am

Re: So, Deco don't spawn pawns.

Post 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)
Binary Space Partitioning
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: So, Deco don't spawn pawns.

Post 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.
So long, and thanks for all the fish
Post Reply