I have made a movement system that involves teleporting to adjacent empties, in order to create this movement system I had to script in every single tile and which direction you can move in them, now I that its come time to script the weapons, I dont want to have to script every single tile and when they will hit, can somebody teach me how to create a generator where I can give it parameters and it creates the weapons script? Like for example, if you use a sword I want it to only hit the tile in front of you, Which means I’d have to script character controller with
if character.transform.position == east.transform.position && othercharacter.transform.position == east1.transform.position
and also I’d have to add them for the southeastern side, and the northeastern side, thats not a problem for something simple like a sword, but for a gun, you have to fire down an entire row, which means I’d have to script every single transform.position in the row.