Quantcast
Channel: The Battle for Wesnoth Forums
Viewing all articles
Browse latest Browse all 1990

WML Workshop • Re: Ability with relative facing

$
0
0
I'm sure there's a more elegant way to do this, but...

You dwarf is facing NE. Therefore, if (enemy.x>unit.x) or (enemy.x==unit.x and enemy.y>unit.y) then front=true.

I assume there will be special cases due to the hex coordinate system, but you can still brute force it easy enough if you think through them.

EDIT: Ignore this. You can do it with WFL. Looks like it would be pretty easy once you figure it out. See https://wiki.wesnoth.org/Wesnoth_Formul ... _Functions

Statistics: Posted by white_haired_uncle — Yesterday, 8:19 pm



Viewing all articles
Browse latest Browse all 1990

Trending Articles