Jump to content
  • 0

turret pillar, need help!


usirname

Question

hello

is there anyone out there that knows how to create a projectile turret from events?

that shoots something like flaming arrows from a wall as you walk past it,

and it does damage to the player?

 

i have tried with a npc set to "static"

and i cant get them to shoot 

 

if i set them to "stand still" and put some npc avoid blocks around them 

it shoots, but....

it turns to where the player is, and sometimes its not ideal for the situation i am trying to create

 

if i put a npc down and put some normal blocks around it and replace one normal block with one npc avoid where i want the projectile to shoot from

make it so the projectile shoots from up, right, down and left

and set the projectile's ignore collision "map blocks" = false

it works but it looks messy, as it wastes 3 full projectiles on the wall around it, also if i have 20 of them on 1 map im guessing it would gather some lag?

as it would be as if there were 80 projectiles shooting at one time

 

im wondering if i am missing something very simple?

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0
18 hours ago, usirname said:

hello

is there anyone out there that knows how to create a projectile turret from events?

that shoots something like flaming arrows from a wall as you walk past it,

and it does damage to the player?

 

i have tried with a npc set to "static"

and i cant get them to shoot 

 

if i set them to "stand still" and put some npc avoid blocks around them 

it shoots, but....

it turns to where the player is, and sometimes its not ideal for the situation i am trying to create

 

if i put a npc down and put some normal blocks around it and replace one normal block with one npc avoid where i want the projectile to shoot from

make it so the projectile shoots from up, right, down and left

and set the projectile's ignore collision "map blocks" = false

it works but it looks messy, as it wastes 3 full projectiles on the wall around it, also if i have 20 of them on 1 map im guessing it would gather some lag?

as it would be as if there were 80 projectiles shooting at one time

 

im wondering if i am missing something very simple?

 

it seems as though i found the answer to my own question, inside my own question?

 

for anyone that wants this, i will explain

 

take a npc and set it on "stand still" put some blocks around it and replace one with a npc avoid block (on the direction you want it to shoot)

and set the projectile's ignore collision "map blocks" = false

set the projectiles animation to "above target" and "below fringe"

use tiles that are on the 4th and 5th layer around the "turret" 

and you wont see the failed attempts of it shooting into a wall

 

if you have it inside of a wall it will be as if the projectile shoots out of the wall and be visible again as soon as comes into contact with a tile that is under layer 4

 

just means we cant give the actual turret "npc" some fancy fire animation, unless of course its able to shoot in all directions

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...