LuaDocs/GameActivity

From Data Realms Wiki

(Difference between revisions)
Jump to: navigation, search
(GameActivity - Automatically generated by LuaBot)
(GameActivity - Automatically generated by LuaBot)
 
Line 300: Line 300:
None.
None.
-
 
-
 
-
===CreateDelivery===
 
-
Takes the current order out of a player's buy GUI, creates a Delivery based off it, and stuffs it into that player's delivery queue.
 
-
 
-
'''Arguments:'''
 
-
 
-
* Which player to create the delivery for.
 
-
 
-
'''Return value:'''
 
-
 
-
Success or not.
 

Latest revision as of 20:18, 2 April 2015

Contents

Parent: Activity

Generic Class. Base class for all GameActivity:s, including game modes and editors.

Go back to Class Index


Enumerations

ObjectiveArrowDir

  • 0 = ARROWDOWN
  • 1 = ARROWLEFT
  • 2 = ARROWRIGHT
  • 3 = ARROWUP


Properties

WinnerTeam

Indicates which team is the winner, when the game is over.The team number of the winning team. 0 is team #1. Negative number means the game isn't over yet.

CPUTeam

The current CPU-assisted team, if any (NOTEAM) - LEGACY functionThe current setting. NOTEAM is no team is assisted.


Functions

SetObservationTarget

Sets the observation sceneman scroll targets, for when the game is over or a player is in observation mode

Arguments:

  • The new absolute position to observe.
  • Which player to set it for.

Return value:

None.


SetDeathViewTarget

Sets the player death sceneman scroll targets, for when a player- controlled actor dies and the view should go to his last position

Arguments:

  • The new absolute position to set as death view.
  • Which player to set it for.

Return value:

None.


SetLandingZone

Sets the he last selected landing zone.

Arguments:

  • The new absolute position to set as the last selected landing zone.
  • Which player to set it for.

Return value:

None.


GetLandingZone

Gets the he last selected landing zone.

Arguments:

  • Which player to get it for.

Return value:

The new absolute position to set as the last selected landing zone.


SetActorSelectCursor

Sets the actor selection cursor position.

Arguments:

  • The new absolute position to put the cursor at.
  • Which player to set it for.

Return value:

None.


GetBuyGUI

Gets the an in-game GUI Object for a specific player.

Arguments:

  • Which player to get the GUI for.

Return value:

A pointer to a BuyMenuGUI. Ownership is NOT transferred!


GetEditorGUI

Gets the an in-game editor GUI Object for a specific player.

Arguments:

  • Which player to get the GUI for.

Return value:

A pointer to a SceneEditorGUI. Ownership is NOT transferred!


OtherTeam

Gets the next other team number from the one passed in, if any. If there are more than two teams in this game, then the next one in the series will be returned here.

Arguments:

  • The team not to get.

Return value:

The other team's number.


OneOrNoneTeamsLeft

Indicates whether there is less than two teams left in this game with a brain in its ranks.

Arguments:

  • None.

Return value:

Whether less than two teams have brains in them left.


WhichTeamLeft

Indicates which single team is left, if any.

Arguments:

  • None.

Return value:

Which team stands alone with any brains in its ranks, if any. NOTEAM is returned if there's either more than one team, OR there are no teams at all left with brains in em.


NoTeamLeft

Indicates whether there are NO teams left with any brains at all!

Arguments:

  • None.

Return value:

Whether any team has a brain in it at all.


OnlyOneTeamLeft

Indicates whether there is less than two teams left in this game with a brain in its ranks.

Arguments:

  • None.

Return value:

Whether less than two teams have brains in them left.


GetBanner

Gets access to the huge banner of any player that can display messages which can not be missed or ignored.

Arguments:

  • Which color banner to get - see the GameActivity::BannerColor enum.
  • Which player's banner to get.

Return value:

A pointer to the GUIBanner object that we can


SetLZArea

Sets the Area within which a team can land things.

Arguments:

  • The number of the team we're setting for.
  • The Area we're setting to limit their landings within.

Return value:

None.


GetLZArea

Gets the Area within which a team can land things. OINT.

Arguments:

  • The number of the team we're setting for.

Return value:

The Area we're using to limit their landings within. OINT.


SetBrainLZWidth

Sets the width of the landing zone box that follows around a player's brain.

Arguments:

  • The number of the in-game player we're setting for.
  • The width of the box, in pixels. 0 means disabled.

Return value:

None.


GetBrainLZWidth

Gets the width of the landing zone box that follows around a player's brain.

Arguments:

  • The number of the player we're getting for.

Return value:

The width in pixels of the landing zone.


AddObjectivePoint

Created an objective point for one of the teams to show until cleared.

Arguments:

  • The team number of the team to give objective. 0 is team #1.
  • The very short description of what the objective is (three short words max)
  • The absolute scene coordiante position of the objective.
  • The desired direction of the arrow when the point is on screen.

Return value:

None.


YSortObjectivePoints

Sorts all objective points according to their positions on the Y axis.

Arguments:

  • None.

Return value:

None.


ClearObjectivePoints

Clears all objective points previously added, for both teams.

Arguments:

  • None.

Return value:

None.


AddOverridePurchase

Adds somehting to the purchase list that will override what is set in the buy guy next time CreateDelivery is called.

Arguments:

  • The SceneObject preset to add to the override purchase list. OINT!
  • Which player's list to add an override purchase item to.

Return value:

The new total value of what's in the override purchase list.


ClearOverridePurchase

Clears all items from a specific player's override purchase list.

Arguments:

  • Which player's override purchase list to clear.

Return value:

None.


GetDeliveryCount

Shows how many deliveries this team has pending.

Arguments:

  • Which team to check the delivery count for.

Return value:

The number of deliveries this team has coming.


GetTeamTech

Returns the name of the tech module selected for this team during scenario setup

Arguments:

  • Team to return tech module for

Return value:

Tech module name, for example Dummy.rte, or empty string if there is no team


SetTeamTech

Sets tech module name for specified team. Module must set must be loaded.

Arguments:

  • Team to set module, module name, for example Dummy.rte

Return value:

None


GetCrabToHumanSpawnRatio

Returns CrabToHumanSpawnRatio for specified module

Arguments:

  • None.

Return value:

Crab-To-Human spawn ratio value set for specified module, 0.25 is default.


TeamIsCPU

Indicates whether a specific team is assigned a CPU player in the current game.

Arguments:

  • Which team index to check.

Return value:

Whether the team is assigned a CPU player in the current activity.


GetStartingGold

Returns how much starting gold was selected in scenario setup dialog. 20000 - infinite amount.

Arguments:

  • None.

Return value:

How much starting gold must be given to human players.


UpdateEditing

This is a special update step for when any player is still editing the scene.

Arguments:

  • None.

Return value:

None.


DisableAIs

Goes through all Actor:s currently in the MovableMan and disables or enables each one with a Controller set to AI input.

Arguments:

  • Whether to disable or enable them;
  • Which team to do this to. If all, then pass Activity::NOTEAM

Return value:

None.


InitAIs

Goes through all Actor:s currently in the MovableMan and sets each one not controlled by a player to be AI controlled and AIMode setting based on team and CPU team.

Arguments:

  • None.

Return value:

None.


Go back to Class Index

Personal tools