Idea/Request/Does this exist?: Arena zone

Discussions about Coding and Scripting
Kayako

Idea/Request/Does this exist?: Arena zone

Post by Kayako »

I was wondering if something like this was possible to make, or even already existed.

Basically what I was looking for, was a zone that, when entered by players removed/changed friendly fire protections for the duration of their stay in them.
Basically, I was making a HUB map for my upcoming Monsterhunt server, and wanted to have an arena area where people could fight each other without disturbing the peace outside the arena!

I can probably think of other ways to do this too, running the HUB map on a deathmatch gametype springs to mind (Weapons are already removed upon level entry) but that would make it not show up on the MH server list. Would a zone like this be possible/easy to do? I don't want to ask for anything too outlandish or freakishly difficult! :lol2:
User avatar
Barbie
Godlike
Posts: 3325
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Idea/Request/Does this exist?: Arena zone

Post by Barbie »

Set FriendlyFireScale to 100%? Other area can be done peaceful with ZoneInfo.bNeutralZone.
"If Origin not in center it be not in center." --Buggie
Kayako

Re: Idea/Request/Does this exist?: Arena zone

Post by Kayako »

I mean, that would kinda work, I would have to make it like that for just that one area/map though! It wouldn't do to have it be on for every level in the server, I doubt people would enjoy that! :lol2:
User avatar
Barbie
Godlike
Posts: 3325
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Idea/Request/Does this exist?: Arena zone

Post by Barbie »

Kayako wrote: Tue Jul 15, 2025 10:16 pm I would have to make it like that for just that one area/map though
A custom Actor placed in the map could do that:

Code: Select all

class FriendlyFireScaleSet expands Keypoint;


var() byte FriendlyFireScalePercent;

event PostBeginPlay() {

	Super.PostBeginPlay();
	if (TeamGamePlus(Level.Game) == None)
	{
		warn(self @ "only works with Team Games - removing myself");
		Destroy();
		return;
	}
	TeamGamePlus(Level.Game).FriendlyFireScale = FriendlyFireScalePercent / 100;
	log(self $ ".PostBeginPlay: FriendlyFireScale set to" @ TeamGamePlus(Level.Game).FriendlyFireScale);
}


defaultproperties
{
	FriendlyFireScalePercent=100
	bStatic=False
}
But check if this setting is persistent between map switches (it should not).

EDIT: added defaultproperties in above code.
You do not have the required permissions to view the files attached to this post.
Last edited by Barbie on Wed Jul 16, 2025 12:03 am, edited 1 time in total.
"If Origin not in center it be not in center." --Buggie
Kayako

Re: Idea/Request/Does this exist?: Arena zone

Post by Kayako »

Ohh! I'll give it a try, thanks!

Edit-

Woo, it works as intended and doesn't seem to carry on between games, so this is good! Amazing even~! :tu:
User avatar
Barbie
Godlike
Posts: 3325
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Idea/Request/Does this exist?: Arena zone

Post by Barbie »

Ups, forget to add the:

Code: Select all

defaultproperties
{
	FriendlyFireScalePercent=100
	bStatic=False
}
Above code expanded.
"If Origin not in center it be not in center." --Buggie