This commit is contained in:
Aria 2025-03-21 22:23:30 +11:00
commit 9c94d113d3
Signed by untrusted user who does not match committer: aria
GPG key ID: 19AB7AA462B8AB3B
10260 changed files with 1237388 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

@ -0,0 +1,35 @@
require "/vehicles/modularmech/armscripts/base.lua"
PlayerLauncher = MechArm:extend()
function PlayerLauncher:init()
self.reloadTimer = 0
self.bobLocked = true
-- vehicle.setLoungeStatusEffects("z" .. self.armName .. "Seat", {"mechballistic"})
end
function PlayerLauncher:update(dt)
if aimPosition then
animator.rotateTransformationGroup(self.armName, self.aimAngle, self.shoulderOffset)
self.reloadTimer = math.max(0, self.reloadTimer - dt)
if self.fireTriggered and self.reloadTimer == 0 then
self.reloadTimer = self.reloadTime
animator.playSound(self.armName .. "Fire")
animator.setAnimationState(self.armName, "winddown", true)
vehicle.setLoungeStatusEffects("z" .. self.armName .. "Seat", {"mechballistic"})
elseif self.reloadTimer > 0 then
-- vehicle.setLoungeStatusEffects("z" .. self.armName .. "Seat", {})
-- vehicle.setLoungeEnabled("z" .. self.armName .. "Seat", false)
else
vehicle.setLoungeStatusEffects("z" .. self.armName .. "Seat", {})
vehicle.setLoungeEnabled("z" .. self.armName .. "Seat", true)
animator.setAnimationState(self.armName, "rotate")
end
else
vehicle.setLoungeStatusEffects("z" .. self.armName .. "Seat", {})
vehicle.setLoungeEnabled("z" .. self.armName .. "Seat", false)
animator.setAnimationState(self.armName, "idle")
end
end

View file

@ -0,0 +1,43 @@
[
{
"op" : "add",
"path" : "/playerlauncher",
"value" : {
"stats" : {
"power" : 3,
"energy" : 0
},
"partParameters" : {
"script" : "/vehicles/modularmech/armscripts/playerlauncher.lua",
"armClass" : "PlayerLauncher",
"rotationLimits" : [-0.5, 1.0],
"reloadTime" : 0.3
},
"loungePositions" : {
"z<armName>Seat" : { // name needs a 'z' to sort after the main seat
"part" : "<armName>",
"partAnchor" : "sitPosition",
"orientation" : "sit",
"cameraFocus" : true,
"enabled" : false
}
},
"partImages" : {
"<armName>" : "arm/playerlauncher.png",
"<armName>Fullbright" : ""
},
"defaultPrimaryColors" : ["f4988c", "d93a3a", "932625", "601119"],
"defaultSecondaryColors" : ["838383", "555555", "383838", "151515"],
"animationCustom" : {
"animatedParts" : { "parts" : { "<armName>" : { "properties" : {
"sitPosition" : [4.5, 4.5]
}}}},
"sounds" : {
"<armName>Fire" : [ "/sfx/gun/crossbow1.ogg" ]
}
}
}
}
]

View file

@ -0,0 +1,339 @@
{
"animatedParts" : {
"stateTypes" : {
"movement" : {
"default" : "idle",
"states" : {
"idle" : { },
"jump" : {
"frames" : 4,
"cycle" : 0.5,
"mode" : "end"
},
"fall" : {
"frames" : 4,
"cycle" : 0.5,
"mode" : "end"
},
"walk" : {
"frames" : 10,
"cycle" : 1.0,
"mode" : "loop"
},
"backWalk" : {
"frames" : 10,
"cycle" : 1.0,
"mode" : "loop"
}
}
}
},
"parts" : {
"body" : {
"properties" : {
"centered" : true,
"zLevel" : 3,
"sitPosition" : [5.25, 2.0]
},
"partStates" : {
"movement" : {
"idle" : {
"properties" : {
"image" : "<partImage>:idle"
}
},
"jump" : {
"properties" : {
"image" : "<partImage>:idle",
"immediateSound" : "/sfx/tech/mech_jump3.ogg"
},
"frameProperties" : {
"offset" : [ [0, 0.5], [0, 0.5], [0, 0.375], [0, 0.375] ]
}
},
"fall" : {
"properties" : {
"image" : "<partImage>:idle"
},
"frameProperties" : {
"offset" : [ [0, 0.25], [0, 0.25], [0, 0.125], [0, 0] ]
}
},
"walk" : {
"properties" : {
"image" : "<partImage>:idle"
},
"frameProperties" : {
"immediateSound" : [ "/sfx/tech/mech_step.ogg", "", "", "", "", "/sfx/tech/mech_step.ogg", "", "", "", "" ],
"offset" : [ [0, 0.375], [0, 0.125], [0, 0], [0, 0.125], [0, 0.25], [0, 0.375], [0, 0.125], [0, 0], [0, 0.125], [0, 0.25] ]
}
},
"backWalk" : {
"properties" : {
"image" : "<partImage>:idle"
},
"frameProperties" : {
"immediateSound" : [ "/sfx/tech/mech_step.ogg", "", "", "", "", "/sfx/tech/mech_step.ogg", "", "", "", "" ],
"offset" : [ [0, 0.375], [0, 0.125], [0, 0], [0, 0.125], [0, 0.25], [0, 0.375], [0, 0.125], [0, 0], [0, 0.125], [0, 0.25] ]
}
}
}
}
},
"backLeg" : {
"properties" : {
"centered" : true,
"zLevel" : -2,
"anchorPart" : "body"
},
"partStates" : {
"movement" : {
"idle" : {
"properties" : {
"image" : "<partImage>:idle",
"offset" : [-3.0, 0]
}
},
"jump" : {
"properties" : {
"image" : "<partImage>:jump.<frame>"
},
"frameProperties" : {
"offset" : [ [-3.0, -0.5], [-3.0, -0.5], [-3.0, -0.375], [-3.0, -0.375] ]
}
},
"fall" : {
"properties" : {
"image" : "<partImage>:fall.<frame>"
},
"frameProperties" : {
"offset" : [ [-3.0, -0.25], [-3.0, -0.25], [-3.0, -0.125], [-3.0, 0] ]
}
},
"walk" : {
"properties" : {
"image" : "<partImage>:move.<frame>"
},
"frameProperties" : {
"offset" : [ [-3.0, -0.375], [-3.0, -0.125], [-3.0, 0], [-3.0, -0.125], [-3.0, -0.25], [-3.0, -0.375], [-3.0, -0.125], [-3.0, 0], [-3.0, -0.125], [-3.0, -0.25] ]
}
},
"backWalk" : {
"properties" : {
"image" : "<partImage>:bmove.<frame>"
},
"frameProperties" : {
"offset" : [ [-3.0, -0.375], [-3.0, -0.125], [-3.0, 0], [-3.0, -0.125], [-3.0, -0.25], [-3.0, -0.375], [-3.0, -0.125], [-3.0, 0], [-3.0, -0.125], [-3.0, -0.25] ]
}
}
}
}
},
"backLeg2" : {
"properties" : {
"centered" : true,
"zLevel" : -2,
"anchorPart" : "body"
},
"partStates" : {
"movement" : {
"idle" : {
"properties" : {
"image" : "<partImage>:idle",
"offset" : [4.0, 0]
}
},
"jump" : {
"properties" : {
"image" : "<partImage>:jump.<frame>"
},
"frameProperties" : {
"offset" : [ [4.0, -0.5], [4.0, -0.5], [4.0, -0.375], [4.0, -0.375] ]
}
},
"fall" : {
"properties" : {
"image" : "<partImage>:fall.<frame>"
},
"frameProperties" : {
"offset" : [ [4.0, -0.25], [4.0, -0.25], [4.0, -0.125], [4.0, 0] ]
}
},
"walk" : {
"properties" : {
"image" : "<partImage>:move.<frame>"
},
"frameProperties" : {
"offset" : [ [4.0, -0.375], [4.0, -0.125], [4.0, 0], [4.0, -0.125], [4.0, -0.25], [4.0, -0.375], [4.0, -0.125], [4.0, 0], [4.0, -0.125], [4.0, -0.25] ]
}
},
"backWalk" : {
"properties" : {
"image" : "<partImage>:bmove.<frame>"
},
"frameProperties" : {
"offset" : [ [4.0, -0.375], [4.0, -0.125], [4.0, 0], [4.0, -0.125], [4.0, -0.25], [4.0, -0.375], [4.0, -0.125], [4.0, 0], [4.0, -0.125], [4.0, -0.25] ]
}
}
}
}
},
"background" : {
"properties" : {
"centered" : true,
"zLevel" : -1,
"anchorPart" : "body"
},
"partStates" : {
"movement" : {
"idle" : {
"properties" : {
"image" : "<partImage>:idle"
}
},
"jump" : {
"properties" : {
"image" : "<partImage>:idle"
}
},
"fall" : {
"properties" : {
"image" : "<partImage>:idle"
}
},
"walk" : {
"properties" : {
"image" : "<partImage>:idle"
}
},
"backWalk" : {
"properties" : {
"image" : "<partImage>:idle"
}
}
}
}
},
"frontLeg" : {
"properties" : {
"centered" : true,
"zLevel" : 5,
"anchorPart" : "body"
},
"partStates" : {
"movement" : {
"idle" : {
"properties" : {
"image" : "<partImage>:idle",
"offset" : [-3.0, 0]
}
},
"jump" : {
"properties" : {
"image" : "<partImage>:jump.<frame>"
},
"frameProperties" : {
"offset" : [ [-3.0, -0.5], [-3.0, -0.5], [-3.0, -0.375], [-3.0, -0.375] ]
}
},
"fall" : {
"properties" : {
"image" : "<partImage>:fall.<frame>"
},
"frameProperties" : {
"offset" : [ [-3.0, -0.25], [-3.0, -0.25], [-3.0, -0.125], [-3.0, 0] ]
}
},
"walk" : {
"properties" : {
"image" : "<partImage>:move.<frame>"
},
"frameProperties" : {
"offset" : [ [-3.0, -0.375], [-3.0, -0.125], [-3.0, 0], [-3.0, -0.125], [-3.0, -0.25], [-3.0, -0.375], [-3.0, -0.125], [-3.0, 0], [-3.0, -0.125], [-3.0, -0.25] ]
}
},
"backWalk" : {
"properties" : {
"image" : "<partImage>:bmove.<frame>"
},
"frameProperties" : {
"offset" : [ [-3.0, -0.375], [-3.0, -0.125], [-3.0, 0], [-3.0, -0.125], [-3.0, -0.25], [-3.0, -0.375], [-3.0, -0.125], [-3.0, 0], [-3.0, -0.125], [-3.0, -0.25] ]
}
}
}
}
},
"frontLeg2" : {
"properties" : {
"centered" : true,
"zLevel" : 5,
"anchorPart" : "body"
},
"partStates" : {
"movement" : {
"idle" : {
"properties" : {
"image" : "<partImage>:idle",
"offset" : [4.0, 0]
}
},
"jump" : {
"properties" : {
"image" : "<partImage>:jump.<frame>"
},
"frameProperties" : {
"offset" : [ [4.0, -0.5], [4.0, -0.5], [4.0, -0.375], [4.0, -0.375] ]
}
},
"fall" : {
"properties" : {
"image" : "<partImage>:fall.<frame>"
},
"frameProperties" : {
"offset" : [ [4.0, -0.25], [4.0, -0.25], [4.0, -0.125], [4.0, 0] ]
}
},
"walk" : {
"properties" : {
"image" : "<partImage>:move.<frame>"
},
"frameProperties" : {
"offset" : [ [4.0, -0.375], [4.0, -0.125], [4.0, 0], [4.0, -0.125], [4.0, -0.25], [4.0, -0.375], [4.0, -0.125], [4.0, 0], [4.0, -0.125], [4.0, -0.25] ]
}
},
"backWalk" : {
"properties" : {
"image" : "<partImage>:bmove.<frame>"
},
"frameProperties" : {
"offset" : [ [4.0, -0.375], [4.0, -0.125], [4.0, 0], [4.0, -0.125], [4.0, -0.25], [4.0, -0.375], [4.0, -0.125], [4.0, 0], [4.0, -0.125], [4.0, -0.25] ]
}
}
}
}
}
}
},
"rotationGroups" : {
"guns" : {
"angularVelocity" : 10.0
}
}
}

View file

@ -0,0 +1,87 @@
require "/scripts/vec2.lua"
require "/scripts/util.lua"
function init()
self.active = false
self.fireTimer = 0
animator.rotateGroup("guns", 0, true)
self.level = config.getParameter("mechLevel", 6)
self.groundFrames = 1
end
function update()
if mcontroller.atWorldLimit() then
vehicle.destroy()
return
end
local mechHorizontalMovement = config.getParameter("mechHorizontalMovement")
local mechJumpVelocity = config.getParameter("mechJumpVelocity")
local offGroundFrames = config.getParameter("offGroundFrames")
local mechCollisionPoly = mcontroller.collisionPoly()
local position = mcontroller.position()
local entityInSeat = vehicle.entityLoungingIn("seat")
if entityInSeat then
vehicle.setDamageTeam(world.entityDamageTeam(entityInSeat))
else
vehicle.setDamageTeam({type = "passive"})
end
local diff = world.distance(vehicle.aimPosition("seat"), mcontroller.position())
local aimAngle = math.atan(diff[2], diff[1])
local facingDirection = (aimAngle > math.pi / 2 or aimAngle < -math.pi / 2) and -1 or 1
if facingDirection < 0 then
animator.setFlipped(true)
else
animator.setFlipped(false)
end
local onGround = mcontroller.onGround()
local movingDirection = 0
if vehicle.controlHeld("seat", "left") and onGround then
mcontroller.setXVelocity(-mechHorizontalMovement)
movingDirection = -1
end
if vehicle.controlHeld("seat", "right") and onGround then
mcontroller.setXVelocity(mechHorizontalMovement)
movingDirection = 1
end
if vehicle.controlHeld("seat", "jump") and onGround then
mcontroller.setXVelocity(mechJumpVelocity[1] * movingDirection)
mcontroller.setYVelocity(mechJumpVelocity[2])
animator.setAnimationState("movement", "jump")
self.groundFrames = 0
end
if onGround then
self.groundFrames = offGroundFrames
else
self.groundFrames = self.groundFrames - 1
end
if self.groundFrames <= 0 then
if mcontroller.velocity()[2] > 0 then
animator.setAnimationState("movement", "jump")
else
animator.setAnimationState("movement", "fall")
end
elseif movingDirection ~= 0 then
if facingDirection ~= movingDirection then
animator.setAnimationState("movement", "backWalk")
else
animator.setAnimationState("movement", "walk")
end
elseif onGround then
animator.setAnimationState("movement", "idle")
end
if vehicle.controlHeld("seat", "primaryFire") then
-- TODO: party harder
end
end

View file

@ -0,0 +1,61 @@
{
"name" : "partymech",
"boundBox" : [-5, -5, 5, 5],
"slaveControlTimeout" : 2.0,
"slaveControlHeartbeat" : 1.0,
"canBeHit" : false,
"script" : "/vehicles/partymech/partymech.lua",
"animation" : "/vehicles/partymech/partymech.animation",
"animationPartTags" : {
"backLeg" : {
"partImage" : "/vehicles/partymech/partymechbleg.png"
},
"backLeg2" : {
"partImage" : "/vehicles/partymech/partymechbleg.png"
},
"background" : {
"partImage" : "/vehicles/partymech/partymechbackground.png"
},
"body" : {
"partImage" : "/vehicles/partymech/partymechbody.png"
},
"frontLeg" : {
"partImage" : "/vehicles/partymech/partymechfleg.png"
},
"frontLeg2" : {
"partImage" : "/vehicles/partymech/partymechfleg.png"
}
},
"movementSettings" : {
"collisionPoly" : [ [-7.5, -2.0], [-6, -4.5], [6, -4.5], [7.5, -2.0], [7.5, 2], [6, 3], [-6, 3], [-7.5, 2] ],
"mass" : 5,
"airFriction" : 0.5,
"groundFriction" : 40.0,
"ignorePlatformCollision" : true
},
"loungePositions" : {
"seat" : {
"part" : "body",
"partAnchor" : "sitPosition",
"orientation" : "sit"
}
},
"physicsCollisions" : {
"platform" : {
"collision" : [ [-6, 2.0], [6, 2.0], [6, 2.5], [-6, 2.5] ],
"collisionKind" : "platform",
"attachToPart" : "body"
}
},
"mechHorizontalMovement" : 8,
"mechJumpVelocity" : [10, 30],
"offGroundFrames" : 8,
"mechLevel" : 6
}

View file

@ -0,0 +1,13 @@
{
"frameGrid" : {
"size" : [184, 72],
"dimensions" : [5, 2],
"names" : [
[ "idle", null, null ],
[ null, null, null ]
]
},
"aliases" : { }
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -0,0 +1,25 @@
{
"frameGrid" : {
"size" : [92, 72],
"dimensions" : [11, 2],
"names" : [
[ null, "idle", null, "jump.1", "jump.2", "jump.3", "jump.4", "fall.1", "fall.2", "fall.3", "fall.4" ],
[ null, "move.1", "move.2", "move.3", "move.4", "move.5", "move.6", "move.7", "move.8", "move.9", "move.10" ]
]
},
"aliases" : {
"bmove.10" : "move.1",
"bmove.9" : "move.2",
"bmove.8" : "move.3",
"bmove.7" : "move.4",
"bmove.6" : "move.5",
"bmove.5" : "move.6",
"bmove.4" : "move.7",
"bmove.3" : "move.8",
"bmove.2" : "move.9",
"bmove.1" : "move.10"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

View file

@ -0,0 +1,13 @@
{
"frameGrid" : {
"size" : [184, 72],
"dimensions" : [5, 2],
"names" : [
[ "idle", null, null ],
[ null, null, null ]
]
},
"aliases" : { }
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

@ -0,0 +1,25 @@
{
"frameGrid" : {
"size" : [92, 72],
"dimensions" : [11, 2],
"names" : [
[ null, "idle", null, "jump.1", "jump.2", "jump.3", "jump.4", "fall.1", "fall.2", "fall.3", "fall.4" ],
[ null, "move.1", "move.2", "move.3", "move.4", "move.5", "move.6", "move.7", "move.8", "move.9", "move.10" ]
]
},
"aliases" : {
"bmove.10" : "move.1",
"bmove.9" : "move.2",
"bmove.8" : "move.3",
"bmove.7" : "move.4",
"bmove.6" : "move.5",
"bmove.5" : "move.6",
"bmove.4" : "move.7",
"bmove.3" : "move.8",
"bmove.2" : "move.9",
"bmove.1" : "move.10"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View file

@ -0,0 +1,11 @@
{
"frameGrid" : {
"size" : [132, 75],
"dimensions" : [2, 2],
"names" : [
[ "hull.undamaged", "hull.scratched"],
[ "hull.dented", "hull.wrecked" ]
]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

View file

@ -0,0 +1,497 @@
{
"globalTagDefaults" : {
"colour" : "yellow"
},
"animatedParts" : {
"stateTypes" : {
"base" : {
"default" : "idle",
"states" : {
"warpInPart1" : {
"frames" : 4,
"cycle" : 0.33,
"mode" : "transition",
"transition" : "warpInPart2"
},
"warpInPart2" : {
"frames" : 4,
"cycle" : 0.33,
"mode" : "transition",
"transition" : "idle"
},
"idle" : {},
"warpOutPart1" : {
"frames" : 4,
"cycle" : 0.33,
"mode" : "transition",
"transition" : "warpOutPart2"
},
"warpOutPart2" : {
"frames" : 4,
"cycle" : 0.33,
"mode" : "transition",
"transition" : "warpedOut"
},
"warpedOut" : {},
"sinking" : {},
"sunk" : {}
}
},
"headlights" : {
"default" : "off",
"states" : {
"off" : {},
"on" : {}
}
},
"propeller" : {
"priority" : 0,
"default" : "still",
"states" : {
"still" : {
"frames" : 1
},
"turning" : {
"frames" : 3,
"cycle" : 0.2,
"mode" : "loop"
}
}
},
"torpedo" : {
"priority" : 0,
"default" : "hidden",
"states" : {
"hidden" : {
"frames" : 1
},
"loading" : {
"frames" : 4,
"cycle" : 0.2,
"mode" : "transition",
"transition" : "waiting"
},
"waiting" : {
"frames" : 1
},
"launch" : {
"frames" : 2,
"cycle" : 0.2,
"mode" : "transition",
"transition" : "fireone"
},
"fireone" : {
"frames" : 1,
"cycle" : 0.2
},
"unload" : {
"frames" : 2,
"cycle" : 0.2,
"mode" : "transition",
"transition" : "hidden"
}
}
}
},
"parts" : {
"torp" : {
"properties" : {
"zLevel" : 1,
"centered" : true,
"transformationGroups" : ["flip", "rotation"],
"offset" : [4.0, -3.375]
},
"partStates" : {
"torpedo" : {
"hidden" : {},
"loading" : {
"properties" : {
"image" : "/projectiles/torpedo/torpedo.png:0"
},
"frameProperties" : {
"immediateSound" : [ "", "", "", "/sfx/objects/bardoor2_close.ogg"],
"offset" : [ [3, -3.375], [3.25, -3.375], [3.5, -3.375], [3.75, -3.375] ]
}
},
"waiting" : {
"properties" : {
"offset" : [4.0, -3.375],
"image" : "/projectiles/torpedo/torpedo.png:0"
}
},
"launch" : {
"properties" : {
"image" : "/projectiles/torpedo/torpedo.png:0"
},
"frameProperties" : {
"immediateSound" : [ "", "", "", ""],
"offset" : [ [5.0, -3.375], [6.0, -3.375], [7.0, -3.375], [8.0, -3.375] ]
}
},
"fireone" : {
"properties" : {}
},
"unload" : {
"properties" : {
"image" : "/projectiles/torpedo/torpedo.png:0"
},
"frameProperties" : {
"immediateSound" : [ "/sfx/objects/airlock_heavy_close.ogg", ""],
"offset" : [ [3.5, -3.375], [1, -3.375]]
}
}
}
}
},
"seat" : {
"properties" : {
"zLevel" : -1,
"transformationGroups" : ["flip", "rotation"],
"drivingSeatPosition" : [4, -0.5]
}
},
"submarinehull" : {
"properties" : {
"centered" : true,
"zLevel" : 2,
"transformationGroups" : ["flip", "rotation"]
},
"partStates" : {
"base" : {
"warpInPart1" : {
"properties" : {}
},
"warpInPart2" : {
"properties" : {
"image" : "/vehicles/submarine/submarine<colour>.png:hull.<damageState>"
}
},
"idle" : {
"properties" : {
"image" : "/vehicles/submarine/submarine<colour>.png:hull.<damageState>"
}
},
"warpOutPart1" : {
"properties" : {
"image" : "/vehicles/submarine/submarine<colour>.png:hull.<damageState>"
}
},
"warpOutPart2" : {
"properties" : {}
},
"invisible" : {
"properties" : {}
},
"sinking" : {
"properties" : {
"image" : "/vehicles/submarine/submarine<colour>.png:hull.<damageState>"
}
},
"sunk" : {
"properties" : {
"image" : "/vehicles/submarine/submarine<colour>.png:hull.<damageState>"
}
}
}
}
},
"torpedohatch" : {
"properties" : {
"centered" : true,
"zLevel" : 0,
"offset" : [6.125, -3.375],
"transformationGroups" : ["flip", "rotation"]
},
"partStates" : {
"base" : {
"warpInPart1" : {
"properties" : {}
},
"warpInPart2" : {
"properties" : {
"image" : "/vehicles/submarine/torpedohatch<colour>.png:hatch.<damageState>"
}
},
"idle" : {
"properties" : {
"image" : "/vehicles/submarine/torpedohatch<colour>.png:hatch.<damageState>"
}
},
"warpOutPart1" : {
"properties" : {
"image" : "/vehicles/submarine/torpedohatch<colour>.png:hatch.<damageState>"
}
},
"warpOutPart2" : {
"properties" : {}
},
"invisible" : {
"properties" : {}
},
"sinking" : {
"properties" : {
"image" : "/vehicles/submarine/torpedohatch<colour>.png:hatch.<damageState>"
}
},
"sunk" : {
"properties" : {
"image" : "/vehicles/submarine/torpedohatch<colour>.png:hatch.<damageState>"
}
}
}
}
},
"warp" : {
"properties" : {
"centered" : true,
"zLevel" : 4,
"fullbright" : true,
"transformationGroups" : ["flip", "rotation"]
},
"partStates" : {
"base" : {
"warpInPart1" : {
"properties" : {
"image" : "submarinewarp.png:warpInPart1.<frame>"
}
},
"warpInPart2" : {
"properties" : {
"image" : "submarinewarp.png:warpInPart2.<frame>"
}
},
"idle" : {
"properties" : {}
},
"warpOutPart1" : {
"properties" : {
"image" : "submarinewarp.png:warpOutPart1.<frame>"
}
},
"warpOutPart2" : {
"properties" : {
"image" : "submarinewarp.png:warpOutPart2.<frame>"
}
},
"invisible" : {
"properties" : {}
}
}
}
},
"lights" : {
"properties" : {
"centered" : true,
"zLevel" : 3,
"fullbright" : true,
"transformationGroups" : ["flip", "rotation"]
},
"partStates" : {
"headlights" : {
"off" : {
"properties" : {
}
},
"on" : {
"properties" : {
"image" : "/vehicles/submarine/headlight.png",
"offset" : [7.25, -1.5]
}
}
}
}
},
"prop" : {
"properties" : {
"zLevel" : 0,
"centered" : true,
"transformationGroups" : ["flip", "rotation"],
"offset" : [-6.0, -3.0]
},
"partStates" : {
"propeller" : {
"still" : {
"properties" : {
"image" : "/vehicles/submarine/submarineprop.png:prop.1"
}
},
"turning" : {
"properties" : {
"image" : "/vehicles/submarine/submarineprop.png:prop.<frame>"
}
}
}
}
}
}
},
"transformationGroups" : {
"rotation" : {
"interpolated" : true
},
"flip" : {}
},
"particleEmitters" : {
"bowWaveWater" : {
"emissionRate" : 25.0,
"active" : false,
"offsetRegion" : [ 5, -1.5, 5.1, 1.5],
"particles" : [{ "particle" : "splashwater"}]
},
"bowWaveLava" : {
"emissionRate" : 25.0,
"active" : false,
"offsetRegion" : [ 5, -1.5, 5.1, 1.5],
"particles" : [{ "particle" : "fireshard"}]
},
"bowWavePoison" : {
"emissionRate" : 25.0,
"active" : false,
"offsetRegion" : [ 5, -1.5, 5.1, 1.5],
"particles" : [{ "particle" : "splashpoison"}]
},
"splashWater" : {
"emissionRate" : 0,
"active" : false,
"burstCount" : 30,
"offsetRegion" : [ -5, -1.5, 5.0, -1.2],
"particles" : [{ "particle" : "splashwater"}]
},
"splashLava" : {
"emissionRate" : 0,
"active" : false,
"burstCount" : 30,
"offsetRegion" : [ -5, -1.5, 5.1, -1.2],
"particles" : [{ "particle" : "fireshard"}]
},
"splashPoison" : {
"emissionRate" : 0,
"active" : false,
"burstCount" : 30,
"offsetRegion" : [ -5, -1.5, 5.1, -1.2],
"particles" : [{ "particle" : "splashpoison"}]
},
"bubbles" : {
"enabled" : false,
"transformationGroups" : ["flip", "rotation"],
"emissionRate" : 25.0,
"offsetRegion" : [ 3, -1, 6, -0.75],
"particles" : [{ "particle" : "bubbles"}]
}
},
"lights" : {
"headlightBeam" : {
"active" : false,
"transformationGroups" : ["flip", "rotation"],
"position" : [7.0, -1.5],
"color" : [250, 250, 200],
"pointLight" : true,
"pointAngle" : 0,
"pointBeam" : 5
}
},
"sounds" : {
"collisionNotification" : [ "/sfx/tech/hoverbike_bump1.ogg",
"/sfx/tech/hoverbike_bump2.ogg",
"/sfx/tech/hoverbike_bump3.ogg" ],
"collisionDamage" : ["/sfx/melee/bite_robotic1.ogg"],
"changeDamageState" : [ "/sfx/gun/grenadeblast_small_fire1.ogg",
"/sfx/gun/grenadeblast_small_fire2.ogg",
"/sfx/gun/grenadeblast_small_fire3.ogg" ],
"hornLoop" : ["/sfx/tech/honk.ogg"]
}
}

View file

@ -0,0 +1,11 @@
{
"frameGrid" : {
"size" : [200, 114],
"dimensions" : [2, 2],
"names" : [
[ "hull.undamaged", "hull.scratched"],
[ "hull.dented", "hull.wrecked" ]
]
}
}

View file

@ -0,0 +1,555 @@
require "/scripts/vec2.lua"
require "/scripts/util.lua"
function init()
self.rockingTimer = 0
self.facingDirection = 1
self.angle = 0
animator.setParticleEmitterActive("bubbles", false)
self.damageEmoteTimer = 0
self.spawnPosition = mcontroller.position()
self.maxHealth =1
self.waterFactor=0 --how much water are we in right now
self.rockingInterval = config.getParameter("rockingInterval")
self.maxHealth = config.getParameter("maxHealth")
self.protection = config.getParameter("protection")
self.damageStateNames = config.getParameter("damageStateNames")
self.damageStateDriverEmotes = config.getParameter("damageStateDriverEmotes")
self.materialKind = config.getParameter("materialKind")
self.windLevelOffset = config.getParameter("windLevelOffset")
self.rockingWindAngleMultiplier = config.getParameter("rockingWindAngleMultiplier")
self.maxRockingAngle = config.getParameter("maxRockingAngle")
self.angleApproachFactor = config.getParameter("angleApproachFactor")
self.speedRotationMultiplier = config.getParameter("speedRotationMultiplier")
self.targetMoveSpeed = config.getParameter("targetMoveSpeed")
self.moveControlForce = config.getParameter("moveControlForce")
mcontroller.resetParameters(config.getParameter("movementSettings"))
self.minWaterFactorToFloat=config.getParameter("minWaterFactorToFloat")
self.sinkingBuoyancy=config.getParameter("sinkingBuoyancy")
self.sinkingFriction=config.getParameter("sinkingFriction")
self.bowWaveParticleNames=config.getParameter("bowWaveParticles")
self.bowWaveMaxEmissionRate=config.getParameter("bowWaveMaxEmissionRate")
self.splashParticleNames=config.getParameter("splashParticles")
self.splashEpsilon=config.getParameter("splashEpsilon")
self.maxGroundSearchDistance = config.getParameter("maxGroundSearchDistance")
self.bubbleThreshold = config.getParameter("bubbleParticleHealthThreshold") or 0.5
self.maxBubbleRate = config.getParameter("bubbleRateAtZeroHealth") or 100
self.depthControlSpeed= config.getParameter("depthControlSpeed")
self.depthPfactor= config.getParameter("depthPfactor")
self.depthIfactor= config.getParameter("depthIfactor")
self.depthDfactor= config.getParameter("depthDfactor")
self.integralValue=0
self.prevHeightDiff=0
self.desiredHeight=self.spawnPosition[2]
self.timeBetweenTorps= config.getParameter("depthDfactor")
self.torpFireTimer=0
self.timeBetweenTorps = 3
local bounds = mcontroller.localBoundBox()
self.frontGroundTestPoint={bounds[1],bounds[2]}
self.backGroundTestPoint={bounds[3],bounds[2]}
--setup the store functionality
self.ownerKey = config.getParameter("ownerKey")
vehicle.setPersistent(self.ownerKey)
message.setHandler("store", function(_, _, ownerKey)
local animState=animator.animationState("base")
if (animState=="idle" or animState=="sinking" or animState=="sunk") then
if (self.ownerKey and self.ownerKey == ownerKey) then
self.spawnPosition = mcontroller.position()
animator.setAnimationState("base", "warpOutPart1")
local localStorable = (self.driver ==nil)
return {storable = true, healthFactor = storage.health / self.maxHealth}
end
end
end)
--assume maxhealth
if (storage.health) then
animator.setAnimationState("base", "idle")
else
local startHealthFactor = config.getParameter("startHealthFactor")
if (startHealthFactor == nil) then
storage.health = self.maxHealth
else
storage.health = math.min(startHealthFactor * self.maxHealth, self.maxHealth)
end
animator.setAnimationState("base", "warpInPart1")
end
--set up any damage efects we have...
updateDamageEffects(0, true)
self.maxBuoyancy = mcontroller.parameters().liquidBuoyancy
self.headlightsOn=false
headlightCanToggle=true
end
function update()
if mcontroller.atWorldLimit() then
vehicle.destroy()
return
end
local sinkAngle=-math.pi*0.45
local animState=animator.animationState("base")
local waterFactor = mcontroller.liquidPercentage();
if (animState=="warpedOut") then
vehicle.destroy()
elseif (animState=="warpInPart1" or animState=="warpOutPart2") then
world.debugText("warping",mcontroller.position(),"red")
--lock it solid whilst spawning/despawning
mcontroller.setPosition(self.spawnPosition)
mcontroller.setVelocity({0,0})
elseif (animState=="sunk") then
-- world.debugText("sunk",mcontroller.position(),"red")
-- not much here.
local targetAngle=calcGroundCollisionAngle(self.maxGroundSearchDistance)
self.angle = self.angle + (targetAngle - self.angle) * self.angleApproachFactor
elseif (animState=="sinking") then
self.angle=updateSinking(waterFactor, self.angle,sinkAngle)
elseif (animState=="idle") then
world.debugText("idle",mcontroller.position(),"green")
local healthFactor = storage.health / self.maxHealth
local waterSurface = self.maxGroundSearchDistance
self.waterBounds=mcontroller.localBoundBox()
--work out water surface
if (waterFactor>0) then
waterSurface=(self.waterBounds[4] * waterFactor) + (self.waterBounds[2] * (1.0-waterFactor))
end
self.waterBounds[2] = waterSurface +0.25
self.waterBounds[4] = waterSurface +0.5
-- self.desiredHeight=math.min(self.desiredHeight,self.waterBounds[4])
local facing
local moving
moving,facing = updateDriving()
--Rocking in the wind, and rotating up when moving
local floating = updateFloating(waterFactor, moving,facing)
updateMovingEffects(floating,moving)
updatePassengers(healthFactor)
if storage.health<=0 then
animator.setAnimationState("base", "sinking")
end
self.facingDirection = facing
self.waterFactor=waterFactor --how deep are we in the water right now ?
end
updateTorpedoFiring(self.facingDirection, waterFactor)
--take care of rotating and flipping
animator.resetTransformationGroup("flip")
animator.resetTransformationGroup("rotation")
if self.facingDirection < 0 then
animator.scaleTransformationGroup("flip", {-1, 1})
end
animator.rotateTransformationGroup("rotation", self.angle)
mcontroller.setRotation(self.angle)
end
function updateDriving()
local moving = false
local facing = self.facingDirection
local driverThisFrame = vehicle.entityLoungingIn("drivingSeat")
if (driverThisFrame ~= nil) then
vehicle.setDamageTeam(world.entityDamageTeam(driverThisFrame))
if vehicle.controlHeld("drivingSeat", "left") then
mcontroller.approachXVelocity(-self.targetMoveSpeed, self.moveControlForce)
moving = true
facing = -1
end
if vehicle.controlHeld("drivingSeat", "right") then
mcontroller.approachXVelocity(self.targetMoveSpeed, self.moveControlForce)
moving = true
facing = 1
end
if vehicle.controlHeld("drivingSeat", "up") then
self.desiredHeight=self.desiredHeight+self.depthControlSpeed
elseif vehicle.controlHeld("drivingSeat", "down") then
self.desiredHeight=self.desiredHeight-self.depthControlSpeed
end
local currentPos=mcontroller.position()
self.desiredHeight=math.max(math.min(self.desiredHeight, currentPos[2]+10.0),currentPos[2]-10.0)
else
vehicle.setDamageTeam({type = "passive"})
end
if (vehicle.controlHeld("drivingSeat", "AltFire")) then
if (self.headlightCanToggle) then
switchHeadLights(not self.headlightsOn)
self.headlightCanToggle = false
end
else
self.headlightCanToggle = true;
end
return moving,facing
end
function updateSinking(waterFactor, currentAngle, sinkAngle)
if (mcontroller.onGround()) then
--not floating any more. Must have touched bottom.
animator.setAnimationState("base", "sunk")
animator.setParticleEmitterActive("bubbles", false)
vehicle.setLoungeEnabled("drivingSeat",false)
local targetAngle=calcGroundCollisionAngle(self.maxGroundSearchDistance)
currentAngle = currentAngle + (targetAngle - currentAngle) * self.angleApproachFactor
else
if (waterFactor> self.minWaterFactorToFloat) then
if (currentAngle~=sinkAngle) then
currentAngle = currentAngle + (sinkAngle - currentAngle) * self.angleApproachFactor
local lerpFactor=math.cos(currentAngle)
local finalBuoyancy=(self.maxBuoyancy * lerpFactor) + (self.sinkingBuoyancy* (1.0-lerpFactor))
mcontroller.applyParameters({ liquidBuoyancy=finalBuoyancy,
liquidFriction=self.sinkingFriction,
frictionEnabled=true})
world.debugText(string.format("sinking b=%s", finalBuoyancy),mcontroller.position(),"red")
end
animator.setParticleEmitterActive("bubbles", true)
end
end
return currentAngle
end
function updateFloating(waterFactor, moving, facing)
local floating = waterFactor > self.minWaterFactorToFloat
local targetAngle=0
if (floating) then
self.rockingTimer = self.rockingTimer + script.updateDt()
if self.rockingTimer > self.rockingInterval then
self.rockingTImer = self.rockingTimer - self.rockingInterval
end
local speedAngle = mcontroller.xVelocity() * self.speedRotationMultiplier
local windPosition = vec2.add(mcontroller.position(), self.windLevelOffset)
local windLevel = world.windLevel(windPosition)
local windMaxAngle = self.rockingWindAngleMultiplier * windLevel
local windAngle= windMaxAngle * (math.sin(self.rockingTimer / self.rockingInterval * (math.pi * 2)))
targetAngle = windMaxAngle + speedAngle
else
targetAngle=calcGroundCollisionAngle(self.waterBounds[2]) --pass in the water surtface
end
self.angle = self.angle + (targetAngle - self.angle) * self.angleApproachFactor
----------------------------------
local currentPos=mcontroller.position()
local heightDiff=self.desiredHeight-currentPos[2]
local P=heightDiff * self.depthPfactor
self.integralValue=math.max(math.min(self.integralValue+heightDiff,self.depthIfactor*100),self.depthIfactor*-100)
local I=self.integralValue * self.depthIfactor
local D=(heightDiff-self.prevHeightDiff) * self.depthDfactor
self.prevHeightDiff=heightDiff
local finalBuoyancy=math.max(math.min(P+D+I,self.maxBuoyancy),0)
mcontroller.applyParameters({liquidBuoyancy=finalBuoyancy})
----------------------------------
--surface spashes
if math.abs(waterFactor -self.waterFactor) > self.splashEpsilon then
local floatingLiquid=mcontroller.liquidId()
if (floatingLiquid>0) then
if (floatingLiquid>#self.bowWaveParticleNames) then
floatingLiquid=1 --off the end, go to "water" as a default
end
local splashEmitter=self.splashParticleNames[floatingLiquid]
animator.setParticleEmitterOffsetRegion(splashEmitter,self.waterBounds)
animator.burstParticleEmitter(splashEmitter)
end
end
return floating
end
function updateMovingEffects(floating,moving)
if moving then
animator.setAnimationState("propeller", "turning")
--in water but not underwater
if floating and self.waterFactor<1.0 then
local floatingLiquid=mcontroller.liquidId()
if (floatingLiquid>0) then
if (floatingLiquid>#self.bowWaveParticleNames) then
floatingLiquid=1 --off the end, go to "water" as a default
end
local bowWaveEmitter=self.bowWaveParticleNames[floatingLiquid]
local rateFactor=math.abs(mcontroller.xVelocity())/self.targetMoveSpeed
rateFactor=rateFactor * self.bowWaveMaxEmissionRate
animator.setParticleEmitterEmissionRate(bowWaveEmitter, rateFactor)
local bowWaveBounds=self.waterBounds
animator.setParticleEmitterOffsetRegion(bowWaveEmitter,bowWaveBounds)
animator.setParticleEmitterActive(bowWaveEmitter, true)
end
end
else
animator.setAnimationState("propeller", "still")
for i, emitter in ipairs(self.bowWaveParticleNames) do
animator.setParticleEmitterActive(emitter, false)
end
end
end
--make the driver emote according to the damage state of the vehicle
function updatePassengers(healthFactor)
if healthFactor >= 0 then
--if we have a scared face on becasue of taking damage
if self.damageEmoteTimer > 0 then
self.damageEmoteTimer = self.damageEmoteTimer - script.updateDt()
if (self.damageEmoteTimer < 0) then
maxDamageState = #self.damageStateDriverEmotes
damageStateIndex = maxDamageState
damageStateIndex = (maxDamageState - math.ceil(healthFactor * maxDamageState))+1
vehicle.setLoungeEmote("drivingSeat",self.damageStateDriverEmotes[damageStateIndex])
end
end
end
end
function applyDamage(damageRequest)
local damage = 0
if damageRequest.damageType == "Damage" then
damage = damage + root.evalFunction2("protection", damageRequest.damage, self.protection)
elseif damageRequest.damageType == "IgnoresDef" then
damage = damage + damageRequest.damage
else
return
end
updateDamageEffects(damage, false)
storage.health = storage.health - damage
return {{
sourceEntityId = damageRequest.sourceEntityId,
targetEntityId = entity.id(),
position = mcontroller.position(),
damageDealt = damageRequest.damage,
healthLost = damage,
hitType = "Hit",
damageSourceKind = damageRequest.damageSourceKind,
targetMaterialKind = self.materialKind,
killed = storage.health <= 0
}}
end
function setDamageEmotes()
local damageTakenEmote=config.getParameter("damageTakenEmote")
self.damageEmoteTimer=config.getParameter("damageEmoteTime")
vehicle.setLoungeEmote("drivingSeat",damageTakenEmote)
end
function updateDamageEffects(damage, initialise)
local maxDamageState = #self.damageStateNames
local healthFactor = (storage.health-damage) / self.maxHealth
local prevhealthFactor = storage.health / self.maxHealth
local prevDamageStateIndex =util.clamp( maxDamageState - math.ceil(prevhealthFactor * maxDamageState)+1, 1, maxDamageState)
self.damageStateIndex =util.clamp( maxDamageState - math.ceil(healthFactor * maxDamageState)+1, 1, maxDamageState)
if ((self.damageStateIndex > prevDamageStateIndex) or initialise==true) then
animator.setGlobalTag("damageState", self.damageStateNames[self.damageStateIndex])
--change the floatation
local settingsNameList=config.getParameter("damageMovementSettingNames")
local settingsObject = config.getParameter(settingsNameList[self.damageStateIndex])
self.maxBuoyancy = mcontroller.parameters().liquidBuoyancy
mcontroller.applyParameters(settingsObject)
end
if (self.damageStateIndex > prevDamageStateIndex) then
--people in the vehicle change thier faces when the vehicle is damaged.
setDamageEmotes(healthFactor)
--burstparticles.
animator.burstParticleEmitter("damageShards")
animator.playSound("changeDamageState")
end
--continual particles resulting from damage
if healthFactor < 1.0 then
if (self.bubbleThreshold > 0 and healthFactor < self.bubbleThreshold) then
local bubbleFactor = 1.0 - (healthFactor / self.bubbleThreshold)
animator.setParticleEmitterActive("bubbles", true)
animator.setParticleEmitterEmissionRate("bubbles", bubbleFactor * self.maxBubbleRate)
end
else
animator.setParticleEmitterActive("bubbles", false)
end
end
function calcGroundCollisionAngle(waterSurface)
local frontDistance = math.min(distanceToGround(self.frontGroundTestPoint),waterSurface)
local backDistance = math.min(distanceToGround(self.backGroundTestPoint),waterSurface)
if frontDistance == self.maxGroundSearchDistance and backDistance == self.maxGroundSearchDistance then
return 0
else
local groundAngle=-math.atan(backDistance - frontDistance)
return groundAngle
end
end
function distanceToGround(point)
-- to worldspace
point = vec2.rotate(point, self.angle)
point = vec2.add(point, mcontroller.position())
local endPoint = vec2.add(point, {0, -self.maxGroundSearchDistance})
local intPoint = world.lineCollision(point, endPoint)
if intPoint then
world.debugPoint(intPoint, {255, 255, 0, 255})
return point[2] - intPoint[2]
else
world.debugPoint(endPoint, {255, 0, 0, 255})
return self.maxGroundSearchDistance
end
end
function switchHeadLights(activate)
self.headlightsOn=activate
if (self.headlightsOn) then
animator.setAnimationState("headlights", "on")
else
animator.setAnimationState("headlights", "off")
end
animator.setLightActive("headlightBeam", activate)
end
--only load torpedo when sufficiently underwater.
--display torpedo loading
--fire torpedo when requested.
--reset reload timer
function updateTorpedoFiring(facing, waterFactor)
local hullState=animator.animationState("base")
local torpState=animator.animationState("torpedo")
local driver = vehicle.entityLoungingIn("drivingSeat")
if (driver~=nil and hullState=="idle" and waterFactor>0.5) then
if (self.torpFireTimer>0) then
self.torpFireTimer=self.torpFireTimer-script.updateDt()
animator.setAnimationState("torpedo", "hidden")
else
if (torpState=="hidden" and self.torpFireTimer<=0) then
animator.setAnimationState("torpedo", "loading")
elseif (torpState=="fireone") then
local launchPos = vec2.add(mcontroller.position(), {8*facing,-3.375})
local launchDir = {facing,0}
world.spawnProjectile( "torpedo", launchPos, entity.id(),launchDir)
self.torpFireTimer=self.timeBetweenTorps
elseif (torpState=="waiting" and vehicle.controlHeld("drivingSeat", "PrimaryFire")) then
animator.setAnimationState("torpedo", "launch")
end
end
else
if (torpState~="hidden" and torpState~="unload" ) then
animator.setAnimationState("torpedo", "unload")
end
end
end

View file

@ -0,0 +1,135 @@
{
"name" : "submarineyellow",
"script" : "submarine.lua",
"boundBox" : [-8, -5, 8, 5],
"slaveControlTimeout" : 2.0,
"slaveControlHeartbeat" : 1.0,
"canBeHit" : true,
"animation" : "submarine.animation",
"animationCustom" : {
"globalTagDefaults" : {
"colour" : "yellow"
},
"particleEmitters" : {
"damageShards" : {
"transformationGroups" : ["rotation"],
"emissionRate" : 0.0,
"burstCount" : 8,
"offsetRegion" : [-4, -2, 4, 1],
"particles" : [{ "particle" : "hoverbikekhakishard"}]
}
}
},
"movementSettings" : {
"collisionPoly" : [[-2.5, -5], [-8.0, -3], [-8, 0], [0.0, 5.0], [8.0, 0], [8.0, -3], [2.5,-5]],
"mass" : 4,
"airFriction" : 0.5,
"groundFriction" : 1000,
"liquidBuoyancy" : 4,
"ignorePlatformCollision" : true
},
"loungePositions" : {
"drivingSeat" : {
"part" : "seat",
"partAnchor" : "drivingSeatPosition",
"emote" : "happy",
"statusEffects" : ["maxprotection","breathprotectionvehicle"],
"orientation" : "sit"
}
},
"minWaterFactorToFloat" : 0.1,
"targetMoveSpeed" : 30,
"moveControlForce" : 100,
"windLevelOffset" : [0, 4],
"rockingWindAngleMultiplier": 0.000,
"rockingInterval" : 3,
"maxRockingAngle": 0.02,
"speedRotationMultiplier": 0.001,
"angleApproachFactor" : 0.015,
"maxGroundSearchDistance" : 5,
//health and damage
"maxHealth" : 100,
"protection" : 50,
"materialKind" : "robotic",
"undamagedSettings" : {
"frictionEnabled" : true,
"liquidFriction" : 20,
"liquidBuoyancy" : 3
},
"slowSettings" : {
"frictionEnabled" : true,
"liquidFriction" : 30,
"liquidBuoyancy" : 2.5
},
"wreckedSettings" : {
"frictionEnabled" : true,
"liquidFriction" : 40,
"liquidBuoyancy" : 2
},
"sinkingBuoyancy" : 0.1,
"sinkingFriction" : 50,
//Damage visual effects
"bubbleParticleHealthThreshold" : 0.5,
"bubbleRateAtZeroHealth" : 5,
//controls for the depth controls responsiveness.
"depthControlSpeed" : 0.1,
"depthPfactor" : 0.5,
"depthIfactor" : 0.001,
"depthDfactor" : -0.001,
"damageStateNames" : ["undamaged","scratched","dented","wrecked"],
"damageMovementSettingNames" : ["undamagedSettings","undamagedSettings","slowSettings","wreckedSettings"],
"damageStateDriverEmotes" : ["happy","happy","sad","annoyed"],
"damageTakenEmote" : "oooh",
"damageEmoteTime" : 2.0,
//Platform to stand on
"physicsCollisions" : {
"deck" : {
"collision" : [ [-5, -0.5], [7, -0.5], [7, -1], [-5, -1] ],
"collisionKind" : "platform",
"attachToPart" : "seat"
}
},
// particle effects.
"bowWaveParticles" : ["bowWaveWater","bowWaveLava","splashPoison"],
"bowWaveMaxEmissionRate" : 200,
"splashParticles" : ["splashWater","splashLava","splashPoison"],
"splashEpsilon" : 0.025
}

View file

@ -0,0 +1,10 @@
{
"frameGrid" : {
"size" : [8, 12],
"dimensions" : [4, 2],
"names" : [
[ "prop.1", "prop.2", "prop.3", "prop.4"]
]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 761 B

View file

@ -0,0 +1,37 @@
{
"frameGrid" : {
"size" : [132, 75],
"dimensions" : [4, 2],
"names" : [
[ "warp.1", "warp.2", "warp.3", "warp.4"],
[ "warp.5", "warp.6", "warp.7", "warp.8"]
]
},
"aliases" : {
"warpInPart1.1" : "warp.1",
"warpInPart1.2" : "warp.2",
"warpInPart1.3" : "warp.3",
"warpInPart1.4" : "warp.4",
"warpInPart2.1" : "warp.5",
"warpInPart2.2" : "warp.6",
"warpInPart2.3" : "warp.7",
"warpInPart2.4" : "warp.8",
"warpOutPart1.1" : "warp.8",
"warpOutPart1.2" : "warp.7",
"warpOutPart1.3" : "warp.6",
"warpOutPart1.4" : "warp.5",
"warpOutPart2.1" : "warp.4",
"warpOutPart2.2" : "warp.3",
"warpOutPart2.3" : "warp.2",
"warpOutPart2.4" : "warp.1"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

View file

@ -0,0 +1,10 @@
{
"frameGrid" : {
"size" : [16, 15],
"dimensions" : [4, 1],
"names" : [
[ "hatch.undamaged", "hatch.scratched", "hatch.dented", "hatch.wrecked" ]
]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 847 B