StendhalScripting/LuaAPI: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>AntumDeluge See also |
imported>AntumDeluge →game: added "game:setMusic" method |
||
| Line 75: | Line 75: | ||
* ''<span style="color:green">game:setZone</span>(zone)'' |
* ''<span style="color:green">game:setZone</span>(zone)'' |
||
* ''<span style="color:green">game:getZone</span>(rpobject)'' |
* ''<span style="color:green">game:getZone</span>(rpobject)'' |
||
; ''<span style="color:green">game:setMusic</span>(filename, args)'' |
|||
: Sets the music for the currently selected zone. |
|||
:; <span style="color:darkgreen; font-style:italic;">filename:</span> |
|||
:: File basename excluding .ogg extension. |
|||
:; <span style="color:darkgreen; font-style:italic;">args:</span> |
|||
:: Lua table of key=value integer values. |
|||
::; Valid keys: |
|||
::: <span style="color:darkblue; font-style:italic;">volume:</span> Volume level (default: 100). |
|||
::: <span style="color:darkblue; font-style:italic;">x:</span> The X coordinate of the sound source (default: 1). |
|||
::: <span style="color:darkblue; font-style:italic;">y:</span> The Y coordinate of the sound source (default: 1). |
|||
::: <span style="color:darkblue; font-style:italic;">radius:</span> The radius from which the music can be heard (default: 10000). |
|||
* ''<span style="color:green">game:playerIsInZone</span>(player, zoneName)'' |
* ''<span style="color:green">game:playerIsInZone</span>(player, zoneName)'' |
||
* ''<span style="color:green">game:getCreatures</span>()'' |
* ''<span style="color:green">game:getCreatures</span>()'' |
||