Author Topic: [Scripts] Temporary Blockade Script  (Read 135 times)

0 Members and 2 Guests are viewing this topic.

KryptoniteKS

  • Jr. Member
  • **
  • Posts: 14
    • View Profile
    • Awards
  • Steam: RelinquishedFire
[Scripts] Temporary Blockade Script
« on: January 05, 2019, 06:50:26 AM »
Hello, I'm creating an RPG map right now and I'm in the process of scripting spells and one of them I call blockade, which is where the player spawns a 3x5 wall of dirt in front of them and it then deletes
  • seconds later. My problem is that I have to use a variable to spawn this blockade in order to save its position and delete it afterwards in the event that the player is moving. I've tried almost everything I can think of and my main problem is spawning the blockade correctly. Since I cannot use vrel:x, vrel:y, vrel:z, and view:x, view:y, and view:z do not work, I can't get the wall to spawn in the direction the player is facing. If I look sideways (positive or negative z direction), the wall spawns perfectly as a 5x3x1 (LxHxW) but if I look forward (positive or negative x direction), the wall will spawn as a 1x3x5 (LxHxW). Does anyone know a way to spawn a wall that faces the direction the player is facing and then have it automatically delete after 5 seconds?

Lord Leo

  • Legendary Member
  • *****
  • Posts: 1178
  • Aka Cat
  • Awards 3 years on site 2 years on site 1 year on site
    • View Profile
    • Awards
  • Xbox: Circle cat113
Re: Temporary Blockade Script
« Reply #1 on: January 05, 2019, 06:46:57 PM »
you could use prel to create it, create a temp zone set to .01 or .1 speed, the use prel to delete it.

KryptoniteKS

  • Jr. Member
  • **
  • Posts: 14
    • View Profile
    • Awards
  • Steam: RelinquishedFire
Re: Temporary Blockade Script
« Reply #2 on: January 18, 2019, 12:41:22 AM »
you could use prel to create it, create a temp zone set to .01 or .1 speed, the use prel to delete it.
Well, sadly I cannot use prel. I tried it. If I'm using X,Y,Z coords, it will always be spawned (theoretically) 5 units X from the player. X being a single direction. Whether I'm facing N, S, E, W, it will always place it 5 units X, which I believe is East?