Jump to content

Recommended Posts

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.

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

3.png

1.png

2.png

Hi, I've managed to get it showing in-game like so:

20191028234655_1.jpg.6535b014d93f408a4460c6cd8d651872.jpg

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 by maliblues

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...