PDA

View Full Version : weapon->Dir



ScaryBinary
05-25-2008, 11:56 AM
....A script I'm writing spawns an LWeapon, an arrow. But the arrow is always spawned pointing upwards, and using Weapon->Dir doesn't do anything...I have the dead state set to -1, if that makes any difference. I want the game engine to handle all the movement and such.

:( Help!

(On a side note, the comments for ->Dir state "Used by certain weapon types to determine movement, shield deflection and such." ....is there a list of these "certain weapon types" anywhere?)

_L_
05-26-2008, 12:19 AM
'Pointing' upwards?

Do you mean that it moves upwards, or that its sprite is facing the wrong way?

ScaryBinary
05-26-2008, 08:48 AM
I just realized I might be an idiot.....(I'm always the last to know!) :tongue:

The entire arrow sprite moves in the proper direction, but the tip of the arrow always points up (i.e., the sprite tile is facing the wrong way), so it looks a little lame when, say, the projectile is moving in a westernly direction but the tip of the projectile is pointing north.

....but now that you've asked the question you've asked, I bet I need to use weapon->Flip to "align" the arrow with its direction of travel.

*EDIT*
Got it, with the added "undocumented" weapon->Flip values of:

4 = Rotate clockwise 90 degrees
7 = Rotate counter-clockwise 90 degrees


These flip values seem to apply generally to Combos as well (e.g., pressing "R" in the Combo Editor rotates the combos clockwise), though I don't recall seeing these values in any of the scripting documentation. I'll update the Wiki....

C-Dawg
05-26-2008, 11:23 PM
Or you can just draw different combos based on whether you're facing N, S, E, or W.