Theme: Power
#1
Posted 18 April 2008 - 09:19 AM
Because of the low turn-out, the week 3 theme 'Upgrade' is still open for entries until the end of 'Power'.
The deadline for 'Power' is a long way off - this is to allow for such nasties as final exams, and people working on MSUC projects - it's May 16th.
Best of luck people.
#2
Posted 18 April 2008 - 12:33 PM
What about linking Mutator Week to Msuc ? Mutator Week could become intermediary deadlines. Power theme could be a way to work around the different weapons from Robot Factory
#3
Posted 18 April 2008 - 12:40 PM
#4
Posted 19 April 2008 - 12:39 AM
#5
Posted 19 April 2008 - 09:31 AM
I take a look at your mutator that's a nice one. It's so obvious that damage cause by a player should be health dependant.
Use Tick method with caution, as your mutator is working around health, you could create a GameRule and add the code of modifyPlayer in netDamage.
A bit more efficient
#6
Posted 19 April 2008 - 12:09 PM
#7
Posted 19 April 2008 - 03:27 PM
#8
Posted 22 April 2008 - 10:49 PM
Each player has a power gauge for his armour, it shields him as well as increasing the damage done by weapons. It starts at 100, and when taking no damage, recharges quickly back to 100, Ammunition pickups boost it by 20 up to a maximum of 150.
It would be simialar to halo recharging shields with the additional problem of loss of firepower when low on shield. I could also add an option (set in config or set in realtime with a key) so that you can choose how effective each system is, so you can either have effective shields and reatively ineffective weapons, or ineffective shields and very effective weapons.
#9
Posted 23 April 2008 - 07:44 AM
Indeed Config variables are usefud for balancing. You could add Shield Recharging Time Rate.
Good luck
#10
Posted 23 April 2008 - 09:35 AM
#11
Posted 23 April 2008 - 12:46 PM
First version ready to test
#12
Posted 23 April 2008 - 06:16 PM
#13
Posted 23 April 2008 - 07:18 PM
#14
Posted 23 April 2008 - 09:09 PM
class CH_PowerArmour_Item extends UTInventory; var float TimeLastHit; var byte DecimalHealth; function GivenTo(Pawn NewOwner, bool bDoNotActivate) { super.GivenTo(NewOwner, bDoNotActivate); SetTimer(0.1, true, 'Regenerate'); } function ItemRemovedFromInvManager() { ClearTimer(); } simulated function Regenerate() { if (UTPawn(Instigator) != None) { if ((WorldInfo.TimeSeconds - TimeLastHit) >= 5) { if (UTPawn(Instigator).ShieldBeltArmor <= 90) { UTPawn(Instigator).ShieldBeltArmor += 1; } else { if (UTPawn(Instigator).ShieldBeltArmor == 100) { if (DecimalHealth > 9) { UTPawn(Instigator).GiveHealth(2,100); DecimalHealth = 0; } else { DecimalHealth++; } } else { UTPawn(Instigator).ShieldBeltArmor = 100; } } } } } simulated function OwnerEvent(name EventName) { if (EventName == 'TakeDamage') { TimeLastHit = WorldInfo.TimeSeconds; } } defaultproperties { bReceiveOwnerEvents=True }
The last bit which waits for 'takedamage' can't be receiving the event.
I know getting an event to happen every 0.1 secs will put more strain on a system than once every 2 secs, but it does look better
*Edit* Just went searching for information on what arguments `log takes, and found.... this forum, thanks guys, specificly those posting code in the light mutator
Edited by jaguar, 23 April 2008 - 09:31 PM.
#15
Posted 23 April 2008 - 09:19 PM
#16
Posted 23 April 2008 - 09:28 PM
#17
Posted 23 April 2008 - 09:57 PM
#18
Posted 24 April 2008 - 12:20 AM
Nothing in the logs
class CH_PowerArmour_GameRules extends GameRules; var float TimeLastHit; var float TimeLastRegen; var byte DecimalHealth; simulated function tick() { if (WorldInfo.TimeSeconds - TimeLastRegen > 0.1) { Regenerate(); TimeLastRegen = WorldInfo.TimeSeconds; } } simulated function Regenerate() { if (UTPawn(Instigator) != None) { if ((WorldInfo.TimeSeconds - TimeLastHit) >= 5) { if (UTPawn(Instigator).ShieldBeltArmor <= 90) { UTPawn(Instigator).ShieldBeltArmor += 1; } else { if (UTPawn(Instigator).ShieldBeltArmor == 100) { if (DecimalHealth > 9) { UTPawn(Instigator).GiveHealth(2,100); DecimalHealth = 0; } else { DecimalHealth++; } } else { UTPawn(Instigator).ShieldBeltArmor = 100; } } } } } simulated function OwnerEvent(name EventName) { if (EventName == 'TakeDamage') { TimeLastHit = WorldInfo.TimeSeconds; } } function NetDamage( int OriginalDamage, out int Damage, pawn injured, Controller instigatedBy, vector HitLocation, out vector Momentum, class<DamageType> DamageType ) { if (UTPawn(Instigator) != none) { Damage = OriginalDamage * (1 + UTPawn(Instigator).ShieldBeltArmor / 100); } if ( NextGameRules != None ) NextGameRules.NetDamage( OriginalDamage,Damage,injured,instigatedBy,HitLocation,Momentum,DamageType ); } defaultproperties { TimeLastHit = 0; TimeLastRegen = 0; DecimalHealth = 0; }
#19
Posted 24 April 2008 - 07:12 AM
If I'm not wrong, Mutator and GameRules run on Server, so you can't use instigator:
2 ways:
- You can use arguments' method to get what you need :
function NetDamage( int OriginalDamage, out int Damage, pawn injured, Controller instigatedBy, vector HitLocation, out vector Momentum, class<DamageType> DamageType )
- You can loop on pawn using foreach method
local UTPawn pawn //iterator foreach WorldInfo.allPawn(class'UTPawn', pawn) { }
#20
Posted 24 April 2008 - 12:04 PM
Also do you mean i can delete (Instigator) from the damage function?
I'm enthusiastic, but don't have that much experience.
Edited by jaguar, 24 April 2008 - 12:10 PM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users