Page 218 of 400

Re: Ask a simple question, get a simple answer

Posted: Thu Feb 01, 2018 5:00 pm
by bongobeat
AndakRainor wrote:
@bongobeat: you could look at objects.lua in the spells pack to see how I solved this.
on which spell/object do your refer?
There is "frostburst_cast" that use the skill but I'm not sure if I understand it correctly. Does it change the duration of the frozen condition?

Code: Select all

defineObject{
  name = "frostburst_cast",
  baseObject = "frostburst",
  components = {
    {
      class = "TileDamager",
      attackPower = 11,
      castByChampion = 1,
      damageType = "cold",
      sound = "frostburst",
      onHitMonster = function(self, monster)
        monster:setCondition("frozen", math.random()*(3+party.party:getChampionByOrdinal(self:getCastByChampion()):getSkillLevel("water_magic")))
      end,
    },
  },
}

Re: Ask a simple question, get a simple answer

Posted: Thu Feb 01, 2018 6:02 pm
by Badgert
Can you please tell me how to make a breakable standard element mine_moss_cave_in ?

Re: Ask a simple question, get a simple answer

Posted: Fri Feb 02, 2018 12:08 am
by zimberzimber
Badgert wrote:Can you please tell me how to make a breakable standard element mine_moss_cave_in ?
Take one of the breakable boxes and change their model to the cave in model? :v

Re: Ask a simple question, get a simple answer

Posted: Fri Feb 02, 2018 10:14 am
by Badgert
I managed to do this like this

Code: Select all

        defineObject{
           name = "mine_moss_cave_in_breakable",
           baseObject = "base_obstacle",
           components = {
              {
                 class = "Model",
                 model = "assets/models/env/mine_cave_in.fbx",
              },
              {
                 class = "Obstacle",
                 hitSound = "summon_stone_hit",
                 hitEffect = "hit_wood",
              },
              {
                 class = "Health",
                 health = 50,
                 immunities = { "poison" },
                 spawnOnDeath = "barrel_crate_block_broken",
                 onDie = function(self)
                    self.go:playSound("summon_stone_die")
                 end,
              },
              {
                 class = "Controller",
              },
           },
           placement = "wall",
           automapTile = "wall",
           editorIcon = 120,
        }
but this collapse is NOT green and immediately reveals itself ...

Re: Ask a simple question, get a simple answer

Posted: Fri Feb 02, 2018 2:24 pm
by zimberzimber
Badgert wrote:I managed to do this like this

Code: Select all

        defineObject{
           name = "mine_moss_cave_in_breakable",
           baseObject = "base_obstacle",
           components = {
              {
                 class = "Model",
                 model = "assets/models/env/mine_cave_in.fbx",
              },
              {
                 class = "Obstacle",
                 hitSound = "summon_stone_hit",
                 hitEffect = "hit_wood",
              },
              {
                 class = "Health",
                 health = 50,
                 immunities = { "poison" },
                 spawnOnDeath = "barrel_crate_block_broken",
                 onDie = function(self)
                    self.go:playSound("summon_stone_die")
                 end,
              },
              {
                 class = "Controller",
              },
           },
           placement = "wall",
           automapTile = "wall",
           editorIcon = 120,
        }
but this collapse is NOT green and immediately reveals itself ...
its not green because you're not overriding the materials like the moss_cave_in object does
What do you mean by "immediately reveals itself"?

Re: Ask a simple question, get a simple answer

Posted: Fri Feb 02, 2018 5:37 pm
by Badgert
zimberzimber wrote:What do you mean by "immediately reveals itself"?
This fragment differs sharply from the others and it is immediately clear that something is wrong with it ...

Re: Ask a simple question, get a simple answer

Posted: Fri Feb 02, 2018 7:19 pm
by zimberzimber
Then yeah, just override the texture

Re: Ask a simple question, get a simple answer

Posted: Fri Feb 02, 2018 10:22 pm
by Badgert
I made such an option:

Code: Select all

        defineObject{
           name = "mine_moss_cave_in_breakable",
           baseObject = "base_obstacle",
           components = {
              {
                 class = "Model",
                 model = "assets/models/env/mine_cave_in.fbx",
		 material = "mine_moss_tile",
		 staticShadow = true,
              },
              {
                 class = "Obstacle",
                 hitSound = "impact_blunt",
                 hitEffect = "hit_dust",
              },
              {
                 class = "Health",
                 health = 50,
                 immunities = { "poison" },
                 spawnOnDeath = "barrel_crate_block_broken",
                 onDie = function(self)
                    self.go:playSound("summon_stone_die")
			   party.party:shakeCamera(0.02,2)
                 end,
              },
              {
                 class = "Controller",
              },
           },
           placement = "wall",
           automapTile = "wall",
           editorIcon = 144,
	   minimalSaveState = true,
        }
it seems to work well ...

Re: Ask a simple question, get a simple answer

Posted: Thu Feb 08, 2018 12:45 am
by AndakRainor
Is it possible to occlude a water mesh on a given tile? Or to generate a water mesh dynamically?

Re: Ask a simple question, get a simple answer

Posted: Thu Feb 08, 2018 12:50 am
by minmay
WaterSurfaceMeshComponent creates a single mesh for all water tiles on the level, it doesn't make separate meshes, so you can't occlude parts of it.

The size/shape/triangle count of the mesh has little to do with water performance, however. The shaders are pretty cheap. What's expensive is rendering the reflection buffer in the first place, which is not affected at all by the size/shape/location/complexity of the mesh.