1. Vote on the best bounty the oceans have to offer! The poll for the 34th Modeling Contest has begun.
    Dismiss Notice
  2. Awaken what lies in the heart of your swarm. The 17th Techtree Contest has arrived!
    Dismiss Notice
  3. Check out the Staff Job Openings thread.
    Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[JASS] What is JASS?

Discussion in 'Triggers & Scripts' started by Archian, Nov 16, 2006.

Thread Status:
Not open for further replies.
  1. Archian


    Site Director

    Jan 1, 2006
    What is JASS?
    By Archian


    Due to the new programming section, I decided to create this.
    This thread contains information regarding JASS (Blizzard's scripting language used for Warcraft 3), it is meant to be a short source of information that may encourage people to start JASS scripting.
    It will also include links to tools, tutorials and other sites, such as; Wc3campaigns and The Jass Vault.

    What is JASS?
    JASS, is an event driven scripting language used in Warcraft 3.
    Custom map creators can use it in the World Editor to create triggers and AI scripts for their Wc3 Maps.

    When you place units, items, destructibles, regions etc. in the World Editor the editor converts the information into JASS scripts.
    In the Trigger Editor you can use the edit function "Convert to Custom Text" on a trigger to convert it into JASS.


    • Melee Initialization
      • Events
        • Map initialization
        • Conditions
        • Actions
          • Melee Game - Use melee time of day (for all players)
          • Melee Game - Limit Heroes to 1 per Hero-type (for all players)
          • Melee Game - Give trained Heroes a Scroll of Town Portal (for all players)
          • Melee Game - Set starting resources (for all players)
          • Melee Game - Remove creeps and critters from used start locations (for all players)
          • Melee Game - Create starting units (for all players)
          • Melee Game - Run melee AI scripts (for computer players)
          • Melee Game - Enforce victory/defeat conditions (for all players)
    I converted the default melee game initialization for all players into JASS, and this is how it will look like now.

    Code (vJASS):
    function Trig_Melee_Initialization_Actions takes nothing returns nothing
        call MeleeStartingVisibility(  )
        call MeleeStartingHeroLimit(  )
        call MeleeGrantHeroItems(  )
        call MeleeStartingResources(  )
        call MeleeClearExcessUnits(  )
        call MeleeStartingUnits(  )
        call MeleeStartingAI(  )
        call MeleeInitVictoryDefeat(  )

    function InitTrig_Melee_Initialization takes nothing returns nothing
        set gg_trg_Melee_Initialization = CreateTrigger(  )
        call TriggerAddAction( gg_trg_Melee_Initialization, function Trig_Melee_Initialization_Actions )

    The JASS scripting language provides an extensive API that gives programmers control over nearly every aspect of the game.
    It can, for example, manipulate the terrain. It has a syntax similar to Turing and Delphi, although, unlike those languages, it is case sensitive, the JASS syntax checker tends to crash and is somewhat slow (this is where tool extensions comes in).

    External linksTool Extensions
    Last edited by a moderator: Sep 30, 2007
Thread Status:
Not open for further replies.