Try doing something like this instead: scoreLua function decrementScore(ammt) score = score - ammt end function getScore() return score end onDie onDie = function(champion) -- ... scoreLua.decrementScore(ammt) end Use scoreLua.getScore() when you want to access it. I've found I had to do that with a...
Oh... so one thing that I should mention. Part of the reason things were crashing when I was testing things in that thread is because hudPrint didn't like an integer argument. print can handle it, but not hudPrint. You might need to explicitly cast the score to a string to use it in the cinematics t...
I think I have a sane way to pass certain things to script_entities from hooks. I've had decent luck using '.' instead of ':'. For instance, the stuff I was talking about earlier in this thread works consistently for me if I do: script_library function checkChampionEquip(champ_id, itemname) champ = ...
Komag, now I'm tempted to try to make ogre pachinko where you have a charging ogre that you try to navigate to the goal by turning pits on and off. Except I guess its hard to provoke an ogre to charge by script rather than by the party actually being there. Probably would have to use a quick success...
I decided to try something out: put an enemy on a sealed pit one level up, and then open that pit with a script. I don't know if the result is useful for anyone, but it may be good to be aware of some things. First off, falling monsters don't animate as falling - they simply appear right on the squa...
Correction to what I just said. champ:getName() seems to work. I was doing champ.getName(), which crashes. champ:getOrdinal() still crashes though. However, this seems to be because hudPrint doesn't like a numerical argument. If I just use print, it works. Okay, so the end result seems to be that pa...
That also crashes. I found the error log: mod_assets/scripts/init.lua:82: bad self stack traceback: [C]: in function 'error' [string "ScriptInterface.lua"]: in function 'getName' mod_assets/scripts/init.lua:82: in function 'onDamage' [string "Champion.lua"]: in function 'damage' ...
Maybe you could do something using a teleporter? You can get an animation of the party moving down or up with the stairs objects. If you then put a teleporter to drop them back on the floor they just left, but on the 'other side' of the stairs object. I'm thinking something like: ##### A>X<B ##### W...