| 42 | Several 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 | }}} |
| 49 | if 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 | |