News UnrealEd Files Mods FragBU Liandri Archives
BeyondUnreal Forums

Go Back   BeyondUnreal Forums > Unreal Development > Coding

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 22nd Apr 2004, 09:23 AM   #1
SlayerDragon's Avatar
Join Date: Feb. 3rd, 2003
Posts: 7,667
[UT2004] Mutator Modifying Adrenaline

I am trying to randomly set the amount of points a pill gives you to a negative amount. Here is the code:
var() float chanceOfDowner;

function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
	local AdrenalinePickup P;
	if( AdrenalinePickup(Other)!=NONE )
		if( FRand() <= chanceOfDowner )
		P = AdrenalinePickup(Other);
		P.AdrenalineAmount = - P.AdrenalineAmount; //invert adrenaline amount
	return false;	//don't replace

	chanceOfDowner = 0.5;
This refuses to change the AdrenalineAmount! I have tried doing it like this:

	P.default.AdrenalineAmount = - P.default.AdrenalineAmount;
Still, no effect. I tried changing the pickup message, and this is the only one that worked:

	P.default.PickupMessage = "Downer ";
However, this changes the pickup message for ALL pills in the level.

Anyone know what I am doing wrong?
        __   ,    _   __   ,
 |   | /  \_/ \_|/ \_/  \_/ \_
  \_/|/\__/  \/ |__/ \__/  \/
    /|         /|  
    \|         \|
SlayerDragon is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -5. The time now is 07:16 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2015, vBulletin Solutions, Inc.

Copyright ©1998 - 2015, BeyondUnreal
Privacy Policy | Terms of Use
Bandwidth provided by AtomicGamer