Ranged Targeting [DIS]

Content and general development discussion, including quest scripts and server code. TMW Classic is a project comprising the Legacy tmwAthena server & the designated improved engine server based on evolHercules.


Forum rules

This forum houses many years of development, tracing back to some of the earliest posts that exist on the board.

Its current use is for the continued development of the server and game it has always served: TMW Classic.

Post Reply
User avatar
wushin
TMW Adviser
TMW Adviser
Posts: 1759
Joined: 18 Dec 2012, 05:56
Location: RiverBest, Brew City, Merica
Contact:

Ranged Targeting [DIS]

Post by wushin »

Weapon collision finding explained.

A can Attack B, but B cannot Attack A. Here is why.

When calculating whether or not ranged can attack a target, TMWA finds the first (marked 1 in diagram) Point towards target. If those coords are the diagonals It seeks out the two tiles (marked 2 in diagram) in the direction of the Angle. If all 3 tiles are clear of collision it attempts to find a complete path (firing solution) to the target. If one of the first tiles are collision it fails, if one of the second tiles is collision it also fails. In the diagram it results in B not being able to attack A while A can Attack B. Firing solution is mapped in 1/2 red squares. Fuchsia square doesn't block A either. If the collision on the bed's headboard is removed a successful attack is capable by B.
Attachments
weapon-collision-diagram.png
weapon-collision-diagram.png (100.05 KiB) Viewed 1733 times
The secret to getting all the important stuff done is doing nothing.
pateame

Re: Ranged Targeting [DIS]

Post by pateame »

¿Is possible to use these limitations in collision areas to make a monster stay in some place unreachable to melee combat?
That way only archers or mages in the collision corners will be able to hit the monster, and the map corners could be used as "fishing spots" to fight against smaller mobs.
In Tulimshar for example there's a nice spot to do that:
Image
BUT, ¿what if the dropped loot fall in the water? :shock:
User avatar
wushin
TMW Adviser
TMW Adviser
Posts: 1759
Joined: 18 Dec 2012, 05:56
Location: RiverBest, Brew City, Merica
Contact:

Re: Ranged Targeting [DIS]

Post by wushin »

You could but it would be exploiting a bug in TMWA's targeting so one can guarantee it would continue to work.
The secret to getting all the important stuff done is doing nothing.
Post Reply