Champion:getItem(slot)

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
ScroLL
Posts: 56
Joined: Tue Sep 18, 2012 12:21 pm
Location: Vermont

Champion:getItem(slot)

Post by ScroLL »

I am trying to test if a champion has a specific item in any slot. getItem() returns the value for a specific slot. Is there an efficient way for me to check if the champion has the item without running getItem() thirty one times?
User avatar
Edsploration
Posts: 104
Joined: Wed Sep 19, 2012 4:32 pm

Re: Champion:getItem(slot)

Post by Edsploration »

If if you had a function to do this in one step, all that function would itself be doing is checking each slot individually.

The Useful Scripts Repository thread is your friend. Look under 1.3) Item and inventory scripts

viewtopic.php?p=31480#p31480
Open Project -> Community FrankenDungeon: viewtopic.php?f=14&t=4276
User avatar
ScroLL
Posts: 56
Joined: Tue Sep 18, 2012 12:21 pm
Location: Vermont

Re: Champion:getItem(slot)

Post by ScroLL »

Thanks, I used the search function and didn't see it but forgot to check that thread.
Post Reply