logo
Main

Forums

Downloads

Unreal-Netiquette

Donate for Oldunreal:
Donate

borderline

Links to our wiki:
Wiki

Walkthrough

Links

Tutorials

Unreal Reference

Usermaps

borderline

Contact us:
Submit News
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic I need your help! Masterkent!! (Read 447 times)
elucaso
New Member
*
Offline


Oldunreal member

Posts: 7
Joined: Feb 20th, 2016
I need your help! Masterkent!!
May 18th, 2018 at 5:19pm
Print Post  
Hello Mk. I'm sending to you this message with the hope that you can help us. We have a small problem about the Morose map. The problem is the enemy spawn rate. We want to make sure that everytime the monsters had 100% spawn chances (Like the Coop-Contest). Do you know how to fix this?

Lucaso - Commander of the Confederacion Sigma |-{*E*}-|
  
Back to top
 
IP Logged
 
Masterkent
Developer Team
Offline



Posts: 1337
Location: Russia
Joined: Apr 5th, 2013
Gender: Male
Re: I need your help! Masterkent!!
Reply #1 - May 18th, 2018 at 7:45pm
Print Post  
I guess, you need something like this:

Code
Select All
class NonrandomAppearing expands Mutator;

event BeginPlay()
{
	local Actor A;
	local byte bSuperRelevant;

	foreach AllActors(class'Actor', A)
		CheckReplacement(A, bSuperRelevant);
}

function bool CheckReplacement(Actor A, out byte bSuperRelevant)
{
	local class<Actor> DecorationContents;

	if (0 < A.OddsOfAppearing && A.OddsOfAppearing < 1)
		A.OddsOfAppearing = 1;

	if (Decoration(A) != none && !A.IsA('MarineBox'))
	{
		if (Decoration(A).Contents != none && ClassIsChildOf(Decoration(A).Contents, class'Pawn'))
			DecorationContents = Decoration(A).Contents;
		else if (Decoration(A).Content2 != none && ClassIsChildOf(Decoration(A).Content2, class'Pawn'))
			DecorationContents = Decoration(A).Content2;
		else if (Decoration(A).Content3 != none && ClassIsChildOf(Decoration(A).Content3, class'Pawn'))
			DecorationContents = Decoration(A).Content3;

		if (DecorationContents != none)
			Decoration(A).Contents = class<Pawn>(DecorationContents);
		Decoration(A).Content2 = none;
		Decoration(A).Content3 = none;
	}

	return true;
} 


Such implementation should also guarantee that every standard destructible decoration, which has a content, spawns the same actor every time when it's destroyed.

https://www.upload.ee/files/8453910/NonrandomAppearing.u.html

Usage: include mutator NonrandomAppearing.NonrandomAppearing

How you can check if the mutator is included: switch level to Bluff.unr using difficulty 3 - you should see a Skaarj right after the doors near the start. His OddsOfAppearing is only 0.05 (5%), so if he appears 4 - 5 times in a row after restarting the level, then either the mutator is on or you're very lucky.

P.S. I think, you should give more appropriate titles to such topics.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint
Bookmarks: del.icio.us Digg Facebook Google Google+ Linked in reddit StumbleUpon Twitter Yahoo