There is no spoon

User:Crusha/UltimateMappingTools/ScoreContainer

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search

The following four Actors are all related to implementing a custom score system in maps, allowing to create an RTS-like resource system or simply doing addition and subtraction based event triggering.


ScoreContainer

by Crusha K. Rool

UT2004 Object >> Actor >> Triggers >> EventGate >> ScoreContainer (custom)

Stores the value of a global custom score for both teams. (Max: 2.147.483.647; Min: 0)


Property group 'ScoreContainer'

InitialScoreRed/Blue

Type: int

The score that is on the team's account at the beginning of a round. Red and Blue means the sides in the first round. The values are swapped automatically when the ONS server has the setting to switch teams after reset, so that the chances are equal for both teams.

bDisplayScoreInHUD

Type: bool

Display the current score of a team to that team. The enemy's score will not be visible. Spectators will see both teams' score. Default value: True

ScoreFontSize

Type: int

Allows to set the size for the font with that the score is displayed in the HUD. Don't choose too extreme values or you will get problems with the displaying to spectators. Default value: -2

Red/BlueScorePrefix=

Type: string

This string component will be put infront of the score that is displayed in the HUD. Notice that there is no automatic space between the prefix and the actual score, so you need to enter a space at the end of the prefix by yourself if you wish to have one.

Red/BlueScoreSuffix=

Type: string

Same as above, just that this will be put behind the score. Again, you need to enter the space by yourself if you want it to be there.

Red/Blue/SpectatorScorePosX=

Type: float

The relative location of the screen coordinates where the message should appear in the HUD. Enter values between 0 and 1; 0 is the top left corner, 1 the bottom right. There is one for each team so that you can adjust the position a bit in case that a message doesn't fit the screen properly. It is possible to enter absolute values (above 1), but it's not recommend as those won't consider the player's resolution and will look bad in most cases. Spectators will see both strings below each other, starting at the defined position.

Red/Blue/SpectatorScorePosY=

Type: float

Same as above, just for Y-coordinates.


ScoreAdd

by Crusha K. Rool

UT2004 Object >> Actor >> Triggers >> EventGate >> ScoreAdd (custom)

Adds a fixed value to a team's score in the Target-ScoreContainer when triggered.

Don't worry, if you'd increase a ScoreContainer-value of around 0 by 10000 per second, then you would still need 2 days 11 hours 39 minutes 8 seconds to exceed the maximum. ;)


Property group 'ScoreAdd'

AddValue

Type: int

How much to add on each triggering.

TeamNum

Type: byte

Add the score to which team's account? 0= Red; 1= Blue The teams are automatically switched if necessary.

TeamNumCanTrigger

Type: byte

If set to something else than 255, this will only be activated if the Instigator's TeamNum matches the number that is specified here, so that the enemy can't do things with your score. The success of this depends on whether the trigger-chain reaction passes the information about the Instigator, if an Instigator exists.

TargetContainer

Type: class<ScoreContainer>

Modifiers: EdFindable

Add the score to the account in this container.

LoopTime

Type: float

If greater than 0, this will add the AddValue every time when this much time has passed. This is enabled on triggering and disabled on untriggering then. Take in mind that if TeamNumCanTrigger is set to something different from 255, this can also only be untriggered by a member of it's own team.


ScoreSubtract

by Crusha K. Rool

UT2004 Object >> Actor >> Triggers >> EventGate >> ScoreSubtract (custom)

Subtracts a fixed value from a team's score in the TargetScoreContainer when triggered. It will then trigger an event if the Team had enough "credit" on it's account. Negative values in the ScoreContainer are not possible, so if the team didn't have enough credit nothing will be subtracted.


Property group 'Events'

Event

Type: name

This event is triggered when the team had enough credit.

NotEnoughPointsEvent

Type: name

This event is triggered instead when the team didn't have enough credit.


Property group 'ScoreSubtract'

SubtractValue

Type: int

How much to subtract on each triggering.

TeamNum

Type: byte

Subtract the score from which team's account? 0= Red; 1= Blue; The teams are automatically switched if necessary.

TeamNumCanTrigger

Type: byte

If set to something else than 255, this will only be activated if the Instigator's TeamNum matches the number that is specified here, so that the enemy can't do things with your score. The success of this depends on whether the trigger-chain reaction passes the information about the Instigator, if an Instigator exists.

TargetContainer

Type: class<ScoreContainer>

Modifiers: EdFindable

Subtract the score from the account in this container.


ScoreCheck

by Crusha K. Rool

UT2004 Object >> Actor >> Triggers >> EventGate >> ScoreCheck (custom)

Checks whether the Score of the chosen team is equal or above the specified value and will trigger an Event in that case. The Score itself won't be changed. It will untrigger it if the Score falls below the specified value again.

If in bEventGate mode, this will only check the Score when being (un)triggered to determine if it should (un)trigger the next event.


Property group 'Events'

Event

Type: name

Triggers as soon as the team has more points than specified in ScoreLimit. Untriggers if the team has less points again.

BelowScoreLimitEvent

Type: name

Will be triggered if not enough points are available on the team's account in case that bEventGate = True.


Property group 'ScoreCheck'

ScoreLimit

Type: int

Trigger if the Score is above this value.

TeamNum

Type: byte

Check this team's Score in the Container.

TargetContainer

Type: class<ScoreContainer>

Modifiers: EdFindable

Subtract the score from the account in this container.

bEventGate

Type: bool

Don't check automatically but only when getting (un)triggered and (un)trigger the next Event if enough credit is available.