Page 23 of 65

Re: [Models] New created Models..

Posted: Sun Jan 13, 2013 1:39 am
by germanny
Update to V 2.2 for custom asset pack!
Added Dungeon Master items: axe and waterskin.
The waterskin needs more coding - i dont know if it is possible to make it so that the full model is replaced by the empty after use.
And how can i use it more than once?
SpoilerShow
Image
DL:
Germannys Dungeon Master and Custom Assets -- a collection of items and weapons
DL: Germannys Dungeon Master and Custom Assets at Grimrock Nexus

Re: [Models] New created Models..

Posted: Sun Jan 13, 2013 1:42 am
by Neikun
defineObject{
name = "water_flask",
class = "Item",
uiName = "Water Flask",
model = "assets/models/items/flask_full.fbx",
gfxIndex = 144,
consumable = true,
emptyItem = "flask",

onUseItem = function(self, champion)
playSound("consume_potion")
return true
end,
weight = 0.6,
}


Bolded elements are my guess.

Re: [Models] New created Models..

Posted: Sun Jan 13, 2013 1:45 am
by germanny
Thx Neikun, and do you know how i manage to use it 4x before empty?

Re: [Models] New created Models..

Posted: Sun Jan 13, 2013 1:53 am
by Neikun
Wellll.
You could define Five different versions of the item representing number of uses left and have the greater uses verison emptyItem = the next less usages version.

Example,
Make water_flask_4, water_flask_3, water_flask_2, water_flask_1, water_flask_0 (Can you have an item named water_flask_1/4? that would be more legible)

So when you drink water_flask_4, the emptyItem would be
emptyItem= water_flask_3,

And if you drink water_flask_3, the emptyItem would be
emptyItem= water_flask_2,

This would happen until water_flask_0 which would be empty.

Re: [Models] New created Models..

Posted: Sun Jan 13, 2013 1:54 am
by germanny
Many thanks again, that sounds good!
I will test that now^^

Re: [Models] New created Models..

Posted: Sun Jan 13, 2013 1:58 am
by Neikun
Good idea, I think it should work, but I can't test it.

Re: [Models] New created Models..

Posted: Sun Jan 13, 2013 2:39 am
by germanny
Yes, it does work! Great, i add for every use +250 food and + 5 energy.
Now i can work on at my DM fountain and find out, how to fill the waterskin there.

Well, i can do only one thing at a time - now i focused on modeling and graphics, there is no time to think about scripting.
So every help is very appreciated!

Hail you, Neikun^^

Re: [Models] New created Models..

Posted: Sun Jan 13, 2013 3:14 am
by Neikun
I help any time I can

Re: [Models] New created Models..

Posted: Sun Jan 13, 2013 4:32 am
by germanny
Update to V 2.3 for custom asset pack!
Added Dungeon Master item: Hardcleave
Thanks to Neikun the waterskin is working now - one can drink 4 times before empty - works like a charm^^
SpoilerShow
Image
DL:
Germannys Dungeon Master and Custom Assets -- a collection of items and weapons
DL: Germannys Dungeon Master and Custom Assets at Grimrock Nexus

Re: [Models] New created Models..

Posted: Sun Jan 13, 2013 4:45 am
by Neikun
Glad to be a part of the pack I admire! =D