Search found 48 matches

by nichg
Mon Oct 29, 2012 4:01 am
Forum: Modding
Topic: Weird glitch between hooks and script_entity objects
Replies: 15
Views: 12685

Re: Weird glitch between hooks and script_entity objects

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...
by nichg
Mon Oct 29, 2012 12:57 am
Forum: Modding
Topic: Display score variable in cinematics
Replies: 9
Views: 7135

Re: Display score variable in cinematics

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...
by nichg
Mon Oct 29, 2012 12:50 am
Forum: Modding
Topic: Weird glitch between hooks and script_entity objects
Replies: 15
Views: 12685

Re: Weird glitch between hooks and script_entity objects

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 = ...
by nichg
Mon Oct 29, 2012 12:34 am
Forum: Modding
Topic: Silly experiment: dropping enemies into a level
Replies: 5
Views: 4301

Re: Silly experiment: dropping enemies into a level

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...
by nichg
Sun Oct 28, 2012 9:07 pm
Forum: Modding
Topic: Silly experiment: dropping enemies into a level
Replies: 5
Views: 4301

Silly experiment: dropping enemies into a level

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...
by nichg
Sun Oct 28, 2012 7:26 pm
Forum: Modding
Topic: Weird glitch between hooks and script_entity objects
Replies: 15
Views: 12685

Re: Weird glitch between hooks and script_entity objects

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...
by nichg
Sun Oct 28, 2012 2:22 am
Forum: Modding
Topic: Weird glitch between hooks and script_entity objects
Replies: 15
Views: 12685

Re: Weird glitch between hooks and script_entity objects

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' ...
by nichg
Sat Oct 27, 2012 3:28 am
Forum: Modding
Topic: Height & Depth?
Replies: 3
Views: 2687

Re: Height & Depth?

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...
by nichg
Fri Oct 26, 2012 8:20 am
Forum: Modding
Topic: any way to do dream sequences? Even the same exact ones?
Replies: 13
Views: 8807

Re: any way to do dream sequences? Even the same exact ones?

You could use a tileset with empty models for everything I guess, and teleport them to that level.
by nichg
Wed Oct 24, 2012 11:28 pm
Forum: Modding
Topic: Weird glitch between hooks and script_entity objects
Replies: 15
Views: 12685

Re: Weird glitch between hooks and script_entity objects

Alright, I've tried with getOrdinal(), still inside the onDamage hook. It still crashes. For a sanity check:

Code: Select all

if champ ~= nil then
-- do nothing
end
does not crash.

Go to advanced search