Author Topic: Altering Greater Planar Binding  (Read 499 times)

Legacy_Imperator

  • Full Member
  • ***
  • Posts: 128
  • Karma: +0/-0
Altering Greater Planar Binding
« on: March 13, 2016, 06:05:13 pm »


               

So I'm looking to modify greater and lesser planar binding to have teleportation effects.


 


I'll have the spells retain their usefulness in terms of paralyzing outsiders and summoning allies, if you click on an outsider and click on yourself respectively.


 


If a player clicks somewhere on the ground they'll teleport to that location.


 


I'm having a difficult time getting the PC's click location and also, making it so they can't teleport to an "illegal" location which is basically anywhere that you wouldn't be able to get to normally on foot, like the top of a building or a plateau with no ramp leading up to it.



               
               

               
            

Legacy_Asymmetric

  • Sr. Member
  • ****
  • Posts: 289
  • Karma: +0/-0
Altering Greater Planar Binding
« Reply #1 on: March 13, 2016, 07:01:40 pm »


               

The first issue is easily solvable. If I understand correctly you want to


  1. Target is an outsider: Stun.

  2.    
  3. Target is self: Summon.

  4.    
  5. Target is ground: Teleport.

You can get the spell target location with GetSpellTargetLocation(). What you would do is use GetSpellTargetObject() first. If it's valid: Check if the object is the caster and do the summon. If not check the objects racial type and attempt to stun. If the target object is invalid it means that the ground was targeted. Use GetSpellTargetLocation() and teleport.


 


As for determining if there is a valid path between two location ... there is no way I know. I think nwnx has a function for that. I'm not sure though. Maybe others can shed some light on that.



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Altering Greater Planar Binding
« Reply #2 on: March 13, 2016, 09:51:32 pm »


               


I'm having a difficult time getting the PC's click location




Thats maybe because to change the spell targetting setings you need to change spells.2da


               
               

               
            

Legacy_Asymmetric

  • Sr. Member
  • ****
  • Posts: 289
  • Karma: +0/-0
Altering Greater Planar Binding
« Reply #3 on: March 13, 2016, 11:02:01 pm »


               

Ah, yes, good point.


 


You cannot target yourself with either spells. Both Greater and Lesser Planar Binding have 2E as TargetType, which means: Creatures, area/ground, items, placeables. You'd need to set it to 2F (+self) or 3F (+self & doors) in the 2da.


 


Targeting the ground should work fine though.