random MOSTLY silly notion

Tutorials and discussions about Mapping - Introduce your own ones!
User avatar
EvilGrins
Godlike
Posts: 10294
Joined: Thu Jun 30, 2011 8:12 pm
Personal rank: God of Fudge
Location: Palo Alto, CA

random MOSTLY silly notion

Post by EvilGrins »

In a lot of MonsterHunt maps all you need to do to access the exit is kill a final boss monster, an annoyance to many as they have to deal with other players who rush to the exit preventing most players who want to take the time to track down all monsters and kill them.

My love of UTDM-monsters being what it is, I periodically toyed with the notion of using a UTDMT as a final boss monster in a devious way.

Image

Once the UTDMT is killed, the exit opens... but as a UTDMT can respawn, every time it comes back to life the exit closes again.

Thoughts?
User avatar
Delacroix
Adept
Posts: 352
Joined: Thu Mar 25, 2010 6:00 pm
Personal rank: UMS R&D CEO

Re: random MOSTLY silly notion

Post by Delacroix »

It'd be more productive to discuss with MH server admins as to why setting a number of minimum monster percentage on map to be killed in order for the exit to be unlocked IMO.
User avatar
sektor2111
Godlike
Posts: 6460
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: random MOSTLY silly notion

Post by sektor2111 »

EG, you forgot to play MH-MrTitan whatever version...
I don't remember Mr.Titan to re-spawn and locking back the end due to MH's "Lives" deal.
And then ? Why would do we need to spend there 3 months in a single map ?
I would like to ask if anybody is able to do just a complete and normal map, perhaps with cute small custom things added, but I think it's not the right question...
User avatar
EvilGrins
Godlike
Posts: 10294
Joined: Thu Jun 30, 2011 8:12 pm
Personal rank: God of Fudge
Location: Palo Alto, CA

Re: random MOSTLY silly notion

Post by EvilGrins »

sektor2111 wrote: Sat Jan 04, 2025 10:04 pmWhy would do we need to spend there 3 months in a single map?
Wouldn't be that bad.

Respawn time for UTDM-monster is preset to 30 seconds, but it can be adjusted. You kill it, get to the exit before it respawns, you're good to go.
User avatar
Barbie
Godlike
Posts: 3005
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: random MOSTLY silly notion

Post by Barbie »

Delacroix wrote: Sat Jan 04, 2025 9:11 pm It'd be more productive to discuss with MH server admins as to why setting a number of minimum monster percentage on map to be killed in order for the exit to be unlocked IMO.
Its Event (to activate MonsterEnd) is only risen if less or equel *RemainingAllowed* ScriptedPawns exist. Currently injected in runtime in map "MH-SkyLand1-1.unr" on BarbiesWorld.

Code: Select all

class MonsterEndTrigger Expands Trigger;


var() byte		RemainingAllowed; // how many ScriptedPawns may live before Trigger is enabled?
var() bool		bAttitudeHateOnly; // count only ScriptedPawns with AttitudeToPlayer=ATTITUDE_Hate
var() String	DeniedMessage; // What message when too many ScriptedPawns are alive?


function int ScriptedPawnsCount(bool bAttitudeHateOnly) {
local Pawn P;
local int result;

	for(P = Level.PawnList; P != None; P = P.nextPawn)
		if ( ! bAttitudeHateOnly || P.AttitudeToPlayer == ATTITUDE_Hate)
			if (ScriptedPawn(P) != None)
				result++;
	return result;
}


event InstigatorClientMessage(string Msg, Actor Receiver) {
	if (Msg != "")
		// Send a string message to the toucher.
		Receiver.Instigator.ClientMessage(Msg);
}



function Touch(actor Other) {
local Actor A;
local int LivingScriptedPawns;
local int i;
local string s;

	if (IsRelevant(Other))
	{
		if (ReTriggerDelay > 0)
		{
			if ( Level.TimeSeconds - TriggerTime < ReTriggerDelay )
				return;
			TriggerTime = Level.TimeSeconds;
		}
		LivingScriptedPawns = ScriptedPawnsCount(bAttitudeHateOnly);
		if (LivingScriptedPawns > RemainingAllowed)
		{
			log(self @ "TriggerEvent denied, DeniedMessage=" $ DeniedMessage);
			if (DeniedMessage != "")
			{
				s = DeniedMessage;
				i = InStr(s, "%d");
				if (i >= 0)
					s = left(s, i) $ LivingScriptedPawns $ Right(s, len(s) - (i + len("%d")));
					// Kill all 173l %d remaining Monster to activate MHEnd
					// Kill all %d remaining Monster to activate MHEnd
				log(self @ "new DeniedMessage=" $ s);
				InstigatorClientMessage(s, Other);
			}
			return;
		}

		// Let's go!

		// Broadcast the Trigger message to all matching actors.
		if (Event != '')
			foreach AllActors(class 'Actor', A, Event)
				A.Trigger(Other, Other.Instigator);

		if ( Other.IsA('Pawn') && (Pawn(Other).SpecialGoal == self) )
			Pawn(Other).SpecialGoal = None;

		InstigatorClientMessage(Message, Other);

		if (bTriggerOnceOnly)
			// Ignore future touches.
			SetCollision(False);
		else if (RepeatTriggerTime > 0)
			SetTimer(RepeatTriggerTime, false);
	}
}



defaultproperties {
	RemainingAllowed=0
	bAttitudeHateOnly=true
	ReTriggerDelay=5
	DeniedMessage="Kill %d remaining Monster to activate MHEnd"
}
"If Origin not in center it be not in center." --Buggie