spawning pawn fails on overlapping collision cylinder

Discussions about Coding and Scripting
MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: spawning pawn fails on overlapping collision cylinder

Post by MrLoathsome »

I doubt if any of us are having problems with the "Basic Logic" :what:

Think we got 2 minor problems.

1. We are all looking at this issue but from slightly different angles depending upon what we are working on atm.
2. We are overthinking it all. (I stole that line from Wormbo... :tongue: )

If I look back at my previous versions of SwarmSpawner and other mutators I did that were spawning things I was using
a LOT of multiple, repetitive, redundant, unneeded Collision Checks/Traces etc. using damn near any method I could find examples of or come up with myself.
(FeraliDragon even wrote one of the old functions for me.... It worked perfect of course. :tu: I thought I needed it. :omfg: I don't. 8) )

Those are all gone now.

The current Preview III release of that only does 1 RadiusActors check, (with a small radius), and the pre-spawn check on Region.Zone==0.
It seems to work a LOT better. And I have it designed to deal with real-time gameplay. A possible spawnpoint that is valid
one moment, might not be valid the next. So in cases where the spawn fails, it just gets queued up for a later attempt.
Will be tweaking the building of the spawnpoint list and a few other things for the final of that, but don't think any major changes to
that core actor spawning code will happen.

Things may/probably need to be done somewhat differently in cases where you are attempting to adjust things that already exist by default in a map.

*Imagine if you came up with a way to have a different custom SwarmSpawn.ini for each map. You could tweak a lot.
blarg
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: spawning pawn fails on overlapping collision cylinder

Post by Barbie »

I think I got it now: the view behind the curtain showed me Actor.EncroachingOn() and that lead me to »bBlockActors« and »bCollideActors«. If bBlockActors is set to FALSE, the event EncroachingOn() is not raised and the Pawn does not destroy itself and is created successfully, even within another Pawn. So Sector was right with his guess that I am "doing something wrong at creature's collision". :twisted:

Setting bBlockActors=FALSE in class' default properties, spawning the Actor and then restoring the previous default value of bBlockActors solves the problem. If spawning was successful, the new Actors property »bBlockActors« has to be set to the class' default value.

Code: Select all

function Actor SpawnActor(class<Actor> SpawnClass, ELogType LogLevel, optional Actor SpawnOwner, optional name SpawnTag, optional Vector SpawnLocation, optional Rotator SpawnRotation) {
/******************************************************************************
Tries to spawn an Actor of the given *SpawnClass* with the property
bBlockActors=false. If spawn was successful, Actor.bBlockActors is reset to
class' default value.
Either the new Actor is returned or None if spawn failed.
******************************************************************************/
local Actor result;
local bool bOldBlockActors;

	bOldBlockActors = SpawnClass.Default.bBlockActors;
	SpawnClass.Default.bBlockActors = false;
	result = spawn(SpawnClass, SpawnOwner, SpawnTag, SpawnLocation, SpawnRotation);
	SpawnClass.Default.bBlockActors = bOldBlockActors;
	if (result == None)
	{
		if (LogLevel > LOG_None)
			warn("could not spawn" @ SpawnClass @ "at location" @ SpawnLocation);
	}
	else
	{
		result.SetCollision(, SpawnClass.Default.bBlockActors);
		if (LogLevel >= LOG_Info)
			LogEx("SpawnActor", "spawned" @ SpawnClass @ "at location" @ SpawnLocation);
	}
	return result;
}
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: spawning pawn fails on overlapping collision cylinder

Post by sektor2111 »

Basic skeleton of replacing was done somewhere in whatever Coop which I found but it was in a raw form. In that time I was hunting a solution for replacements (S..Berserker was first target). Mars007 participated with a hint as long as sometimes my replacements were failing but I was oriented in leaving original alone to avoid a broken map - I never loved mods with missing monsters.
MrLoathsome wrote:I doubt if any of us are having problems with the "Basic Logic" :what:
Problem was replacements done in a group or pawns. That was my "basic logic" big failure from that time:
Pawn A replaced with Pawn AA. Pawn AA which has been spawned simple fuc..ed up location for Pawn B which was about to be replaced with Pawn BB. All these happening in a MAP Swarm not "added" swarm with a computed spawn-box. Result - half of group has been replaced and a few of them... NONE... actually Pawn BB couldn't get into stage because of Pawn AA. All later Pawn CC and Pawn DD could not be spawned because of new Pawn AA. So to speak never thinking at new stuff spawned what it does. You'll be surprised how much you can fail at a moment... :mrgreen: all these coming in a timer slowing down processes and needing additional considerations...
Solution was spawning and removing collision immediately else others closer will mock things un-replaced. I simply did these without to even look at "encroachment" because of another amoeba-like logic: CREATUREFACTORY spawning pupaes. If pupae spawned was hanging in spot (because player has been already murdered) a new Pupae could not spawn because Encroachment DOESN'T exist at monsters - monsters don't teleffrag nothing - spawning spot has been blocked :mrgreen:, except QUEEN types, killing everything when they do spawn and this is how do works "(_@_)" whatever mutator where "queen" can spawn with any matter, and we also can mention those retarded as shit maps where queens are telefragging other queens ruining counters and breaking things doesn't matter fix1024 of that map - that's lottery not map.
At these cute-nice experiments I could figure other "options" while I was blabbering with PrimitiveMesh by Higor, feel free to experiment stuff because it might help in understanding some "hints".

Edit:The major Hint of fixing something is breaking another thing forward.
We might have a Level containing a Proximity Trigger not related to ScriptedPawn but stupidly referring to a certain class - which your mod will replace... because you have problem solved :what: He, he, problem solved :satan: , next one is coming... created by an "awesome" fix. Of course we speak about a non-stock creature coming from one of those lousy packages duplicated by some sick mind. That's about stuff beyond 2012 - End Of World forgot to come for saving MH so more crap has been released...

Edit2:Minor Hint for getting rid of trash.
By having good stuff and not doing tweaks and replacements simply game runs much smoother and troubles related to "class.name" links doesn't exist. When some package exist in 2 or multiple forms causing a mismatch then I'm not interested about any of those packages. I get one, I do testing it, I'm fixing it to have a "native" good load (GenestPawn.u, mrl.u, AMW_beta1.u, and so on with a trash list) and which I'm no longer interested about their origins and new tweaks/replacements. You'll be surprised how well can run a map having these fixed including that "awesome" SFC.u.
Some of them have "INT" values involving non number chars which I don't even load in memory - so to speak evil modders "helping UT" were only bullshitting not coding/modding, others having weapon with no mesh - go fire that crap - like nobody can figure what they have been doing - just Idiots. Take your time and look at them, I don't dare to use them any more, if these are requested I'll deliver "wrong files" as long as I rammed server too much time with manure. Read well, my U files are not "originals" got from redirects or UZ stuff because those are packages released by insane people.
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: spawning pawn fails on overlapping collision cylinder

Post by Barbie »

sektor2111 wrote:We might have a Level containing a Proximity Trigger not related to ScriptedPawn but stupidly referring to a certain class - which your mod will replace...
Never thought of this case. :lol2:
Usually my replacements of Pawns are a sub class of the original, so that should not be a problem.
If not and that Trigger is relevant for game flow, that map has to be patched then (on run time).
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: spawning pawn fails on overlapping collision cylinder

Post by MrLoathsome »

As an insane idiot, I find this thread offensive.
blarg
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: spawning pawn fails on overlapping collision cylinder

Post by sektor2111 »

Good... then I'm not gonna post info about "MH stuff" which I've used for years only bugging me.
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: spawning pawn fails on overlapping collision cylinder

Post by Barbie »

MrLoathsome wrote:As an insane idiot, I find this thread offensive.
sektor2111 wrote:Good... then I'm not gonna post info
It wasn't my intention to snub anyone here. What did I wrong?
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: spawning pawn fails on overlapping collision cylinder

Post by sektor2111 »

Barbie wrote:It wasn't my intention to snub anyone here. What did I wrong?
I don't know... and also I don't know why the truth revealed is disturbing. You have find some troubles which seems nasty, I pointed them more clearly, perhaps we must laugh with mouth at ears about those things done to UT. All right then, I won't debate problems/bugs from now on, it's time to go back in my box because reading through forums is not that productive.
MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: spawning pawn fails on overlapping collision cylinder

Post by MrLoathsome »

Barbie wrote:
MrLoathsome wrote:As an insane idiot, I find this thread offensive.
sektor2111 wrote:Good... then I'm not gonna post info
It wasn't my intention to snub anyone here. What did I wrong?
You did nothing wrong.

I was joking, I thought...... :?

I hope Sector is joking also, or I have a real nice long detailed reply on the subject that he won't like at all.
blarg
MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: spawning pawn fails on overlapping collision cylinder

Post by MrLoathsome »

sektor2111 wrote:Good... then I'm not gonna post info about "MH stuff" which I've used for years only bugging me.
MH sucks anyway.
Last edited by MrLoathsome on Sun Jul 03, 2016 2:07 am, edited 1 time in total.
blarg
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: spawning pawn fails on overlapping collision cylinder

Post by Barbie »

Take a deep breath and then a cup of tea or something... :wink: Remember that English isn't our native language and therefore it might be difficult to put things straight and point out the matter.

Apart of that if I get offended by a posting (not only here but on FaceBook or anywhere else) I try just to read over and to ignore it, trying to keep a thick skin.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Post Reply