• Content count

  • Joined

  • Last visited

Community Reputation

121 Excellent


About Malacath

  • Rank
    Senior Member
  1. Up and Away

  2. @ZupaleX, I'm confused as well. Never did that and still don't do it. But I will write it in the tutorial to make sure noone has problems. @BaconAndRibs, yes, an EventListener is definitely more efficient. But I don't know if an according even is pushed anywhere in the code, so it's up to you to either find that event or use PostInit's to create it yourself.
  3. @BaconAndRibs, the only thing I can think about is modifying the player stategraph or doing a periodic task to check every frame. But I don't really have the time to try it myself. If you try it with a task then don't forget to cancel the task. -- In OnEquipinst.task = inst:DoPeriodicTask(0, UpdateAnim)-- In OnUnEquipinst.task:Cancel()isnt.task = nilAnd function UpdateAnim will check the facing and change the animation accordingly. It's easy but really suboptimal. @ZupaleX, that's only if you want to ovveride the default pivot, which is not necessary if you want to make just a weapon. If you want to do an armor or helmet then you need to do it.
  4. @BaconAndRibs, it doesn't work because you are accessing the same entity all the time. In your code there is only one inst, and I assume that that is the weapon since you (presumably) don't crash on inst.components.equippable:IsEquipped(). So instead you want to get the owner local owner = inst.components.inventoryitem.ownerAnd access the AnimState of this guy.
  5. @Aurata,not really. There are many small things that could have gone wrong, so check every little detail with the tutorial, folder structure, spelling mistakes, and also check the log file. A common mistake is the following folder structure: mymod\exported\myitem\swap_myitem\swap_myitem\swap_myitem.png There is twice a folder named "swap_myitem" and that has to be like this! If you don't manage after sincerely trying you can upload the mod in a *.zip file and I can take a look.
  6. @BaconAndRibs, from my understanding you would need multiple files since the scml-compiler will create only one swappable anim file from one scml. If you manage with one file let me know though
  7. @Corrosive, Thanks for helping many many people in my abandoned tutorials! You're awesome @BaconAndRibs,unfortunately: No and no. Both could in theory be achieved by completely recreating the animations and using different symbols. But the amount of work to do for both of these is immense and I am not even going to attempt it. The second can also be achieved by swaping the symbol in the code, using some PeriodicTask and swaping every now and then. But that is tedious as well and needs to be hardcoded, an artist is not going to enjoy that. Both options are not really optimal, I would not do either (at least not a second time xD)
  8. It's just one line at the end of your items file, i.e. return Prefab( "common/inventory/spelltome", fn, assets), MakePlacer("common/spelltome_placer", "spelltome", "spelltome", "idle")Where the strings are Bank, Build and Animation. Edit: That question doesn't really fit in this thread. You can search the forums or create your own thread instead when you have a question.
  9. You can simply upload a *.zip file to a post you make by choosing "More Reply Options". I will not check out your file for now, I don't want to create an account on the website. But as Foxrai said in the post bellow, if you follow my tutorial exactly then you will succeed. I skipped over that part. But pretty much every other mod you can download gives an example of how to do that. The easiest route is to add directly into modmain GLOBAL.STRINGS.NAMES.MY_ITEM = "Name Of My Item"Note that the name of your item has to be in capital letters here. And as for the recipe image, I know that it works like this and it is not necessary to add a second image for the silhouette. Since the image contains alpha information the engine simply blackens all the non-transparent parts. You can upload your mod if you want, but in general this thread is not really the place for that. I am alos pretty sure that you can find a topic that already settled this problem somewhere on the forums. EDIT: In fact you find a LOT of those threads. Here's one of the first threads that explain it
  10. @Foxrai, when you have multiple mods that work independently of each other you pretty much just need to merge their modmain.lua in an arbitrary way (I mean it doesn't usually matter where what goes) and modinfo.lua and copy all other files over. Regarding the Hound Mound you will have to create an image for since the hound mound only has an animation and that can't be used (not as far as I know at least) for displaying in the crafts tab. So just copy the hound mound from the atlas of the animation and put it into, for example, "hound_mound.png". Then you'll need to use the code as follows local houndmoundrecipe = GLOBAL.Recipe( BlahBlahBlah) -- this code you already havehoundmoundrecipe.atlas = "images/hound_mound.xml"
  11. Version 0.0


    This is just a sample of a spriter file which creates an anim that is compatible with hats.
  12. Scaling the image inside Spriter will not work since the game engine takes only the symbol inside the player animations and replaces it by the image you created. This means that the player animations determine the size of the image (as is the same for position and rotation, for these it is just more obvious) This means that if you want a bigger item in your hand you will need to scale up the image file.
  13. What you need to do is rename the entity to "swap_swissblade" and the animation to "BUILD", both inside spriter. It's explained in the tutorial, thus I don't see the need upload the version I made (which I already deleted anyway)
  14. @irongollem, I can't help you here. In the file you uploaded you still didn't correctly set up the swap file and when I do it then the autocompiler converts it and it works ingame (baring the issue that the pivot is off).