New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make arrows and spears bury into the ground #47
Comments
I'm working on this issue. |
I need some help with this issue. |
Hmm, it seems like we need to add some code to stop drawing the shadow for arrows and spears that are dead, which we could try out in CocoSprite by checking if the ThangType name is "Arrow" or "Spear". If that works, we can make the shadow diameter specific to particular animations rather than the whole ThangType. It sounds like the action being set to "die" is working? Or do I misunderstand? |
You understood everything right. "die" is already working if you add action.Acts to the Arrow object. |
By Jove, you're right! So the only step left to do is to add action.Acts to existing levels' Arrows and Spears and to stop drawing the shadow Mark when they are dead and their ThangType name is 'Arrow' or 'Spear'. Do you want to try editing CocoSprite to turn that shadow off? |
I've modified the arrow slightly so that instead of needing to use So now we just need to be able to disable the shadow appropriately. |
I've made it. |
When arrows/spears get stuck in the ground, they should appear buried in the ground. We have a die animation that cuts off the points, but we aren't 1) using it or 2) adjusting the rotation to make them point down into the ground.
Our arrow die state:
When an arrow misses and lodges into the ground, it should look kind of like this:
Adding the "die" action
In the
combat.Arrow
Component (edit the code in the level editor), which serves for both Arrow and Spear ThangTypes, do something like what thecombat.Shell
Component does to set theaction
to"die"
when the missile gets stuck in the ground. That should trigger thedie
action animation in the CocoSprite. We'll also need to add theaction.Acts
Component to the Thang. (I can add that to the Arrow and Spear ThangType default Components when it's ready.)Pointing into the ground
See #46 for some info on adjusting the apparent rotation / skew / transform properties in general. We'd want to adjust those also so that the arrows and spears appear to be buried in the ground, even though their velocity and rotation may no longer be meaningful (as they're not moving). So you'd add code in app/lib/surface/CocoSprite.coffee in perhaps the
updateRotation
orupdateAction
methods.The text was updated successfully, but these errors were encountered: