Jump to content

[Tutorial] Destructible Object Creation


Mattiewagg

Recommended Posts

I recently researched Destructible Objects some and then wrote a (long, detailed) tutorial on it. If any of you have any input/suggestions/corrections I'd really appreciate it. I'm sure some of you have far more experience with this than I do.

 

Destructible Object Creation

Edited by Matthiaswagg
Link to comment
Share on other sites

Lol

I love you

I didn't read it 100% so this may have been answered in there somewhere maybe not, is there anyway to make it only susceptible to a certain weapon IE one with say a magic effect to break rocks? etc

 

Cause atm I actually have little magic areas all over I'm scattering ALA Zelda and Darksiders style to give the player a reason to re-explore areas, and it would be cool to say give them a magic dwarven hammer that is the only way to break open certain rocks blocking passages and crap

 

And upon saying that I am a idiot, it has destruction stages in script so I can probably just on the first destructionstage make it so that if player doens't have X hammer etc equipped it heals to full

 

This is gonna be fun

Link to comment
Share on other sites

I don't think its possible via the interface for destruction data, though I wish it were. The scripting shoukd work though.

 

Also I totally messed up the formatting and I'll fish that tomorrow. I'm on my phone right now.

Link to comment
Share on other sites

Ok so

 

F YA to start

 

Something that I personally now need help with, is how to heal it so to speak

self.reset() - Failed

Cleardestruction basically just makes it a object with no collision

Using a negative number in damageobject failed

Trying to mod its actor value predictably failed

 

The only thing I didn't really try was a disable then enable command to try and reset it, I don't really want it to disapear even if for a frame or two that would be meh but if I have to

 

Just something to look at if you got time, otherwise works like a fricking charm and will add some fun to encounters and stories I have already and a lot in the future

 

Oh and was just doing a easysauce

--

Event OnDestructionStageChanged(int aiOldStage, int aiCurrentStage)
if (aiCurrentStage == 2)
if (Game.GetPlayer().GetEquippedWeapon() != weapon1)
--
You can easily just add another script to the activator so you can just leave the default stockade one on their pretty easy, but ya I know the scripts were firing, just the ones I mentioned didn't work or worked wrong for what I am trying to accomplish
Edited by Darren83
Link to comment
Share on other sites

it clears everything from it, it turns it into a graphic with no collision activation etc

IE can walk through it and it turned it back to it's original rock

 

I was basically using two rock meshes to test this, and stage 2 was at 50% and it would change the rock mesh, and 1 sec later would run whatever I was trying, Cleardestruction basically just made it pop back to the original rock and you could walk through it etc

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...