Results 1 to 2 of 2

Thread: List of built-in properties (getters, setters) for scripting

  1. #1

    Default List of built-in properties (getters, setters) for scripting

    List of all the built-in properties, getters, setters
    from Allied Assault, Spearhead, Breakthrough and Reborn Patch (175 in total)

    Command
    Class
    Availability
    Description
    Example
    Array
    .size "Array" AA, SH, BT Returns the number of elements in the array.
    Code:
    local.result = $player.size // Returns the number of players
    // Or
    local.result = ("abcde").size // Returns: 5
    Game
    .detail Game AA, SH, BT Returns the "detail" cvar.
    Code:
    println game.detail // Prints: 1.000
    .skill Game AA, SH, BT Returns the difficulty level of the game.
    Code:
    local.result = game.skill
    Level
    .alarm Level AA, SH, BT Sets/Gets the global level alarm.
    zero = global level alarm off.
    non-zero = alarm on.
    Code:
    level.alarm = 1 // alarm on
    println level.alarm // Prints: 1
    .bombs_planted Level AA, SH, BT Sets/Gets the number of bombs that are set.
    Code:
    level bombs_planted 1
    // Or
    level.bombs_planted++
    // Or
    level.bombs_planted = 1
    local.bombs_planted = level.bombs_planted
    .clockside Level AA, SH, BT Sets/Gets which side the clock is on...
    "axis" or "allies" win when time is up,
    "kills" gives the win to the team with more live members,
    "draw" no one wins.
    Code:
    level clockside "axis"
    // Or
    level.clockside = "axis"
    println level.clockside // Prints: "axis"
    .dmrespawning Level AA, SH, BT Set to 1 to turn on wave-based DM, to 0 to disable respawns within a round.
    Returns 1 if wave-based DM, 0 if respawns are disabled within a round.
    Code:
    level dmrespawning 0
    // Or
    level.dmrespawning = 0
    println level.dmrespawning // Prints: 0
    .dmroundlimit Level AA, SH, BT Sets the default roundlimit, in minutes; can be overridden by 'roundlimit' cvar.
    Gets the actual roundlimit, in minutes; may be 'roundlimit' cvar or the default round limit.
    Code:
    level dmroundlimit 6
    // Or
    level.dmroundlimit = 6
    println level.dmroundlimit // Prints: 6
    .found_secrets Level AA, SH, BT Count of found secrets.
    Code:
    local.found_secrets = level.found_secrets
    .loop_protection Level AA, SH, BT Sets/Gets if infinite loop protection is enabled.
    Code:
    level.loop_protection = 0
    local.result = level.loop_protection
    .nodrophealth Level AA, SH, BT zero = automatically drop health according to cvars.
    non-zero = don't autodrop health (like hard mode).
    Code:
    level.nodrophealth = 1
    .nodropweapons Level BT zero = automatically drop weapons.
    non-zero = don't autodrop weapons.
    Code:
    level.nodropweapons = 1
    .objectivebased Level SH, BT Gets whether or not the game is currently objective based or not.
    Code:
    local.result = level.objectivebased
    .papers Level AA, SH, BT The level of papers the player currently has. level.papers = 1
    local.result = level.papers
    .planting_team Level AA, SH, BT Sets/Gets which team is planting the bomb, 'axis' or 'allies'.
    Code:
    level planting_team "allies"
    // Or
    level.planting_team = "allies"
    local.planting_team = level.planting_team
    .rain_density Level AA, SH, BT Sets/Gets the rain density.
    Code:
    level.rain_density = 0.2
    local.result = level.rain_density
    .rain_length Level AA, SH, BT Sets/Gets the rain length.
    Code:
    level.rain_length = 2
    local.result = level.rain_length
    .rain_min_dist Level AA, SH, BT Sets/Gets the rain min_dist.
    Code:
    level.rain_min_dist = 1800
    local.result = level.rain_min_dist
    .rain_numshaders Level AA, SH, BT Sets/Gets the rain numshaders.
    Code:
    level.rain_numshaders = 12
    local.result = level.rain_numshaders
    .rain_shader Level AA, SH, BT Sets/Gets the rain shader.
    Default: "textures/rain".
    Code:
    level.rain_shader = "textures/snow"
    local.result = level.rain_shader
    .rain_slant Level AA, SH, BT Sets/Gets the rain slant.
    Code:
    level.rain_slant = 250
    local.result = level.rain_slant
    .rain_speed Level AA, SH, BT Sets/Gets the rain speed.
    Code:
    level.rain_speed = 100
    local.result = level.rain_speed
    .rain_speed_vary Level AA, SH, BT Sets/Gets the rain speed variance.
    Code:
    level.rain_speed_vary = 16
    local.result = level.rain_speed_vary
    .rain_width Level AA, SH, BT Sets/Gets the rain width.
    Code:
    level.rain_width = 2
    local.result = level.rain_width
    .roundbased Level AA, SH, BT Gets whether or not the game is currently round based or not.
    Code:
    local.result = level.roundbased
    .roundstarted Level BT Gets whether or not the round has started.
    Code:
    local.result = level.roundstarted
    .targets_destroyed Level AA, SH, BT Sets/Gets the number of bomb targets that have been destroyed.
    Code:
    level targets_destroyed 1
    // Or
    level.targets_destroyed = 1
    local.result = level.targets_destroyed
    .targets_to_destroy Level AA, SH, BT Sets/Gets the number of bomb targets that must be destroyed.
    Code:
    level targets_to_destroy 2
    // Or
    level.targets_to_destroy = 2
    local.result = level.targets_to_destroy
    .time Level AA, SH, BT Gets the current level time.
    Code:
    local.current_time = level.time
    .total_secrets Level AA, SH, BT Count of total secrets.
    Code:
    local.result = level.total_secrets
    World
    .farplane World AA, SH, BT Sets/Gets the distance of the far clipping plane.
    Code:
    $world farplane 2000
    level.farplane = $world.farplane
    .farplane_bias World SH, BT Sets/Gets the distance bias of the far clipping plane.
    Code:
    $world farplane_bias 10000
    // Or
    $world.farplane_bias = 10000
    println $world.farplane_bias // Prints: 10000
    .farplane_color World AA, SH, BT Sets/Gets the color of the far clipping plane fog.
    Code:
    $world farplane_color ( 0.333 0.333 0.333 )
    // Or
    $world.farplane_color = ( 0.333 0.333 0.333 )
    println $world.farplane_color // Prints: (0.333000, 0.333000, 0.333000)
    .get_render_terrain World SH, BT Get the render terrain switch.
    Code:
    local.result = $world.get_render_terrain
    .skybox_farplane World SH, BT Sets/Gets the distance of the skybox far clipping plane.
    Code:
    $world skybox_farplane 500
    // Or
    $world.skybox_farplane = 500
    local.skybox_farplane = $world.skybox_farplane
    .skybox_speed World SH, BT Sets/Gets the speed of the skybox.
    Code:
    $world skybox_speed 0.01203
    // Or
    $world.skybox_speed = 0.01203
    local.skybox_speed = $world.skybox_speed
    Parm
    .motionfail Parm AA, SH, BT motionfail...
    Code:
    parm.motionfail
    .movedone Parm AA, SH, BT movedone...
    Code:
    parm.movedone
    .movefail Parm AA, SH, BT movefail...
    Code:
    parm.movefail
    .other Parm AA, SH, BT other...
    Code:
    parm.other
    .owner Parm AA, SH, BT Returns the owner.
    Code:
    parm.owner
    .previousthread Parm AA, SH, BT Returns the previous thread.
    Code:
    local.previousthread = parm.previousthread
    .sayfail Parm AA, SH, BT sayfail...
    Code:
    parm.sayfail
    .upperfail Parm AA, SH, BT upperfail...
    Code:
    parm.upperfail
    Actor, AISpawnPoint, Sentient
    .accuracy Actor AA, SH, BT Set percent to hit.
    Code:
    local.actor accuracy 100
    // Or
    local.actor.accuracy = 100
    local.accuracy = local.actor.accuracy
    .alarmnode Actor AA, SH, BT Sets/Gets the name of the alarm node for the actor (must have type set to alarm for effect).
    Code:
    local.actor alarmnode "runwayspot"
    // Or
    local.actor.alarmnode = "runwayspot"
    local.alarmnode = local.actor.alarmnode
    .alarmthread Actor AA, SH, BT Sets/Gets the name of the alarm thread for the actor (must have type set to alarm for effect).
    Code:
    local.actor alarmthread "ai_alarm_fired"
    // Or
    local.actor.alarmthread = "ai_alarm_fired"
    local.alarmthread = local.actor.alarmthread
    .ammo_grenade Actor AA, SH, BT Gives the AI some grenades.
    or
    Returns how many grenades an AI has.
    Code:
    local.actor ammo_grenade 3
    // Or
    local.actor.ammo_grenade = 3
    local.ammo_grenade = local.actor.ammo_grenade
    .animname Actor AA, SH, BT Sets/Gets the animname.
    Code:
    local.actor.animname = "animation_name"
    local.animname = local.actor.animname
    .attackhandler Actor AA, SH, BT Sets/Gets the current script that will handle attack events.
    Default = "anim/attack.scr"
    Code:
    local.actor.attackhandler = "anim/attack.scr"
    .avoidplayer Actor AA, SH, BT Set to 0 if this AI shouldn't automatically get out of the way
    non-zero if he should.
    Code:
    local.actor avoidplayer 1
    local.avoidplayer = local.actor.avoidplayer
    .balconyheight Actor AA, SH, BT Sets/Gets the minimum height a balcony guy must fall to do special balcony death.
    Code:
    local.actor balconyheight 150.0
    // Or
    local.actor.balconyheight = 150.0
    local.balconyheight = local.actor.balconyheight
    .blendtime Actor AA, SH, BT Sets the crossblend time to something other than the default, in seconds.
    Get the crossblend time.
    Code:
    local.actor.blendtime = 0.25
    local.blendtime = local.actor.blendtime
    .deathhandler Actor AA, SH, BT Sets/Gets the current script that will handle death events.
    Code:
    local.actor.deathhandler = "anim/killed.scr"
    .disguise_accept_thread Actor AA, SH, BT Sets/Gets the name of the thread for the actor to start when accepting papers
    Code:
    local.actor disguise_accept_thread "label"
    // Or
    local.actor.disguise_accept_thread = "label"
    local.get_thread = local.actor.disguise_accept_thread
    .disguise_level Actor
    AISpawnPoint
    AA, SH, BT Sets/Gets the disguise level of the actor.
    May be 1 or 2.
    Code:
    local.actor disguise_level 1
    // Or
    local.actor.disguise_level = 1
    local.disguise_level = local.actor.disguise_level
    .disguise_period Actor
    AISpawnPoint
    AA, SH, BT Sets/Gets the time between the end of one disguise behavior and start of the next.
    Code:
    local.actor disguise_period 30
    // Or
    local.actor.disguise_period = 30
    local.period = local.actor.disguise_period
    .disguise_range Actor
    AISpawnPoint
    AA, SH, BT Sets/Gets the maximum distance for disguise behavior to get triggered.
    Code:
    local.actor disguise_range 1000
    // Or
    local.actor.disguise_range = 1000
    local.range = local.actor.disguise_range
    .distancetoenemy Actor AA, SH, BT Get the distance from the Actor to its enemy.
    Code:
    local.distance = local.actor.distancetoenemy
    .emotion Actor AA, SH, BT The method of setting the facial expression of the Actor.
    Code:
    local.actor.emotion = "emotion_happy"
    .enableEnemy Actor AA, SH, BT Sets enableEnemy variable.
    Code:
    local.actor.enableEnemy = 1
    .enablePain Actor AA, SH, BT Sets enablePain variable.
    Code:
    local.actor.enablePain = 0
    .enemy Actor AA, SH, BT Get the actor's current enemy.
    Code:
    local.current_enemy = local.actor.enemy
    .enemy_visible_change_time Actor AA, SH, BT Get the last time whether or not the enemy is visible changed, in seconds.
    Code:
    local.time = local.actor.enemy_visible_change_time
    .enemysharerange Actor
    AISpawnPoint
    AA, SH, BT Sets/Gets the range outside which the AI will not receive notification that a teammate has a new enemy.
    Code:
    local.actor enemysharerange 1500
    // Or
    local.actor.enemysharerange = 1500
    local.enemysharerange = local.actor.enemysharerange
    .fallheight Actor AA, SH, BT Sets/Gets the fallheight.
    Code:
    local.actor fallheight 200
    // Or
    local.actor.fallheight = 200
    local.fallheight = local.actor.fallheight
    .favoriteenemy Actor
    AISpawnPoint
    AA, SH, BT Sets/Gets this AI's favorite enemy.
    Code:
    local.actor favoriteenemy local.enemy
    // Or
    local.actor.favoriteenemy = local.enemy
    local.enemy = local.actor.favoriteenemy
    .fixedleash Actor
    AISpawnPoint
    AA, SH, BT If non-zero, the leash will never auto-reset.
    If zero, the leash may auto-reset.
    Code:
    local.actor fixedleash 1
    // Or
    local.actor.fixedleash = 1
    local.result = local.actor.fixedleash
    .forcedrophealth AISpawnPoint
    Sentient
    BT Force the sentient to drop health no matter what level.nodrophealth is.
    Code:
    local.actor forcedrophealth
    local.actor.forcedrophealth = 1
    local.forcedrophealth = local.actor.forcedrophealth
    .forcedropweapon AISpawnPoint
    Sentient
    BT Force the sentient to drop weapons no matter what level.nodropweapon is.
    Code:
    local.actor forcedropweapon
    local.actor.forcedropweapon = 1
    local.forcedropweapon = local.actor.forcedropweapon
    .fov Actor
    AISpawnPoint
    AA, SH, BT Gets/Sets the Field of View angle of the actor.
    Code:
    local.actor fov 120
    // Or
    local.actor.fov = 120
    local.fov = local.actor.fov
    .gren_awareness Actor
    AISpawnPoint
    AA, SH, BT Sets/Gets the awareness of grenades in 0-100 percent chance of responding to a grenadewhen the AI sees it (applied once every 0.4 seconds)
    Code:
    local.actor gren_awareness 0
    // Or
    local.actor.gren_awareness = 0
    local.percent = local.actor.gren_awareness
    .gun Actor
    AISpawnPoint
    AA, SH, BT Specifies the gun to use.
    Gets the gun to being used.
    Code:
    local.actor gun "KAR98sniper"
    // Or
    local.actor.gun = "KAR98sniper"
    local.gun = local.actor.gun
    .hascompletelookahead Actor AA, SH, BT Returns true if there are no corners to turn on the rest of the AI's current path.
    Code:
    if (local.actor.hascompletelookahead) {
        // statement
    }
    .headmodel Actor AA, SH, BT Sets/Gets the head model.
    Code:
    local.actor headmodel "head1"
    local.headmodel = local.actor.headmodel
    .headskin Actor AA, SH, BT Sets/Gets the head skin.
    Code:
    local.actor headskin "bignose"
    local.headskin = local.actor.headskin
    .hearing Actor, AISpawnPoint AA, SH, BT Sets/Gets the hearing radius of the actor.
    Code:
    local.actor hearing 2500
    // Or
    local.actor.hearing = 2500
    local.hearing = local.actor.hearing
    .ignorebadplaces Actor SH, BT Sets/Gets whether or not this AI guy will ignore bad places (0 = not suicidal)
    Code:
    local.actor ignorebadplaces 1
    // Or
    local.actor.ignorebadplaces = 1
    local.ignorebadplaces = local.actor.ignorebadplaces
    .inreload Actor AA, SH, BT Set to non-zero to indicate the AI is in a reload.
    Returns non-zero if the AI is in a reload.
    Code:
    local.actor.inreload = 1
    local.inreload = local.actor.inreload
    .interval Actor
    AISpawnPoint
    AA, SH, BT Sets/Gets the distance AI tries to keep between squadmates while moving.
    Code:
    local.actor interval 256
    // Or
    local.actor.interval = 256
    local.distance = local.actor.interval
    .intervaldir Actor AA, SH, BT Gets the direction the AI would like to move to maintain its interval.
    Code:
    local.vector_direction = local.actor.intervaldir
    .kickdir Actor AA, SH, BT Gets the direction the AI wants to kick.
    Code:
    local.vector_kickdir = local.actor.kickdir
    .last_enemy_visible_time Actor AA, SH, BT Get the last time the enemy was visible, in seconds.
    Code:
    local.result = local.actor.last_enemy_visible_time
    .leash Actor AA, SH, BT Sets/Gets the maximum distance the AI will wander from its leash home.
    Code:
    local.actor leash 2000
    // Or
    local.actor.leash = 2000
    local.result = local.actor.leash
    .lookaroundangle Actor AA, SH, BT Sets/Gets the angle in degrees left or right of center that the AI will look around while patrolling.
    Code:
    local.actor lookaroundangle 90
    // Or
    local.actor.lookaroundangle = 90
    local.lookaroundangle = local.actor.lookaroundangle
    .maxdist Actor
    AISpawnPoint
    AA, SH, BT Sets/Gets the maximum distance the AI tries to allow between itself and the player.
    Code:
    local.actor maxdist 400
    // Or
    local.actor.maxdist = 400
    local.maxdist = local.actor.maxdist
    .mindist Actor
    AISpawnPoint
    AA, SH, BT Sets/Gets the minimum distance the AI tries to keep between itself and the player.
    Code:
    local.actor mindist 128
    // Or
    local.actor.mindist = 128
    local.mindist = local.actor.mindist
    .mood Actor AA, SH, BT Sets/Gets the AI mood... must be "bored", "nervous", "curious", or "alert".
    Code:
    local.actor.mood = "bored"
    local.actor_mood = local.actor.mood
    .movedir Actor AA, SH, BT Returns a unit vector pointing in the current direction of motion, or zero if not moving.
    This still has meaning if velocity is zero but the AI is starting to move on a path.
    Code:
    local.vector_direction = local.actor.movedir
    .movedoneradius Actor AA, SH, BT Set the waittill movedone radius, default 0 means don't use manual radius.
    Code:
    local.actor.movedoneradius = 150
    .mumble Actor AA, SH, BT Set to 1 if this guy is allowed to mumble, or 0 if he is not
    Returns 1 if this guy is allowed to mumble, or 0 if he is not.
    Code:
    local.actor mumble 1
    // Or
    local.actor.mumble = 1
    local.result = local.actor.mumble
    .nationality Actor BT Sets/Gets the nationality of an actor.
    Valid entries are: default, ger, it, usa, uk, and ussr.
    Return values are: ger, it, usa, uk, ussr and unset.
    Code:
    local.actor nationality "it"
    // Or
    local.actor.nationality = "it"
    local.nationality = local.actor.nationality
    .no_idle Actor AA, SH, BT Sets/Gets if the actor will not go into idle after playing an animation.
    Code:
    local.actor.no_idle = 1
    local.no_idle = local.actor.no_idle
    .nolongpain Actor AA, SH, BT Sets/Gets if long pain is allowed or not.
    1 = long pain is not allowed.
    0 = long pain is allowed.
    Code:
    local.actor nolongpain 1
    // Or
    local.actor.nolongpain = 1
    local.nolongpain = local.actor.nolongpain
    .nonvislevel Actor SH, BT Visibility level in range 0-1 below which an enemy is treated as non-visible
    Code:
    local.actor nonvislevel 0.5
    // Or
    local.actor.nonvislevel = 0.5
    local.nonvislevel = local.actor.nonvislevel
    .nosurprise Actor
    AISpawnPoint
    AA, SH, BT Set to 0 to allow this guy to play a surprised animation when first encountering an enemy.
    Gets whether or not this guy is allowed to play a surprised animation when first encountering an enemy.
    Code:
    local.actor nosurprise 0
    // Or
    local.actor.nosurprise = 0
    local.nosurprise = local.actor.nosurprise
    .noticescale Actor
    AISpawnPoint
    AA, SH, BT Sets/Gets the max multiplier in time to notice an enemy.
    (default 100, half as big notices twice as fast)
    Code:
    local.actor noticescale 1
    // Or
    local.actor.noticescale = 1
    local.noticescale = local.actor.noticescale
    .painhandler Actor AA, SH, BT Sets/Gets the current script that will handle pain events.
    Code:
    local.actor.painhandler = "anim/pain.scr"
    local.painhandler = local.actor.painhandler
    .pathdist Actor AA, SH, BT Returns total distance along current path to the path goal.
    Code:
    local.result = local.actor.pathdist
    .patrolpath Actor AA, SH, BT Sets/Gets the name of the patrol path for the actor (must have type set to patrol for effect).
    Code:
    local.actor patrolpath "patrolpath03b"
    // Or
    local.actor.patrolpath = "patrolpath03b"
    local.patrolpath = local.actor.patrolpath
    .position Actor AA, SH, BT Sets/Gets the Position the Actor wants to be and should animate towards.
    Code:
    local.actor.position = "prone"
    local.position = local.actor.position
    .prealarmthread Actor BT Sets the name of the pre alarm thread for the actor.
    (Must have type set to alarm for effect).
    Code:
    local.actor prealarmthread "label"
    //Or
    local.actor.prealarmthread = "label"
    .runanimrate Actor SH, BT Sets/Gets the rate at which the run animation plays back.
    Code:
    local.actor runanimrate 1.5
    // Or
    local.actor.runanimrate = 1.5
    local.runanimrate = local.actor.runanimrate
    .sight Actor
    AISpawnPoint
    AA, SH, BT Sets/Gets the vision distance of the actor.
    Code:
    local.actor sight 2000
    // Or
    local.actor.sight = 2000
    local.sight = local.actor.sight
    .silent Actor AA, SH, BT Set to 0 to prevent this guy from saying stuff besides pain and death sounds.
    Gets whether or not this guy is allowed to say stuff besides pain and death sounds.
    Code:
    local.actor silent 1
    // Or
    local.actor.silent = 1
    local.result = local.actor.silent
    .sound_awareness Actor
    AISpawnPoint
    AA, SH, BT Sets/Gets the awareness of sounds in 0-100 percent chance
    of hearing a sound within half of the sound's radius.
    Fades to zero outside sound's radius.
    Code:
    Sets/Gets the awareness of sounds in 0-100 percent chance
    of hearing a sound within half of the sound's radius.
    Fades to zero outside sound's radius.
    .suppresschance Actor SH, BT Sets the percent chance of doing suppressing fire when appropriate (0-100)
    Code:
    local.actor suppresschance 80
    // Or
    local.actor.suppresschance = 80
    local.result = local.actor.suppresschance
    .team Entity
    Sentient
    AA, SH, BT Entity: Used to make multiple entities move together.
    Sentient: Returns 'german' or 'american'
    Code:
    local.result = local.actor.team
    .thinkstate Actor AA, SH, BT Gets current AI think state.
    Can be: void, idle, pain, killed, attack, curious, disguise, or grenade.
    Code:
    local.result = local.actor.thinkstate
    .threatbias Sentient AA, SH, BT Sets/Gets the threat bias for this player / AI.
    Code:
    local.actor threatbias 5000
    // Or
    local.actor.threatbias = 5000
    local.threatbias = local.actor.threatbias
    .turndoneerror Actor AA, SH, BT Sets/Gets the error amount that turndone will occur for the turnto command.
    Code:
    local.actor turndoneerror 70
    // Or
    local.actor.turndoneerror = 70
    local.turndoneerror = local.actor.turndoneerror
    .turnspeed Actor AA, SH, BT The turn speed of the actor.
    Code:
    // Actor
    local.actor turnspeed 50
    // Or
    local.actor.turnspeed = 50
    local.turnspeed = local.actor.turnspeed
    .turret Actor
    AISpawnPoint
    AA, SH, BT Sets/Gets the turret of the actor.
    Code:
    local.actor turret $turret
    // Or
    local.actor.turret = $turret
    local.turret = local.actor.turret
    .type_attack Actor
    AISpawnPoint
    AA, SH, BT Sets/Gets the attack type of the actor.
    Code:
    local.actor type_attack "cover"
    // Or
    local.actor.type_attack = "cover"
    local.type_attack = local.actor.type_attack
    .type_disguise Actor
    AISpawnPoint
    AA, SH, BT Sets/Gets the disguise type of the actor.
    Code:
    local.actor type_disguise "salute"
    // Or
    local.actor.type_disguise = "salute"
    local.type_disguise = local.actor.type_disguise
    .type_grenade Actor
    AISpawnPoint
    AA, SH, BT Sets/Gets the grenade type of the actor.
    Code:
    local.actor type_grenade "grenade"
    // Or
    local.actor.type_grenade = "grenade"
    local.type_grenade = local.actor.type_grenade
    .type_idle Actor
    AISpawnPoint
    AA, SH, BT Sets/Gets the idle type of the actor.
    Code:
    local.actor type_idle "idle"
    // Or
    local.actor.type_idle = "idle"
    local.type_idle = local.actor.type_idle
    .voicetype Actor
    AISpawnPoint
    AA, SH, BT Sets/Gets the voicetype.
    Code:
    // Actor
    local.actor voicetype "a"
    // Or
    local.actor.voicetype = "a"
    local.voicetype = local.actor.voicetype
    .waittrigger Actor
    AISpawnPoint
    AA, SH, BT If true, patrol guys and running men wait until triggered to move.
    Code:
    local.actor waittrigger 1
    // Or
    local.actor.waittrigger = 1
    local.result = local.actor.waittrigger
    .weapon Actor
    AISpawnPoint
    Sentient
    AA, SH, BT Gives the sentient the weapon specified.
    Gets the weapon.
    (List of names in global/weapon.scr)
    Code:
    local.actor weapon "panzerschrek"
    // Or
    local.actor.weapon = "panzerschrek"
    local.weapon = local.actor.weapon
    .weapongroup Actor AA, SH, BT Specifies weapon animation set to use in anim scripts.
    Code:
    local.weapongroup = local.actor.weapongroup
    .weapontype Actor AA, SH, BT Gets the weapon type of the actor.
    Code:
    local.weapontype = local.actor.weapontype
    .dontdrophealth AISpawnPoint BT dontdrophealth Setter/Getter
    Code:
    local.AISpawnPoint.dontdrophealth
    .dontdropweapons AISpawnPoint AA, SH, BT dontdropweapons getter.
    Code:
    local.result = local.AISpawnPoint.dontdropweapons
    .enemyname AISpawnPoint BT Use the enemyname parameter for the AI that is being spawned in to set its targetname.
    Code:
    local.AISpawnPoint.enemyname = "tentguys"
    Listener, SimpleEntity, Entity (and subclasses)
    .angle SimpleEntity AA, SH, BT Sets/Gets the angles of the entity using just one value.
    Sets/Gets the yaw of the entity or an up and down direction if 'newAngle' is [0-359] or -1 or -2
    Code:
    local.entity angle 90
    // Or
    local.entity.angle = 90
    
    println local.entity.angle // Prints: 90.000
    .angles Entity
    SimpleEntity
    AA, SH, BT Sets/Gets the angles of the entity.
    Code:
    local.entity angles ( 0 90 0 )
    // Or
    local.entity.angles = ( 0 90 0 )
    
    println local.entity.angles // Prints: (0.000000, 90.000000, 0.000000)
    .avelocity Entity AA, SH, BT Gets the angular velocity for this entity.
    Code:
    // Entity
    local.angular_velocity = local.entity.avelocity
    .brushmodel Entity AA, SH, BT Get the brush modelName.
    Code:
    local.brushmodel = local.entity.brushmodel
    .centroid SimpleEntity AA, SH, BT Entity's centroid vector (center of mass).
    Code:
    local.centroid = local.entity.centroid
    .classname Listener
    Entity
    AA, SH, BT Gets the entity's classname.
    Code:
    local.class = local.listener.classname
    .collisionent Vehicle
    VehicleTurretGun
    AA, SH, BT Sets/Gets the Collision Entity (script model of collision hull)
    Code:
    $vehicle collisionent $vehicle_collision
    // Or
    $vehicle.collisionent = $vehicle_collision
    local.collisionent = $vehicle.collisionent
    .entnum Entity AA, SH, BT The entity's entity number.
    Code:
    local.entity_number = local.entity.entnum
    .forwardvector SimpleEntity AA, SH, BT Get the forward vector of angles.
    Code:
    local.forwardvector = local.entity.forwardvector
    .getmaxs Entity SH, BT Get the maxs of the bounding box of the entity to maxs.
    Code:
    local.maxs = local.entity.getmaxs
    // Or
    local.trigger setsize $player.getmins $player.getmaxs
    .getmins Entity SH, BT Get the mins of the bounding box of the entity to mins.
    Code:
    local.mins = local.entity.getmins
    // Or
    local.trigger setsize $player.getmins $player.getmaxs
    .health Entity
    AISpawnPoint
    AA, SH, BT Set the health (and max_health) of the entity to newHealth.
    Code:
    local.entity health 100
    // Or
    local.entity.health = 100
    local.health = local.entity.health
    .isOpen Door BT Check to see if door is open (non-zero return value).
    Code:
    $Door.isOpen = 1
    local.result = $Door.isOpen
    .leftvector SimpleEntity AA, SH, BT Get the left vector of angles.
    Code:
    local.leftvector = local.entity.leftvector
    .max_health Entity AA, SH, BT Sets max_health without changing health.
    Gets the entity's max health.
    Code:
    local.entity max_health 300
    // Or
    local.entity.max_health = 300
    local.max_health = local.entity.max_health
    .model Entity AA, SH, BT Sets/Gets the model of the entity.
    Code:
    local.entity model "models/furniture/table.tik"
    // Or
    local.entity.model = "models/furniture/table.tik"
    local.model = local.entity.model
    .moving_from_anim ScriptModel SH, BT The script model is moving based on an animation.
    Code:
    local.result = local.entity.moving_from_anim
    .normal_health Entity AA, SH, BT The Normal Health of the entity.
    Code:
    local.entity.normal_health
    .origin SimpleEntity AA, SH, BT Sets/Gets the origin of the entity
    Code:
    local.entity origin ( 300 -2450 130 )
    // Or
    local.entity.origin = ( 300 -2450 130 )
    local.origin = local.entity.origin
    .owner Listener
    Parm
    VehicleCollisionEntity
    AA, SH, BT Returns the owner.
    Code:
    local.listener.owner
    parm.owner
    .radnum Entity AA, SH, BT Sets/Gets the entity's radnum.

    'radnum' is the "Radiant Number" of an entity that was added to
    the map using the MohRadiant editor and is stored in the bsp file.

    Dynamic entities like players, weapons, and entities spawned from scripts return -1.

    $world.radnum always returns 0.
    Code:
    local.radnum = local.entity.radnum
    .rightvector SimpleEntity AA, SH, BT Get the right vector of angles.
    Code:
    local.rightvector = local.entity.rightvector
    .rotatedbbox Entity AA, SH, BT Sets/Gets the entity's bbox to rotate with it.
    Code:
    local.entity.rotatedbbox = 1
    local.result = local.entity.rotatedbbox
    .scale Entity AA, SH, BT Sets/Gets the scale of the entity.
    Code:
    local.entity scale 2
    // Or
    local.entity.scale = 2
    local.scale = local.entity.scale
    .target SimpleEntity AA, SH, BT Sets/Gets the target of the entity.
    Code:
    local.entity target "targetname"
    // Or
    local.entity.target = "targetname"
    local.target = local.entity.target
    .targetname SimpleEntity AA, SH, BT Sets/Gets the entity's targetname.
    Code:
    local.entity targetname "name"
    // Or
    local.entity.targetname = "name"
    local.targetname = local.entity.targetname
    .upvector SimpleEntity AA, SH, BT Gets the up vector of angles.
    Code:
    local.upvector = local.entity.upvector
    .velocity Entity AA, SH, BT Sets/Gets the velocity for this entity.
    Code:
    local.entity.velocity = ( 0 0 0 ) // No velocity
    local.velocity = local.entity.velocity
    .yaw Entity AA, SH, BT Gets the entity's yaw.
    Code:
    local.yaw = local.entity.yaw
    Player
    .adminrights Player Reborn Gets the admin rights of the player (Reborn ClientAdmin System).
    Code:
    local.result = local.player.adminrights
    .dmteam Player AA, SH, BT Returns "allies", "axis", "spectator", or "freeforall".
    Code:
    local.team = local.player.dmteam
    .fireheld Player AA, SH, BT Returns 1 if this player is holding fire, or 0 if he is not.
    Code:
    if (local.player.fireheld) {
        // local.player is holding fire
    }
    .has_disguise Player AA, SH, BT Sets/Gets disguise mode.
    zero = does not have a disguise.
    non-zero = has a disguise.
    Code:
    $player.has_disguise = 1
    println $player.has_disguise // Prints: 1
    .injail Player BT Set to 1 to indicate when player is in jail, 0 when they are free.
    Returns 1 if player is in jail, 0 if out.
    Code:
    local.player.injail = 1
    println local.player.injail // Prints: 1
    .inventory Player Reborn Returns player's inventory.
    Code:
    local.inventory = local.player.inventory
    local.inventory_size = local.player.inventory.size
    local.item1 = local.player.inventory[0]
    .is_disguised Player AA, SH, BT Gets if the player is disguised or not.
    zero = not disguised
    non-zero = disguised
    Code:
    local.is_disguised = $player.is_disguised
    .isEscaping Player BT Return non-zero if escaping or assisting escape.
    Code:
    local.result = local.player.isEscaping
    .isSpectator Player BT Check to see if player is a spectator (non-zero return value).
    Code:
    local.result = local.player.isSpectator
    .leanleftheld Player Reborn Returns 1 if player is leaning left. Otherwise returns 0.
    Code:
    if (local.player.leanleftheld) {
        // local.player is leaning left
    }
    .leanrightheld Player Reborn Returns 1 if player is leaning right. Otherwise returns 0.
    Code:
    if (local.player.leanrightheld) {
        // local.player is leaning right
    }
    .nationalityprefix Player BT Get the three or five letter prefix that denotes the player's nationality.
    Code:
    Local.result = local.player.nationalityprefix
    .netname Player BT Gets player's name and returns it as string.
    Code:
    // Breakthrough
    local.player_name = local.player.netname
    // Reborn
    local.player_name = netname local.player
    .primaryfireheld Player BT Returns 1 if this player is holding the primary fire, or 0 if not.
    Code:
    local.result = local.player.primaryfireheld
    .runheld Player Reborn Returns 1 if player is running. Otherwise returns 0.
    Code:
    if (local.player.runheld) {
        // local.player is running
    }
    .secfireheld Player Reborn Returns 1 if player is holding secondary fire button. Otherwise returns 0.
    Code:
    if (local.player.secfireheld) {
        // local.player is holding secondary fire button
    }
    .secondaryfireheld Player BT Returns 1 if this player is holding the secondary fire, or 0 if not.
    Code:
    local.result = local.player.secondaryfireheld
    .useheld Player AA, SH, BT Returns 1 if this player is holding use, or 0 if he is not.
    Code:
    if (local.player.useheld) {
        // local.player is holding use
    }
    .userinfo Player Reborn Returns player's userinfo.
    Code:
    local.userinfo = local.player.userinfo
    .vehicle Player BT Returns the vehicle the player is using (Breakthrough only).
    NULL if player isn't using a vehicle.
    Code:
    local.result = local.player.vehicle
    .viewangles Player
    TurretGun
    AA, SH, BT Sets/Gets the view angles of the entity.
    Code:
    local.player.viewangles = ( -12 -90 0 )
    local.viewangles = local.player.viewangles




    Alternatively you can see the list with the same info using Sublime Text + the MOHAA Package

    List of built-in properties
    List of all scripting commands from Allied Assault, Spearhead and Breakthrough
    List of all scripting commands from Reborn

  2. #2
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,173

    Default

    Thanks for sharing Zappa. I stickied this thread because I'm sure many will find it helpful.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •