• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Does jasshelper now ship with standard warcraft 3?

Status
Not open for further replies.
Level 3
Joined
Nov 3, 2018
Messages
12
I can't seem to be able to remove Jasshelper. I want to use lua and i think JH is giving me trouble.
However simply deleting the folder only results in it re-downloading.

Anything i should know?
 
Level 3
Joined
Oct 13, 2012
Messages
28
1.31.0 Patch Notes

(Beta) Added Lua as a supported scripting language. To create a Lua map:

  1. Create a blank map
  2. Open Scenario > Map Options
  3. Select Lua from the Script Language dropdown
  • Maps save in the selected language
  • Maps that are written only in standard libraries can switch to Lua
  • Maps that use custom script will have to disable all custom triggers before conversion
 
Level 3
Joined
Nov 3, 2018
Messages
12
I might be mistaken on something.
In JASS, i can convert GUI to jass to look up apis. Is that not possible with LUA?

Also, i've been trying basic melee init in lua:

Code:
function Trig_Melee_Initialization_Actions()
    MeleeStartingVisibility(  )
    MeleeStartingHeroLimit(  )
    MeleeGrantHeroItems(  )
    MeleeStartingResources(  )
    MeleeClearExcessUnits(  )
    MeleeStartingUnits(  )
    MeleeStartingAI(  )
    MeleeInitVictoryDefeat(  )
end

-- Trigger Init
function InitTrig_Melee_Initialization()
    gg_trg_Melee_Initialization = CreateTrigger(  )
    TriggerAddAction( gg_trg_Melee_Initialization, Trig_Melee_Initialization_Actions )
end

This throws syntax errors on save. I can't seem to find quick intro into coding lua into we so i'm a bit confused.
 
Level 3
Joined
Nov 3, 2018
Messages
12
Yep.

Update: I've been able to run Lua code, but i'm not sure i'm making it the right way. Also it doesn't seem to be possible to register a trigger from lua. Can anyone confirm/deny?

What i've been able to do so far:

  • Test
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Custom script: luaInit()
on an other object, doing New -> Custom Script:

Code:
function luaInit()
    MeleeStartingVisibility(  )
    MeleeStartingHeroLimit(  )
    MeleeGrantHeroItems(  )
    MeleeStartingResources(  )
    MeleeClearExcessUnits(  )
    MeleeStartingUnits(  )
    MeleeStartingAI(  )
    MeleeInitVictoryDefeat(  )
end

This is as far as i got.
 
It is okay, but kinda ugly.
Update: I've been able to run Lua code, but i'm not sure i'm making it the right way. Also it doesn't seem to be possible to register a trigger from lua. Can anyone confirm/deny?
There is no initTrig for custom written Lua. Hence Bribe wrote [Lua] Global Initialization. It executes wanted functions at/pre map init.
 
Status
Not open for further replies.
Top