User Tools

Site Tools


script:module:app

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
script:module:app [2020-01-04 15:44]
skyjake
script:module:app [2020-07-18 16:30] (current)
skyjake
Line 15: Line 15:
 Returns the identifier of the currently loaded game plugin. The return value is text, for instance for the Doom game plugin: Returns the identifier of the currently loaded game plugin. The return value is text, for instance for the Doom game plugin:
   "​doom"​   "​doom"​
 +  ​
  
 +#​@Identifier_HTML~getInteger~@#​ (
 + #​@Arg_HTML~Number,​id~@#​ )
 +  ​
 +Query the value of an internal engine variable. The //id// is one of the constants in the App module, such as ''​App.NETGAME''​.
 +
 +
 +#​@Identifier_HTML~quit~@#​ ( )
 +
 +
 +#​@Identifier_HTML~setInteger~@#​ (
 + #​@Arg_HTML~Number,​id~@#,​
 + #​@Arg_HTML~Number,​value~@#​ )
 +  ​
 +Sets the value of an internal engine variable. The //id// is one of the constants in the App module, such as ''​App.NETGAME''​. Note that some values cannot be changed, or are reset internally by the engine.
  
 ===== Variables ===== ===== Variables =====
Line 33: Line 48:
  
 Base class for players in the game. Base class for players in the game.
 +
  
 #​@Identifier_HTML~armor~@#​ ( ) #​@Identifier_HTML~armor~@#​ ( )
Line 39: Line 55:
  
 Returns the current armor points of the player. Returns the current armor points of the player.
 +
  
 #​@Identifier_HTML~armorType~@#​ ( ) #​@Identifier_HTML~armorType~@#​ ( )
Line 45: Line 62:
  
 Returns the current armor type (0, 1, or 2) of the player. Returns the current armor type (0, 1, or 2) of the player.
 +
 +
 +#​@Identifier_HTML~giveArmor~@#​ (
 + #​@Arg_HTML~Number,​type~@#,​
 + #​@Arg_HTML~Number,​points~@#​ )
 +
 +Increases the player'​s armor points and changes the armor type.
 +
 +
 +#​@Identifier_HTML~giveBackpack~@#​ ( )
 +
 +(Availability:​ Not available in Hexen.)
 +
 +Increases the player'​s max ammo capacity.
 +
 +
 +#​@Identifier_HTML~givePower~@#​ (
 + #​@Arg_HTML~Number,​type~@#​ )
 +
 +Gives the player a power-up.
 +
 +The values for //type// depend on the game (see ''​enum powertype_t''​).
 +For Heretic, the following values are defined:
 +
 +  * App.Player.PT_ALLMAP
 +  * App.Player.PT_FLIGHT
 +  * App.Player.PT_HEALTH2
 +  * App.Player.PT_INFRARED
 +  * App.Player.PT_INVISIBILITY
 +  * App.Player.PT_INVULNERABILITY
 +  * App.Player.PT_SHIELD
 +  * App.Player.PT_WEAPONLEVEL2
 +
  
 #​@Identifier_HTML~health~@#​ ( ) #​@Identifier_HTML~health~@#​ ( )
  
 Returns the current health points of the player. Returns the current health points of the player.
 +
  
 #​@Identifier_HTML~id~@#​ ( ) #​@Identifier_HTML~id~@#​ ( )
Line 60: Line 111:
  
 The values for //type// depend on the game (see ''​enum powertype_t''​). The values for //type// depend on the game (see ''​enum powertype_t''​).
 +
 +
 +#​@Identifier_HTML~setFlameCount~@#​ ( #​@Arg_HTML~Number,​tics~@#​ )
 +
 +(Availability:​ Heretic.)
 +
 +Sets the maximum duration of the powered up Phoenix Rod flame thrower. The default is 350 tics (10 seconds). After this duration, ammo will be depleted and the player must start a new attack.
 +
 +This behavior is defined by the State definitions in Heretic'​s **objects.ded**.
 +
 +
 +#​@Identifier_HTML~setLocalQuake~@#​ ( 
 + #​@Arg_HTML~Number,​intensity~@#,​
 + #​@Arg_HTML~Number,​duration~@#​ = 0 )
 +
 +(Availability:​ Heretic, Hexen.)
 +
 +Starts or stops the local earthquake effect where a player'​s camera is being randomly shaken.
 +
 +Both the //​intensity//​ and //​duration//​ are integers. The value of //​intensity//​ determines the strength of the shaking; for example: 1 is the minimum, 10 is very strong. //​Duration//​ determines how long the shaking will go on (in tics; 35 is one second). The duration is zero by default, which means the earthquake will continue indefinitely.
 +
 +To stop the earthquake, set //​intensity//​ to zero.
 +
 +#​@Identifier_HTML~shotAmmo~@#​ ( )
 +
 +Deplete one round of ammo according to the "per shot" ammo of the player'​s current weapon.
 +
  
 #​@Identifier_HTML~thing~@#​ ( ) #​@Identifier_HTML~thing~@#​ ( )
  
 Returns the player mobj as a [[script:​module:​world#​worldthing|World.Thing]] object. Returns the player mobj as a [[script:​module:​world#​worldthing|World.Thing]] object.
script/module/app.1578145457.txt.gz ยท Last modified: 2020-01-04 15:44 by skyjake