Spider/Scorpion

Got resources you'd like to share? Want to request some help with scripting or graphic creation? Then this is the place to be.
User avatar
b_o
Posts: 328
Joined: Sun Jan 01, 2012 12:07 pm

Spider/Scorpion

Postby b_o » Wed Sep 04, 2013 3:18 pm

So in making warlocks , I realized we needed spiders, and these seem to work well enough without resizing them, and if you want larger ones later, these would make nice baby-giant spiders:
spider32.png
spider
spider32.png (9.73 KiB) Viewed 1825 times
spider.png
icon
spider.png (1.49 KiB) Viewed 1825 times
anim.lua:

Code: Select all

-- spider
local SpiderStill = UnitStill
local SpiderMove = {"unbreakable begin",
	"frame 0", "move 3", "wait 2", 
	"frame 0", "move 3", "wait 2",
    "frame 5", "move 4", "wait 2", 
	"frame 5", "move 3", "wait 1",
    "frame 10", "move 3", "wait 2", 
	"frame 10", "move 3", "wait 1",
    "frame 15", "move 3", "wait 2", 
	"frame 15", "move 3", "wait 1",
    "frame 20", "move 4", "wait 2", 
	"frame 20", "move 3", "unbreakable end", "wait 1",}
local SpiderDeath = {"unbreakable begin", 
	"frame 45", "wait 1", 
	"frame 50", "wait 50", 
	"frame 55", "wait 50", 
	"frame 60", "wait 50",
    "frame 65", "unbreakable end", "wait 1",}

DefineAnimations("animations-spider", {
  Still = SpiderStill,
  Move = SpiderMove,
  Attack = {"unbreakable begin", 
	"frame 25", "wait 3", 
	"frame 30", "wait 3", 
	"frame 35", "wait 3",
    "frame 40", "attack", "sound grunt-attack", "wait 5", 
	"frame 25", "wait 10",
    "frame 25", "unbreakable end", "wait 1",},
  Death = SpiderDeath,
})
unit.lua

Code: Select all

DefineUnitType("unit-spider", { Name = "Spider",
  Image = {"file", "orc/units/spider32.png", "size", {32, 32}},
  Animations = "animations-spider", Icon = "icon-spider",
  Costs = {"time", 5, "gold", 0},
  Speed = 15,
  HitPoints = 15,
  DrawLevel = 15,
  TileSize = {1, 1}, BoxSize = {31, 31},
  SightRange = 5, ComputerReactionRange = 6, PersonReactionRange = 4,
  Armor = 0, BasicDamage = 3, PiercingDamage = 0, Missile = "missile-none",
  MaxAttackRange = 1,
  Priority = 60,
  Points = 50,
  Demand = 1,
  Type = "land",
  RightMouseAction = "attack",
  CanAttack = true,
  CanTargetLand = true,
  LandUnit = true,
  organic = true,
  SelectableByRectangle = true,
   Sounds = {
    "selected", "skeleton-selected",
    "help", "basic orc voices help 1",
    "dead", "basic orc voices dead"} } )
They should be summonable sort of like eye of kilrogg.
Also, I may attempt to make a spiderweb projectile for a special attack which would slow a target.
The scorpion has an additional frame for it's attack, so most of the code would look like the spider code, but the attack animation code in anim.lua for the scorpion would be something like this with the death animation bumped by 5 frames:

Code: Select all

Attack = {"unbreakable begin", 
	"frame 25", "wait 3", 
	"frame 30", "wait 3", 
	"frame 35", "wait 3",
    "frame 40", "attack", "sound grunt-attack", "wait 5", 
	"frame 45", "wait 10",
    "frame 25", "unbreakable end", "wait 1",},
local ScorpionDeath = {"unbreakable begin", 
	"frame 50", "wait 1", 
	"frame 55", "wait 50", 
	"frame 60", "wait 50", 
	"frame 65", "wait 50",
    "frame 70", "unbreakable end", "wait 1",}
scorpion.png
scorpion
scorpion.png (11.53 KiB) Viewed 1823 times
scoricon.png
scorpion icon
scoricon.png (1.42 KiB) Viewed 1814 times
User avatar
Kargath
Posts: 94
Joined: Sun Aug 11, 2013 10:19 pm

Re: Spider/Scorpion

Postby Kargath » Thu Sep 05, 2013 9:04 am

Beautiful! Those icons are made by you?
User avatar
b_o
Posts: 328
Joined: Sun Jan 01, 2012 12:07 pm

Re: Spider/Scorpion

Postby b_o » Thu Sep 05, 2013 1:11 pm

Kargath wrote:Beautiful! Those icons are made by you?
Thanks, I enlarged the wc1 ones with HQX and depixelized them a bit by hand.
User avatar
Kargath
Posts: 94
Joined: Sun Aug 11, 2013 10:19 pm

Re: Spider/Scorpion

Postby Kargath » Fri Sep 06, 2013 3:20 am

I like a lot the spider icon (also the scorpion rocks, but spider is simply wonderful)
User avatar
b_o
Posts: 328
Joined: Sun Jan 01, 2012 12:07 pm

Re: Spider/Scorpion

Postby b_o » Fri Sep 13, 2013 4:47 am

Here are some sounds that can be used for the spider/scorpion:
bugsounds.zip
zip files containing sounds
(350.75 KiB) Downloaded 58 times
User avatar
Andrettin
Posts: 433
Joined: Sun Jun 30, 2013 9:58 pm
Location: Vienna, Austria
Contact:

Re: Spider/Scorpion

Postby Andrettin » Fri Sep 13, 2013 5:09 pm

b_o wrote:Here are some sounds that can be used for the spider/scorpion:
bugsounds.zip
Cool :) Where did you get them from?
User avatar
b_o
Posts: 328
Joined: Sun Jan 01, 2012 12:07 pm

Re: Spider/Scorpion

Postby b_o » Sat Sep 14, 2013 12:18 am

Andrettin wrote:...Where did you get them from?
The death was from wc1, and the rest were generated here: http://www.superflashbros.net/as3sfxr/

Who is online

Users browsing this forum: No registered users and 1 guest