Page 4 of 5
Re: Making Spiders Shoot! (Solved)
Posted: Sat Nov 24, 2012 3:00 pm
by Mal85
How odd, I will simply try re-cloning my spider script and starting over as it seems there is something wrong with my current script. Most likely my methods have been a bit too sloppy on my first run. I'll try running through this again. Thought I had it set up like you did your scripts but something is amiss. Back to the chopping block and thanks again Grimwold!
Re: Making Spiders Shoot! (Solved)
Posted: Sat Nov 24, 2012 4:21 pm
by Grimwold
Mal85 wrote:How odd, I will simply try re-cloning my spider script and starting over as it seems there is something wrong with my current script. Most likely my methods have been a bit too sloppy on my first run. I'll try running through this again. Thought I had it set up like you did your scripts but something is amiss. Back to the chopping block and thanks again Grimwold!
Just wondering... Did you clone or define a new spider?
Mine was a complete definition rather than a clone and I changed the attack animation frame in the definition to point to my copied file in mod_assets.
Re: Making Spiders Shoot! (Solved)
Posted: Sun Nov 25, 2012 1:28 am
by Mal85
It was originally a cloned object. Interesting... I'll try and define my new spider instead of cloning and see if I have different results. I'll get back on this one.
Re: Making Spiders Shoot! (Solved)
Posted: Sun Nov 25, 2012 1:51 am
by Mal85
Just wondering... Did you clone or define a new spider?
Mine was a complete definition rather than a clone and I changed the attack animation frame in the definition to point to my copied file in mod_assets.
This this this!!! Thanks Grimwold once again, this absolutely worked 100%. Apparently the best thing to do is define new objects when trying this sort of thing. Both types of spiders are now functioning as intended with no bugs or errors.
@komag the normal spiders and shooting spider all worked correctly, it was when the normal spiders attacked it was looking for the animation that i had defined as spider_spit.animation in my mods_assets folder. This was causing the normal spiders to try and use the new definition. Even though I had tried renaming, copying and moving files around, they always managed to find only the .animation that I defined in mod_assets even though the normal spiders scripts where completely unaltered.
Thanks again everyone!
Re: Making Spiders Shoot! (Solved)
Posted: Sun Nov 25, 2012 1:53 am
by msyblade
Define is far superior to clone when changing properties of an existing asset, then using the original asset and clone. Define makes it two originals, no association. betting your problem is solved
Edit: beat me by 2 minutes!
Re: Making Spiders Shoot! (Solved)
Posted: Sun Nov 25, 2012 3:06 am
by Komag
That's a good tip to remember! glad it's sorted in this case
Re: Making Spiders Shoot! (Solved)
Posted: Sun Nov 25, 2012 4:55 pm
by Kuningas
I've used define always, but I heard in some cases cloning is more stable. Is there an official statement on this?
Re: Making Spiders Shoot! (Solved)
Posted: Sun Nov 25, 2012 5:20 pm
by Grimwold
In my experience cloning is fine if you want to change a few settings or add hooks etc.
The risk with defining is making sure that you define everything that the asset needs, otherwise it will crash the editor. Therefore if I want to define something I always tend to copy the whole definition from the asset pack for a similar asset e.g. spider, and then make the changes I need.
Re: Making Spiders Shoot! (Solved)
Posted: Sun Nov 25, 2012 5:47 pm
by msyblade
Yes, Clone is simpler as it uses default original assets for any part you have not defined, Define makes an entirely new entity, need every definition/string in it, so can be a bit more complex, but you end up with a completely independent and separate entity. If you clone and use the clone and the original sometimes the two become intertwined in ways that are very difficult to anticipate. I have always used define, but clone would be fine if I weren't using the original asset also. When making new assets like we are known to do, It would probably be best to always defineObject, as we don't know who/what dungeon the asset may be used with. At least this my understanding of it, and I have been accused of being a moron on frequent occassions.
Re: Making Spiders Shoot! (Solved)
Posted: Sun Nov 25, 2012 9:32 pm
by Komag
I agree that define is good to use; one reason is that you learn more about the different properties. Just copy the entire original define script from the asset pack, then you can mess around with the different properties and start getting a feel for how things really work.