Summon in front of me instead of summon in my tile

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.
Post Reply
Lagoon
Grandmaster Poster
Posts: 118
Joined: Sun Mar 05, 2006 7:25 am

Summon in front of me instead of summon in my tile

Post 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?
Yukiko
Distro Developer
Posts: 2826
Joined: Thu Feb 02, 2006 1:41 pm

Post 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.
Lagoon
Grandmaster Poster
Posts: 118
Joined: Sun Mar 05, 2006 7:25 am

Post 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
Yukiko
Distro Developer
Posts: 2826
Joined: Thu Feb 02, 2006 1:41 pm

Post 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.
User avatar
Austin
Former Developer
Posts: 621
Joined: Wed Jan 25, 2006 2:30 am

Post 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);
Lagoon
Grandmaster Poster
Posts: 118
Joined: Sun Mar 05, 2006 7:25 am

Post by Lagoon »

Yes, that's what I'm using to find the coords ^_^
Thanx :)
Post Reply