How to create a code generator?
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.
Answer by JincSoft · Oct 24, 2016 at 05:19 PM
Sounds like you are trying to make a Final Fantasy Tactics or Tactics Ogre style combat system so I would recommend you look at the Tactics RPG project at https://theliquidfire.wordpress.com/ . Granted he covers way more advanced things (map editor, abilities, character classes), but you should be able to apply the tile map system idea to your game.
Your answer

Follow this Question
Related Questions
Endless Runner platform Heigh generator not working. 0 Answers
Rigidbody First Person Controller Movement 0 Answers
Movement input problem? 1 Answer
getting an object to move only along x-axis and y-axis 0 Answers
GameObject doesn't move 1 Answer