Changes between Version 35 and Version 36 of Triggers


Ignore:
Timestamp:
Jan 3, 2018, 12:40:56 PM (6 years ago)
Author:
mimo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Triggers

    v35 v36  
    4040This should show a yellow warning in the top left of your screen when the map loading is finished.
    4141
     42Several difficulty levels are possible for the scripts (see simulation/data/trigger_difficulties.json for a complete list). For that purpose, you should add in the JSON part:
     43{{{
     44#!js
     45{
     46  "SupportedTriggerDifficulties": { "Values": ["Easy", "Hard"], "Default": "Easy" }
     47}
     48}}}
     49if your script supports these two levels. Then, in your JS script, you can retrieve the difficulty level chosen by the player using
     50{{{
     51#!js
     52{
     53  let difficulty = Engine.QueryInterface(SYSTEM_ENTITY, IID_Trigger).GetDifficulty();
     54}
     55}}}
     56
    4257'''Tip:''' See [wiki:Logging Logging] for more logging options, and use `uneval(data)` to transform any JS data into human-readable text.
    4358