Jump to content


SpellPoint without the stinkin' coordinates


  • Please log in to reply
No replies to this topic

#1 -Galactygon_-

-Galactygon_-
  • Guest

Posted 02 April 2004 - 02:46 AM

Well, not long ago I made a script involving mages casting DimensionDoor around the map up to their visual range in a random pattern. This script is useful for keeping mages injured from melee attacks, or for dodging area effect spells such as Horrid Wilting

Here is a quick overview of this minor tutorial
  • Make an invisible, invulnearble creature (make sure it can be targetted by the AI). And make sure it has a deathvariable or else this whole script will not work. Also, put a delayed (5 secs.) DestroySelf effect to prevent overcrowding
  • Make the mage create 4 offsets of these creatures (range: 260)
  • The mage will teleport to the farthest creature with a requirement that it is more than 20 feet away. This way, the script can be used on almost any terrain, in a hallway, etc.
  • To make this script even better (I recomand this part for advanced scripters), make the invs. creature have scripting stats set on itself based on the type and range of enemies it is near. Then make the mage have conditions for the teleporting based on the stat of the invis. creature.
Here's how to do the first three parts (in more detail)
  • Make an invisible, invulnerable creature with a non-birdtype appearance (so it can be detectable).
  • Save it as "SPWI402Z", and put "SPWI402Z" as a deathvariable
  • Open up the mage script (BCS file) with DLTCEP or ISE and copy the code below:
    IF   Global("TeleportToOffset","LOCALS",0)   // you fill in the rest of the conditions when teleportation should    //be activatedTHEN    RESPONSE #100        SetInterrupt(FALSE)        CreateCreatureObjectOffset("SPWI402Z",Myself,[260.260])        CreateCreatureObjectOffset("SPWI402Z",Myself,[-260.260])        CreateCreatureObjectOffset("SPWI402Z",Myself,[260.-260])        CreateCreatureObjectOffset("SPWI402Z",Myself,[-260.-260])        SetGlobal("TeleportToOffset","LOCALS",1)        SetInterrupt(TRUE)        Continue()END

    I have (purposely) made a SEPERATE if block to make the script run 'smarter'. You should copy and paste this part at THE BEGINNING of the mage script.

    IF   Global("TeleportToOffset","LOCALS",1) // Checks if teleporting is activated   Detect(TenthNearest("SPWI402Z")) // Checks for the farthest creature   !Range(TenthNearest("SPWI402Z"),20)   // You can fill in the rest of the 'if' block for more advanced effectsTHEN    RESPONSE #100        SetInterrupt(FALSE)        SetGlobal("TeleportToOffset","LOCALS",0) // sets teleportation var. to 'false'        SpellNoDec(TenthNearest("SPWI402Z"),WIZARD_DIMENSION_DOOR)        SmallWait(20)        Continue()END
I hope this tutorial proves a useful to you. If something is not really clear for a newbie, I have actually written this tutorial for advanced modders out there. This small script also opens up new possibilities for other scripts requiring coordinates.

If you have any feedback, post away. ;D

BTW: Since I don't know anything about WEIDU coding, I cannot make WEIDU tutorials. :-[ However, with your knowledge you can convert it to WEIDU format. ;)