Hammerwatch Forum

Custom mapping and Mods => Resources => Topic started by: Heretic on August 26, 2013, 02:48:38 PM

Title: [Monster] Scorpion - Finished! - New Original Actor
Post by: Heretic on August 26, 2013, 02:48:38 PM
Thanks for all of the help from everyone!

Features:
Idle animations
Death animation - corpse sticks around for a few seconds and then blinks out
Multiple Attacks (claws from north, south, east, west, tail sting from diagonals)


(http://i.imgur.com/qfF8KlW.png)
DropBox Zip Link (https://www.dropbox.com/s/5vqxxx2npivt930/scorpion_1.zip)
Title: Re: [Creature] Scorpion ! Need some help/advice!
Post by: Hipshot on August 26, 2013, 02:59:23 PM
Your problem here is, that you have defined a much larger sprite size than what you need.

You see the idle south angle in the editor and your idle south angle now displays too much.

Instead of showing 54 60, try 20 20.
Title: Re: [Creature] Scorpion ! Need some help/advice!
Post by: Heretic on August 26, 2013, 03:10:57 PM
Ah I misread! I thought the second coordinates was for the bottom right of the frame, but its actually the size of the frame with the first coordinate as 0,0. Makes sense now thanks!
Title: Re: [Creature] Scorpion ! Need some help/advice!
Post by: Heretic on August 26, 2013, 03:47:03 PM
What does it mean when it says texture sizes must be power of 2? It's not letting me import it to the editor, when I try to refresh resources it gives that error.
Title: Re: [Creature] Scorpion ! Need some help/advice!
Post by: Bolmaron on August 26, 2013, 04:25:27 PM
http://en.wikipedia.org/wiki/Power_of_two#The_first_96_powers_of_two

So apparently it will accept 8, 16, 32, but not 20 as texture's dimension?
Title: Re: [Creature] Scorpion ! Need some help/advice!
Post by: Myran on August 26, 2013, 04:31:24 PM
Yeah, so 8, 16, 32, 64, 128, 256, 512, 1024 are the texture dimensions you should stick by. Bigger than that some graphics cards will have problems.
Title: Re: [Creature] Scorpion ! Need some help/advice!
Post by: Juschlan on August 26, 2013, 04:49:02 PM
I get that error too, but if I close it, I can place them as always.
Title: Re: [Creature] Scorpion ! Need some help/advice!
Post by: Heretic on August 26, 2013, 04:50:16 PM
If the texture box is bigger than the creature, will there be collision issues?
Title: Re: [Creature] Scorpion ! Need some help/advice!
Post by: Juschlan on August 26, 2013, 04:54:58 PM
no. Just need to resize the given collision size
Title: Re: [Creature] Scorpion ! Need some help/advice!
Post by: Heretic on August 26, 2013, 05:05:30 PM
I can't get my collision to work right... They are way far away buy can hit me, I have to walk over the texture to be able to hit the collision box behind them.. ?
Title: Re: [Creature] Scorpion ! Need some help/advice!
Post by: Juschlan on August 26, 2013, 05:33:22 PM
your hitbox is to small

Quote
<actor collision="5" behavior="melee">
collision is 5 (I copied this from tick_2_small.xml
Title: Re: [Creature] Scorpion ! Need some help/advice!
Post by: Psyborg on August 26, 2013, 05:38:31 PM
I can't get my collision to work right... They are way far away buy can hit me, I have to walk over the texture to be able to hit the collision box behind them.. ?

Make sure the origin is right in the center of the creature sprite. Then, adjust the collision number to something that just encircles the sprite. You can check this by pressing F1 (Show Physics) in the editor; it will show a circle for the hitbox of your monster. :)
Title: Re: [Creature] Scorpion ! Need some help/advice!
Post by: Heretic on August 26, 2013, 08:09:09 PM
got it thanks! I'm adding a death animation now, and will post it when final!
Title: Re: [Creature] Scorpion ! Almost Finished - Death Animation
Post by: Heretic on August 27, 2013, 01:53:20 AM
Can't get the death animation to stay after it plays :( The best luck I've had is getting the animation to play via the actor's xml, but then either the corpse doesn't show or it shows double - immediately on death and stays after the animation too.

Anyone offer any help on getting it to animate and also keep the last frame?
Title: Re: [Creature] Scorpion ! Almost Finished - Death Animation
Post by: Myran on August 27, 2013, 02:05:01 AM
Hmm, doing a corpse that stays could be bad for performance if you plan on using a lot of scorpions (probably not that bad, but still), but anyway, the way this is done is you make a doodad with the last frame of the death animation and if you want also a physics shape, and then you set the doodad as the corpse of the actor with a line like this in the behavior:
Code: [Select]
<entry name="corpse"><string>actors/tower_flower_1_razed.xml</string></entry>
You can take a look at the towers, spawners or bosses for reference.
Title: Re: [Creature] Scorpion ! Almost Finished - Death Animation
Post by: Heretic on August 27, 2013, 02:24:53 AM
The towers, spawners, and bosses don't have a death animation though? The corpse.xml is just the one frame, and the actor doesn't have a death animation in their .xml?
Title: Re: [Monster] Scorpion - Finished! - New Original Actor
Post by: Myran on August 27, 2013, 03:09:58 AM
Right, but I don't think there's a problem with having both a corpse and a death animation.
Title: Re: [Creature] Scorpion ! Almost Finished - Death Animation
Post by: Linaru on August 27, 2013, 08:11:53 AM
The towers, spawners, and bosses don't have a death animation though? The corpse.xml is just the one frame, and the actor doesn't have a death animation in their .xml?

the corpse will spawn at the end of a death animation.
Title: Re: [Creature] Scorpion ! Almost Finished - Death Animation
Post by: Heretic on August 27, 2013, 08:48:49 AM
the corpse will spawn at the end of a death animation.

On mine, the corpse spawns at the beginning of the animation, and also at the end. So it looks almost like theres two corpses. The way I have it now though, I like it better I think - it plays an animation and shows the corpse for 5 seconds, then it blinks out. A bit like in the older TMNT games eh? :D
Title: Re: [Monster] Scorpion - Finished! - New Original Actor
Post by: auspexRex on August 29, 2013, 04:00:26 PM
I like the "corpse is here for a few seconds, then disappears" approach too.

Nice scorpion!
Title: Re: [Monster] Scorpion - Finished! - New Original Actor
Post by: Heretic on August 30, 2013, 09:39:42 AM
I like the "corpse is here for a few seconds, then disappears" approach too.

Nice scorpion!
Thanks! Means a lot :D I'm having a blast pouring hours into making these things. I've got a few more almost polished, I hope to make a decent custom map soon to showcase some of these things. I'm particularly proud of one item that I can't wait to show off :D
Title: Re: [Monster] Scorpion - Finished! - New Original Actor
Post by: Keefachu on September 05, 2013, 03:31:41 AM
Ooooo, nice scorpion! C:
Title: Re: [Monster] Scorpion - Finished! - New Original Actor
Post by: Heretic on September 12, 2013, 01:49:46 PM
Just updated the link - it was dead sorry!