Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation
previous class next class | frames no frames

# Gameplay.MPPowerUp

00001 00002 00003 00004 00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075

    class MPPowerUp extends MPCarryable;

    var() String	movementConfig			"If provided, this physics configuration will be applied to the carrier.";
    var() float		damageReductionScale	"If non-zero, multiplies all damage taken by this amount.  NOT YET IMPLEMENTED.";
    var() float		damageInflictionScale	"If non-zero, multiplies all damage inflicted by this amount.  NOT YET IMPLEMENTED.";

    // addObjectives
    function addObjectives()
    {
    }

    function onPickedUp(Character c)
    {
    	//Level.Game.BroadcastLocalized(self, class'MPBallMessages', 4);
    	Level.Game.Broadcast(self, "You got a powerup.");

    	enableBenefits();
    }

    function enableBenefits()
    {
    	if (carrier == None)
    		return;

    	if (movementConfig != "")
    		enableMovementConfiguration();
    }

    function disableBenefits()
    {
    	if (carrier == None)
    		return;

    	disableMovementConfiguration();
    }

    function onDropped(Controller c)
    {
    	disableBenefits();
    }

    function onExistenceTimerExpired()
    {
    	disableBenefits();
    }

    function enableMovementConfiguration()
    {
        // glenn: note this is obsolete see character.tick for new technique for MP configuration switches

    //	carrier.movementConfiguration = movementConfig;
    //	carrier.combatRole.default.armorClass.static.updateCharacterPhysics(carrier);
    }

    function disableMovementConfiguration()
    {
        // glenn: note this is obsolete see character.tick for new technique for MP configuration switches

    //	carrier.movementConfiguration = carrier.combatRole.default.armorClass.default.movementConfiguration;
    //	carrier.combatRole.default.armorClass.static.updateCharacterPhysics(carrier);
    }

    defaultproperties
    {
    	DrawType				= DT_StaticMesh
    	StaticMesh				= StaticMesh'MPGameObjects.Ball'
    	idleAnim				= None;
    	elasticity				= 0.4
        bUseCylinderCollision	= false

    	returnTime					= -1
    	minRespawnTime				= 30
    	maxRespawnTime				= 30
    	existenceTime				= 15
    }

Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation
previous class next class | frames no frames

Class file time: ne 5.9.2004 15:53:18.000 - Creation time: st 23.5.2018 00:10:45.954 - Created with UnCodeX