Page 1 of 1

Summon in front of me instead of summon in my tile

Posted: Tue Nov 28, 2006 4:09 pm
by Lagoon
I'd like to have a summon spell which summons the npc in first tile in front of the character. Of course this requires some checks, which summoning in the caster tile doesn't require. I'd like to have suggestions about which checks are necessary to be sure the tile is ok for summoning. I think I have to assure the tile is walkable, has los with the caster and... probably it's enough, isn't it?

Posted: Tue Nov 28, 2006 8:33 pm
by Yukiko
Might I recommend making it a targettable feature? The caster would target the location. That way most of the checks could be done in the target function. Also that would make it a bit more unique than most shards.

Posted: Wed Nov 29, 2006 1:31 am
by Lagoon
Yes, why not? :)
Targetable would be nice... and needs the same checks. I think checking the return value of GetWorldHeight() not to be an error and checking LOS should be enough

Posted: Wed Nov 29, 2006 1:56 am
by Yukiko
Yep. LOS ought to be good enough and if you want to restrict the distance from player that they can target that's easy too. Could do a lot with that. Maybe base the distance upon eval int or intelligence or meditation such that the higher the skill or stat the farther away they can target. Lots of fun stuff to do with that one.

Posted: Wed Nov 29, 2006 3:07 am
by Austin
http://svn.sourceforge.net/viewvc/pol-d ... iew=markup

var temp := GetPointsByFacing(caster.x, caster.y, caster.facing, 2);
temp := temp[2];
MoveObjectToLocation(victim, temp.x, temp.y, caster.z);

Posted: Wed Nov 29, 2006 4:26 am
by Lagoon
Yes, that's what I'm using to find the coords ^_^
Thanx :)