Jump to content

A little help with the hat code.


Irontaco

Recommended Posts

trying to quickly put togheter the last pieces of a mod to release for christmas (although its probably gonna be delayed a bit). need some help with the hat code, dont know exactly how to make it show in-game. We set it up the same as how the dont-starve-assets hats Klei gave are set up in Spriter but they show up invisible in-game.

 

Here are the Spriter files + images via puush: http://puu.sh/dHw7t/fb87868891.rar

 

and the script is in the attached files.

 

Help would be greatly appreciated!

 

 

hat_parasite.lua

Link to comment
Share on other sites

Here's the deal with how to set up in Spriter:

1) Create a new project in a folder that contains another folder <symbol_name>, here "hat_parasite_swap" which contains the files <symbol_name>-0.png up to <symbol_name>-3.png

2) On the right side of the screen in the window called "Palette" expand aforementioned folder, double click image number 0, this gives a window in which you'll wanna place the pivot correctly (need to experiment here).

3) Repeat in the correct order.

4) After placing the pivot for each image you can drag and drop the last image in the window

5) Name the spriter entity <build_name>, here "hat_parasite_swap", and the animation "BUILD_PLAYER"

6) Use the code

owner.AnimState:OverrideSymbol("swap_hat", <build_name>, <symbol_name>) owner.AnimState:OverrideSymbol("swap_hat", "hat_parasite_swap", "hat_parasite_swap") --Here

Done!

 

PS: Who of the people I know from ages ago still frequents this forum?

Link to comment
Share on other sites

I do, I suppose. Though I had been away since early July and just came back to the forums about 3 weeks ago.

 

Nice  :)

Excuse the offtopic, but are you by now a mathematician or still "not really" a mathematician?  ;P  (Or do I remember something wrong here anyway?)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...