Page 56 of 65

Re: [Models] New created Models..

Posted: Sun Feb 02, 2014 2:07 am
by chaoscommencer
Heh, maybe you should play the Kesha song with it instead ;)

Re: [Models] New created Models..

Posted: Sun Feb 02, 2014 2:08 pm
by thomson
chaoscommencer wrote:Heh, maybe you should play the Kesha song with it instead ;)
You, sir, are mistaken. The one and only appropriate song is the lumberjack song!

Re: [Models] New created Models..

Posted: Sun Feb 02, 2014 2:35 pm
by germanny
Oh yes, monty phyton! Best related song ever xD

Added a toolbox as item. Definition as container yet.
Image

Could come in place if one will repair something?
Currently i build a metal patch item and decoration asset for the conduit´s leakage.
I think of make a invisible button that can placed at the leak - by clicking him spawn the patch and reverse?

Sort of 'if champion has toolbox and patch in hands and button at leakage pressed'
Image

Re: [Models] New created Models..

Posted: Sun Feb 02, 2014 7:59 pm
by germanny
burning leak
Image

Re: [Models] New created Models..

Posted: Sun Feb 02, 2014 9:20 pm
by chaoscommencer
Heh, I stand corrected thomson ;)

Re: [Models] New created Models..

Posted: Sun Feb 02, 2014 9:22 pm
by chaoscommencer
Neat stuff Germanny I like the patchable gas leak idea.

Re: [Models] New created Models..

Posted: Mon Feb 03, 2014 12:13 am
by germanny
chaoscommencer wrote:Neat stuff Germanny I like the patchable gas leak idea.
By deactivating the handwheel burning stops. By activating it burns.
Idea is to allow repair only while burning is off.
There is one big problem: i can´t destroy a loop sound that played there via playSoundAt().
Burning/gas steam without sound it is a bit confusing :/

But i scripted the cave-in ready to go, it is only destroyable by my pickaxe:
I avoided spells, projectiles and all other attacks except 'dm_pickaxe'.
If hit with any magic attack, hint text 'Magic has no effect on Stone and Gravel' displays
If hit with other physical attacks, hint text 'Use a pickaxe for digging' displays.
Image
Image
Image

Will add similar to the breakable walls, only destroyable by hammer or pickaxe..

Re: [Models] New created Models..

Posted: Mon Feb 03, 2014 3:21 am
by chaoscommencer
Hmm... what about those bombs that some mods have? Those should probably be able to clear it too, just like dynamite, you think? Nice job though, getting a destructible object to respond only to the pickaxe must have been tough. Looks great man.

Re: [Models] New created Models..

Posted: Mon Feb 03, 2014 8:38 am
by Isaac
germanny wrote:Oh yes, monty phyton! Best related song ever xD
Sort of 'if champion has toolbox and patch in hands and button at leakage pressed'
Image
Make it an alcove, not a button. The alcove can have it's clickable region set around the damaged area, and the onInsertItem hook of the alcove can be used to check for the item used [the patch], and only do your repair instructions if the patch was used. You can orient the placed item into the position you'd like and it will have the patch over the hole.


This could work for tool boxes also.
*If you want the tool box to remain with them, simply return 'False' from the hook; if you want the toolbox to vanish when used, you clear the mouse Item in the hook; optionally you could destroy the alcove after the repair is done.

If you want the tool box to have "charges" or limited reuse, then an easy way is to add (and check) a counter for the toolbox; decrementing it in the alcove onInsertItem hook. The other way is to set charges on the item (with setCharges(charges) ), and decrement them in the alcove hook; (this is probably the best method, but you'll have to check the number of charges left and then set them as 1 less each time the tool box is used).

Re: [Models] New created Models..

Posted: Mon Feb 03, 2014 9:06 am
by chaoscommencer
Sorry I didn't catch that; I just sort of assumed he was using an alcove for the patch area as well. Actually is there a way to instantiate two items as one? In this case for example he needs a lever and an alcove for this patchable gas flow controller. Can you define an object type that inherits both lever and alcove? Or do you need to manually place both objects? I've seen this problem pop up in other places too like with Skuggasveinn's town door. Anything really that you need to place two or more objects to get all the desired functionality.