Player onuse

From Fortress Forever Wiki
Jump to navigationJump to search


Mapping for FF
The Basics

Setting up Hammer
Getting Started With Lua
Releasing a map

FF-specific Entities
  • ff_minecart
  • ff_miniturret
  • info_ff_script
  • info_ff_teamspawn
  • path_mapguide
  • trigger_ff_script
  • trigger_ff_clip

Lua location system

Map Templates
  • Basic Teamplay
  • Capture the Flag
  • Attack and Defend
  • Invade and Defend
  • Territory Control
  • Hunted
FF Lua Documentation

Entity Typing
Entity Collections

Commands
  • Buildables
  • DamageInfo
  • HUD Items
  • Sounds and Messages
  • Objective Icon
  • Players
  • Scheduling
  • Menus
  • Entity Functions
  • Teams
  • Utility Functions
  • Data Saving Functions
Callbacks
  • Global
  • info_ff_script
  • trigger_ff_script
  • Spawn turrets
  • Spawn point control

player_onuse ( player )

This callback is called whenever the player presses the USE button.

Usage

function player_onuse( player )
    local MyName = player:GetName()

    -- Says the players name on use.
    ChatToPlayer(player, "My Name is "..MyName.."!")
end

Return false to prevent the use from happening.

Retrieved from "https://www.fortress-forever.com/wiki/index.php?title=Player_onuse&oldid=10057"
Categories:
  • Lua Callbacks
  • Global Callbacks

Navigation menu

Page actions

  • Page
  • Discussion
  • View source
  • History

Page actions

  • Page
  • Discussion
  • More
  • Tools
  • In other languages

Personal tools

    Navigation

    • Contents Page
    • Installation & Setup
    • Playing the Game
    • Class Guides
    • Map Guides
    • Advanced Gameplay
    • Modding
    • Reference Guides
    • FAQs

    Tools

    • What links here
    • Related changes
    • Special pages
    • Printable version
    • Permanent link
    • Page information

     
    Powered by MediaWiki
    • This page was last edited on 30 March 2015, at 16:13.
    • Privacy policy
    • About Fortress Forever Wiki
    • Disclaimers