Enderia Posted October 16, 2019 Share Posted October 16, 2019 Short story. I wanted to try and learn how to program a weapon since I can do some easy characters, but Swap_ isn't working. I've used someone else's mod as a base cus my program doesn't want to listen to me. Can someone help? Spinel.zip Link to comment https://forums.kleientertainment.com/forums/topic/112768-swap_weapon-not-working/ Share on other sites More sharing options...
Ultroman Posted October 25, 2019 Share Posted October 25, 2019 Without an image or something we need more information than "isn't working". Does it not show when equipping it on your character? Does the weapon otherwise work? Does your game crash? The code and animations seem fine to me, but then I've only ever looked at the code and animation for them, and never actually created a single animation myself. Link to comment https://forums.kleientertainment.com/forums/topic/112768-swap_weapon-not-working/#findComment-1276603 Share on other sites More sharing options...
Enderia Posted October 27, 2019 Author Share Posted October 27, 2019 On 26.10.2019 at 12:17 AM, Ultroman said: Without an image or something we need more information than "isn't working". Does it not show when equipping it on your character? Does the weapon otherwise work? Does your game crash? The code and animations seem fine to me, but then I've only ever looked at the code and animation for them, and never actually created a single animation myself. I was finally able to create my own Spriter files so I won't have to use someone's "mastersword" prefab. The Rejuvenator shows when on the ground, also in the eq, they can inspect it and attack with it, but when the character tries to grab it becomes invisible (Character grabs the air). I've tried creating new files and writing new code but nothing works. I have no idea what's wrong and I really need the weapon for character. Spinel.zip Link to comment https://forums.kleientertainment.com/forums/topic/112768-swap_weapon-not-working/#findComment-1277470 Share on other sites More sharing options...
Ultroman Posted October 28, 2019 Share Posted October 28, 2019 Yeah, I can t tell you what's wrong, but since the swapping works, and the code looks exactly like the code for another boomerang mod, there has to be something wrong with the swap animation itself. Link to comment https://forums.kleientertainment.com/forums/topic/112768-swap_weapon-not-working/#findComment-1278035 Share on other sites More sharing options...
maliblues Posted October 28, 2019 Share Posted October 28, 2019 (edited) Hi, I've managed to get it showing in-game like so: After some digging/testing here's what I found. For this line of code it is important to understand what they are referring to. owner.AnimState:OverrideSymbol("swap_object", "swap_rejuvenator", "swap_rejuvenator") This post explains that the middle is referring to a build but the other two are "symbols". The symbol means a texture folder located inside exported > inside your "rejuvenator" folder > inside either "ground_rejuvenator" or "swap_rejuvenator". However you did not have any folder here. It is correct for the spriter file to be here but the texture should have been placed in another folder named what the code looks for, so "swap_rejuvenator". However providing the correct folder structure was not enough here because those spriter files were already set up to look for a texture outside your new folder still. This was causing the game to not compile the weapon anymore since it wasn't finding the texture in the new folder. So I found this equip item example helpful in providing me with a spriter project set up that I needed. I have attached what I did so you can take a look. I wouldn't change any folder or texture names. To explain in more detail what I did: I used the spriter file from the example and changed the name of the spriter file (so the build name) and then also the entity name (the bank) inside spriter. I kept the texture folders named wand as this spriter file looks for them, same with the name of the texture inside the wand folder. The code also needed to be changed to look for the correct symbol now. owner.AnimState:OverrideSymbol("swap_object", "swap_rejuvenator", "wand") Also, as you can see the weapon in-game isn't placed correctly, perhaps it would be better to use the original pngs for the wand as your template to draw over to hopefully get it placed right. Spinel.zip Edited October 29, 2019 by maliblues Link to comment https://forums.kleientertainment.com/forums/topic/112768-swap_weapon-not-working/#findComment-1278126 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now