Page 5 of 36

Re: (Object Assets) Empty Catacomb as Alcove and other alcov

Posted: Wed Oct 03, 2012 1:31 am
by Neikun
That is beyond me. Besides, the statue's items are larger that the actual items. -except for the helmet, thankfully.
I'll probably finish the spear tomorrow. But I'll start on it right now.

Re: (Object Assets) Empty Catacomb as Alcove and other alcov

Posted: Wed Oct 03, 2012 1:52 am
by Batty
That is awesome! The helmet looks perfect!

Re: (Object Assets) Empty Catacomb as Alcove and other alcov

Posted: Wed Oct 03, 2012 1:56 am
by Neikun
Batty wrote:That is awesome! The helmet looks perfect!
That's cause I spent over an entire half hour tweaking the position :3
well plus the time in the rough positioning.

Re: (Object Assets) Empty Catacomb as Alcove and other alcov

Posted: Wed Oct 03, 2012 2:19 am
by crisman
I've tried with the spear, but it's too short compared to the one of the statue.
The shield fits almost perfectly.
Image
I've borrowed from you the script of the helmet alcove :D
Hope you don't mind!
SpoilerShow
defineObject{
name = "statue_alcove_spear_spear",
class = "Alcove",
anchorPos = vec(-0.354, 1.75, -0.0475),
anchorRotation = vec(145,-5.5,-99.11),
targetPos = vec(-0.4,1.55, 0.0),
targetSize = vec(0.1, 0.8, 0.2),
model = "assets/models/env/temple_gladiator_statue_spear.fbx",
onInsertItem = function(self, item)
return item.name == "legionary_spear" and self:getItemCount() == 0
end,
placement = "wall",
replacesWall = true,
editorIcon = 92,
}
SpoilerShow
defineObject{
name = "statue_alcove_spear_shield",
class = "Alcove",
anchorPos = vec(0.36, 1.53, 0.05),
anchorRotation = vec(145,4.5,-91),
targetPos = vec(0.4,1.55, 0.0),
targetSize = vec(0.18, 0.5, 0.2),
model = "assets/models/env/temple_gladiator_statue_spear.fbx",
onInsertItem = function(self, item)
return item.name == "legionary_shield" and self:getItemCount() == 0
end,
placement = "wall",
replacesWall = true,
editorIcon = 92,
}

Re: (Object Assets) Empty Catacomb as Alcove and other alcov

Posted: Wed Oct 03, 2012 2:24 am
by Batty
lol every dungeon is gonna have a "replace my gear to proceed" puzzle.

I don't know how Neikun keeps coming up with new ideas.

Re: (Object Assets) Empty Catacomb as Alcove and other alcov

Posted: Wed Oct 03, 2012 2:28 am
by Neikun
Oh good job with the spear. you did a better job than I did.
My rotation was: anchorRotation = vec(190,185,81.0),

Re: (Object Assets) Empty Catacomb as Alcove and other alcov

Posted: Wed Oct 03, 2012 2:28 am
by Neikun
Batty wrote:lol every dungeon is gonna have a "replace my gear to proceed" puzzle.

I don't know how Neikun keeps coming up with new ideas.
This one is inspired entirely by a puzzle in Daght's mod, Distant voices.
Also someone showed me anchorRotation and I've just been putting it everywhere lol

Re: (Object Assets) Empty Catacomb as Alcove and other alcov

Posted: Wed Oct 03, 2012 3:03 am
by Batty
Wall Lanterns Resurrected

Ignore the previous wall lantern solution as it doesn't work outside the editor. The lanterns you light don't survive save games because they were created via FX when I should have used objects instead. So, here is the revised fully functioning and simpler solution:

Code: Select all

defineObject{
       name = "wall_lantern_fx_3",
	    class = "LightSource",
	    lightPosition = vec(-1.18, 1.85, 0),
	    lightRange = 12,
	    lightColor = vec(0.7, 0.5, 0.5),
	    brightness = 10,
	    castShadow = true,
	    particleSystem = "torch",
	    placement = "floor",
	    editorIcon = 88,
}

defineObject{
	    name = "wall_lantern_fx_2",
	    class = "LightSource",
	    lightPosition = vec(0, 1.85, -1.18),
	    lightRange = 12,
	    lightColor = vec(0.7, 0.5, 0.5),
	    brightness = 10,
	    castShadow = true,
	    particleSystem = "torch",
	    placement = "floor",
	    editorIcon = 88,
}

defineObject{
	    name = "wall_lantern_fx_1",
	    class = "LightSource",
	    lightPosition = vec(1.18, 1.85, 0),
	    lightRange = 12,
	    lightColor = vec(0.7, 0.5, 0.5),
	    brightness = 10,
	    castShadow = true,
	    particleSystem = "torch",
	    placement = "floor",
	    editorIcon = 88,
}

defineObject{
	    name = "wall_lantern_fx_0",
	    class = "LightSource",
	    lightPosition = vec(0, 1.85, 1.18),
	    lightRange = 12,
	    lightColor = vec(0.7, 0.5, 0.5),
	    brightness = 10,
	    castShadow = true,
	    particleSystem = "torch",
	    placement = "floor",
	    editorIcon = 88,
}
Define 4 LightSource objects - one for each facing position. The only difference between the four is the name and lightPosition. This has to be done because the convenient FX translate() function doesn't work with LightSource objects. They can't be moved. You also need to define a sound object:

Code: Select all

defineSound{
       name = "wall_lantern_crackling",
	    filename = "assets/samples/env/torch_burning_01.wav",
	    loop = true,
	    volume = 0.5,
	    minDistance = 2,
       maxDistance = 6,
}	
Lastly, replace the logical lantern script. It's simpler now.

Code: Select all

defineObject{
   	name = "wall_lantern_logical",
   	class = "Alcove",
   	anchorPos = vec(0, 1.65, 0),
   	targetPos = vec(0, 1.65, 0),
   	targetSize = vec(0.2, 0.2, 0.2),
	   onInsertItem = function(self, item)		
		   if item.name == "torch" or "everlasting_torch" then
			   spawn("wall_lantern_fx_"..self.facing, self.level, self.x, self.y, 0)
			   playSoundAt("wall_lantern_crackling", self.level, self.x, self.y)
			   self:destroy()
		   end
	   end,
   	placement = "wall",
   	replacesWall = false,
   	editorIcon = 84,
}
Don't forget the visual lantern script from my previous post.

I also added a new feature you can see at the end of a demo vid I put on the tube:

Wall Lanterns Resurrected

Re: (Object Assets) Empty Catacomb as Alcove and other alcov

Posted: Wed Oct 03, 2012 3:23 am
by Neikun
Have you figured out a way to make lighting the lanterns consume extra fuel from the torch?

Also, I liked the bit with the fireball lighting.

I'm getting the sneaking suspicion that anything at all that you might want to do in the game can be handled by alcoves.

Re: (Object Assets) Empty Catacomb as Alcove and other alcov

Posted: Wed Oct 03, 2012 3:27 am
by Batty
Neikun wrote:Have you figured out a way to make lighting the lanterns consume extra fuel from the torch?

Also, I liked the bit with the fireball lighting.

I'm getting the sneaking suspicion that anything at all that you might want to do in the game can be handled by alcoves.
No, because there's no way to access fuel amount of torches. There's still the problem of burnt out torches lighting the lanterns. That would be a cool feature!