Game python module
From WiCWiki
game module
This module contains a lot of different functions for server side game operations.
Constants
Objective Type
- OBJECTIVE_TYPE_PRIMARY
- Objectives of this type must be completed for the mission to continue. If failed the mission will also fail.
- OBJECTIVE_TYPE_SECONDARY
- This type of objectives are optional but usually gives a bonus if completed.
Objective State
- OBJECTIVE_STATE_COMPLETED
- The objective was completed successfully.
- OBJECTIVE_STATE_CANCELED
- The objective was canceled and will have no effect on the gameplay what so ever.
- OBJECTIVE_STATE_FAILED
- the objective was failed.
- OBJECTIVE_STATE_NEW
- This is a brand new objective.
Meta Types
- METATYPE_AIR
- Choppers and such
- METATYPE_GROUND
- Lighter vehicles
- METATYPE_INFANTRY
- Infantry units
- METATYPE_HEAVYARMOR
- Heavy vehicles. Heavy tanks and such.
Tracking Flags
- TRACK_TAKING_DAMAGE
- Will trigger when the Agent takes damage.
- TRACK_MAKING_DAMAGE
- Will trigger when the Agent inflicts damage.
- TRACK_UNDER_ATTACK
- (!DEPRECATED!) Will triller when the Agent is hit by a projectile.
Types
- AbstractAbility
- Agent
- Building
- CommandPoint
- GameModeBase
- MoverBase
- PerimeterPoint
- Player
- ShooterBase
- SpecialAbility
- Unit
Functions
SendChat
- Syntax
import wic wic.game.SendChat( aPlayerId, aMessage[, aTeamChatFlag] )
- Description
- -
- Exceptions
- -
- See also
- -
DebugMessage
- Syntax
import wic wic.game.DebugMessage( adebugMessage )
- Description
- -
- Exceptions
- -
- See also
- -
SetWeather
- Syntax
import wic wic.game.SetWeather( aWeatherName )
- Description
- -
- Exceptions
- -
- See also
- -
MissionFailed Template:Deprecated
- Syntax
import wic wic.game.MissionFailed()
- Description
- -
- Exceptions
- -
- See also
- -
MissionCompleted
- Syntax
import wic wic.game.MissionCompleted( aWinningTeam )
- Description
- -
- Exceptions
- -
- See also
- -
GetGameData Template:Deprecated
- Syntax
import wic wic.game.GetGameData( aGameObject )
- Description
- -
- Exceptions
- -
- See also
- -
GetGameObjectData Template:Deprecated
- Syntax
import wic wic.game.GetGameObjectData( aGameObject[, aGetStaticDataFlag] )
- Description
- -
- Exceptions
- -
- See also
- -
SetSloMo
- Syntax
import wic wic.game.SetSloMo( aTimeScale )
- Description
- -
- Exceptions
- -
- See also
- -
SetApRegrowthRate
- Syntax
import wic wic.game.SetApRegrowthRate( aRegrowthRate )
- Description
- -
- Exceptions
- -
- See also
- -
SetStartingAP
- Syntax
import wic wic.game.SetStartingAP( anAPAmount, aTeam )
- Description
- -
- Exceptions
- -
- See also
- -
SetMaxAP
- Syntax
import wic wic.game.SetMaxAP( aMaxAP, aTeam )
- Description
- -
- Exceptions
- -
- See also
- -
SetUnitScoreToTAMultiplier
- Syntax
import wic wic.game.SetUnitScoreToTAMultiplier( aFactor )
- Description
- -
- Exceptions
- -
- See also
- -
SetDomTotalDominationFactor
- Syntax
import wic wic.game.SetDomTotalDominationFactor( aTick )
- Description
- -
- Exceptions
- -
- See also
- -
GetPlayerTeam Template:Deprecated
- Syntax
import wic wic.game.GetPlayerTeam( aPlayerId )
- Description
- -
- Exceptions
- -
- See also
- -
IsSinglePlayer
- Syntax
import wic wic.game.IsSinglePlayer()
- Description
- -
- Exceptions
- -
- See also
- -
GetInstanceData
- Syntax
import wic wic.game.GetInstanceData( anInstanceObject )
- Description
- -
- Exceptions
- -
- See also
- -
GetInstance
- Syntax
import wic wic.game.GetInstance( anInstanceName )
- Description
- -
- Exceptions
- -
- See also
- -
GetDifficultyLevel
- Syntax
import wic wic.game.GetDifficultyLevel()
- Description
- -
- Exceptions
- -
- See also
- -
IsLoadedGame
- Syntax
import wic wic.game.IsLoadedGame()
- Description
- -
- Exceptions
- -
- See also
- -
GetMaxNumPlayers
- Syntax
import wic wic.game.GetMaxNumPlayers()
- Description
- -
- Exceptions
- -
- See also
- -
GetUnitsInAreaXZ Template:Deprecated
- Syntax
import wic wic.game.GetUnitsInAreaXZ( aPosition, aRadius )
- Description
- -
- Exceptions
- -
- See also
- -
ThrowEvent Template:Deprecated
- Syntax
import wic wic.game.ThrowEvent( anEvent )
- Description
- -
- Exceptions
- -
- See also
- -
ThrowEventToPlayer Template:Deprecated
- Syntax
import wic wic.game.ThrowEventToPlayer( aPlayerId, anEvent )
- Description
- -
- Exceptions
- -
- See also
- -
GetVisibleEnemyUnits
- Syntax
import wic wic.game.GetVisibleEnemyUnits( aTeam )
- Description
- -
- Exceptions
- -
- See also
- -
GetVisibleEnemyUnitsInArea
- Syntax
import wic wic.game.GetVisibleEnemyUnitsInArea( aTeam, aPosition, aRadius )
- Description
- -
- Exceptions
- -
- See also
- -
CreateUnit
- Syntax
import wic wic.game.CreateUnit( aType, aPosition, aHeading, anOwner, aTeam[, aSquadId[, anInvincibleAtSpawnFlag]] )
- Description
- Creates a Unit of the type aType on the position aPosition. The Unit will be heading aHeading. anOwner will be the initial owner of the Unit and it will belong to team aTeam.
- aSquadId can be used to make a squad of units by giving them the same squad id.
- If anInvincibleAtSpawn is set to True the Unit will not recieve any damage for the first few seconds after created.
- Exceptions
- Exception - anOwner or aType is not of valid values.
- TypeError - aType, aTeam or aSquadId is not an int. aPosition is not a Vector3. aHeading is not a float. anOwner is not a Player. Or anInvincibleAtSpawn is not a bool.
- See also
- -
