This shows you the differences between the selected revision and the current
version of the page.
cs:faq 2009/02/16 13:05 | cs:faq 2009/02/18 19:45 current | ||
---|---|---|---|
Line 20: | Line 20: | ||
- | ===== Q: How to disable inventory in a scene? ===== | ||
+ | ===== Q: Ako zakázať inventár v scéne? ===== | ||
- | A: Normally would have been sufficient to set Game.InventoryVisible = false; but WME demo has a sliding inventory, so we would need a bit more for that. | ||
- | Go into data/scripts/game_daemon.script file to the line which reads | + | A: Normálne by bolo vhodné nastaviť Game.InventoryVisible = false; ale WME demo má posúvací inventár, takže my budeme potrebovať trocha viac. |
+ | |||
+ | Choďte do data/scripts/game_daemon.script súbora na riadok, ktorý číta | ||
<code script> | <code script> | ||
if(Game.Interactive && Game.MouseY < 45 &&! Game.ResponsesVisible &&! WinMenu.Visible) | if(Game.Interactive && Game.MouseY < 45 &&! Game.ResponsesVisible &&! WinMenu.Visible) | ||
Line 31: | Line 32: | ||
</code> | </code> | ||
- | and change it to | + | a zmeňte ho na |
<code script> | <code script> | ||
if(Game.Interactive && Game.MouseY < 45 &&! Game.ResponsesVisible &&! WinMenu.Visible && InventoryActive) | if(Game.Interactive && Game.MouseY < 45 &&! Game.ResponsesVisible &&! WinMenu.Visible && InventoryActive) | ||
Line 37: | Line 38: | ||
</code> | </code> | ||
- | Add into data/scripts/base.inc line global InventoryActive; and finally in data/scripts/game.script insert at the begining line InventoryActive = true; | + | Pridajte do data/scripts/base.inc riadok global InventoryActive; a nakoniec v data/scripts/game.script vložte na začiatok riadka InventoryActive = true; |
- | From now on you can easily enable / disable inventory setting global variable InventoryActive in your scene_init.script files. | + | Od teraz môžete jednoducho povoliť / zakázať inventár nastavením globálnej premennej InventoryActive vo vašich scene_init.script súboroch. |
- | ===== Q: How to wrap a line in string tab? ===== | ||
- | A: Simply put | to the place you want to have the line wrapped. | + | ===== Q: Ako rozdeliť riadok v string tab? ===== |
- | Example: | + | |
+ | |||
+ | A: Jednoducho vložte | na miesto, kde chcete mať riadok rozdelený. | ||
+ | Napríklad: | ||
TXT000001[TAB]Hi, I would like to speak with you about | somereallystrangeandincomprehensible thing. | TXT000001[TAB]Hi, I would like to speak with you about | somereallystrangeandincomprehensible thing. | ||
- | ===== Q: How to work in scripts with lines from string tab? ===== | ||
+ | ===== Q: Ako pracovať s riadkami zo string tab v skriptoch? ===== | ||
- | A: If you need to assign your localised string to some variable, you have to call Game.ExpandString() function. | + | |
- | So Example: | + | A: Ak potrebuješ priradiť tvoj lokalizovaný string na nejakú premennú, musíš zavolať Game.ExpandString() funkciu. |
+ | Tak napríklad: | ||
<code script>var txt = Game.ExpandString("/TXT000001/"); | <code script>var txt = Game.ExpandString("/TXT000001/"); | ||
Line 98: | Line 102: | ||
- | ===== Q: How to work with Arrays as a member class of a custom object? ===== | + | |
+ | ===== Q: Ako pracovať s poľami ako s členom triedy vlastného objekta? ===== | ||
A: | A: | ||
- | Thanks to dot notation limitation to one level, you have to trick this through temporary variable. Here's the example: | + | Vďaka limitu bodkového zápisu na jednu úroveň, musíš to oklamať cez dočasnú premennú. Tu je ukážka: |
- | file Arrayclass.script? | + | súbor Arrayclass.script? |
<code script>#include "scripts\base.inc" | <code script>#include "scripts\base.inc" |