Save-Point
Lycan ABS - Weapon display - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Games Development (https://www.save-point.org/forum-4.html)
+--- Forum: Code Support (https://www.save-point.org/forum-20.html)
+--- Thread: Lycan ABS - Weapon display (/thread-5530.html)



Lycan ABS - Weapon display - Jetboy - 07-13-2015

Hi everyone, for the past few days I've been messing with the Lycan ABS, going through the demo and the help file. For the most everything I've tried has worked fine but there's one thing that has been driving me nuts. For some reason I cant get the weapon to show on the characters hand. I see the effect and it does damage to the enemies but theres never any visible weapon.

I made 1 map with 1 chest to get a sword, and 1 enemy to mess with. I copied the script file from the demo into my test game folder, along with the graphics folder. Created a new weapon using the same configuration as the demo. After dealing with this for hours I finally decided to cry lol and come here for help. What am I missing?


RE: Lycan ABS - Weapon display - JayRay - 07-14-2015

Didja create the weapon character sprite? If so, does the name match what's in the configuration?


RE: Lycan ABS - Weapon display - DerVVulfman - 07-14-2015

If you're messing with the regular one (not the paperdoll system)...
Let's assume you have a character. Let's name him... Fred. Why not? I used Freddy Kruger's first movie music in the demo. Laughing

Now, you normally have a regular character like 001-Fighter_01.png for your character. Let's give your guy a new character... 'Freddy.png'. It's nothing special. We could use '001-Fighter_01', but that's a mouthful. Easier to just say Freddy.png.

No, it didn't need to be FreddyABS.png. I just used BillABS in the demo.


Now, the configuration system has this in the defaults:
Code:
# Animation Suffixes ----------------------------------------------------------
  SUFFIX_CENTER     = "!"                   # Used for center justified animations
  SUFFIX_MELEE      = "_melee"              # Used for melee attack animations
  SUFFIX_MISSILE    = "_range"              # Used for missile attack animations
and
Code:
# Melee Weapons
#               ID     Range  Mash   Delay     FStart    Kick    Jump    Suffix
# ================     =====  =====  =======   =======   =====   ====    =======            
  MELEE_WEAPONS[34]  = [   2,     3,       3,        1,    nil,   25,   "_sword"]
  MELEE_WEAPONS[5]   = [   2,     1,       3,      nil,    nil,   25,   "_sword"]

Now the 'SUFFIX_MELEE' value is set to '_melee'. That means that any melee attack performed will show with a character drawn with '_melee' tacked on to the end. So if you have a "Freddy_melee.png" made up, it will show for any melee attack performed by Fred. That is... it will show unless you set up special weapons in the MELEE_WEAPONS array.

In the MELEE_WEAPONS array above, you have two weapons defined... Weapons #5 and #34. In these cases, it will use a characterset with the '_sword' suffix tacked to the end.

So you could have defined for your Fred character:
"Freddy.png" for his characterset
"Freddy_melee.png" for any melee attack with no specific melee weapons defined.
"Freddy_sword.png" to be used if a weapon is defined in the MELEE_WEAPONS array.
The filename for the attacks and actions is always based upon the name of the characterset in use (Bill.png -- Bill_melee.png // Bob.png -- Bob_club.png)

System safeguard: If a graphic file is not valid, it will not crash the system. A safeguard in Lycan is that it skips loading missing files rather than crashing as it normally would.


RE: Lycan ABS - Weapon display - Jetboy - 07-14-2015

Thank you both for your response. It was midnight when I posted this and I was totally brain fried. I had my sprites in a different folder and the name was not the correct one. This more than shed light on my noob issues. I will keep messing with your ABS until I finally get it down to what I need. Thanks :)


RE: Lycan ABS - Weapon display - DerVVulfman - 07-14-2015

Brain Fried? Yep, you're a bonafide gamer now. And Noob? Nope. You're willing to learn. Newb... sure. Noob? They never wanna learn. Winking