methods and code execution), then why not separate those? If your target is to make the game modular then you need to think even more modular. With that said, you actually resolved your own problem, you have only one SO to represent the attack and with that, you have issues when 2 players attack using the same SO. This is not to say that you shouldn't do it, but you'll need to prepare yourself for the workarounds you'll have to go through and the change of workflow. I tried it before and it took quite an effort to figure things out. Using SOs (ScriptableObjects) with multiplayer isn't going to be easy. Which means when player1 attacks, some variables change meaning player2 can't attack anymore because player1 ran the code first and turned on "IsAttacking = true" for example, because scriptable objects have a shared state.ġ) Create an instance of that scriptable object for each player that spawned? (but is that really the correct way to use a scriptable object then?)Ģ) Create copies of the same scriptable object for each possible player? (but what if I wanted to have 100 players, that would mean 100 copies, that can't be correct)ģ) Use normal scripts and create class instances instead of scriptable objects? The issue I'm currently having is when 2 local players play with a warrior, they use the same attack object. Let's say you have an rpg with a warrior class and the warrior has an attack ability. I'm trying to move some of my code to scriptable objects to make everything more modular, but I'm not really sure if the way I'm doing it is actually correct because I'm getting some issues. Reddit Logo created by /u/big-ish from /r/redditlogos! Long series.ĬSS created by Sean O'Dowd, Maintained and updated by Louis Hong /u/loolo78 Favors theory over implementation but leaves source in video description. Normally part of a series.Īlmost entirely shader tutorials. Lots of graphics/shader programming tutorials in addition to "normal" C# tutorials. Using Version Control with Unit圓d (Mercurial) Related SubredditsĬoncise tutorials. Unity Game Engine Syllabus (Getting Started Guide)ĥ0 Tips and Best Practices for Unity (2016 Edition) Lots of professionals hang out there.įreeNode IRC Chatroom Helpful Unit圓D Links Use the chat room if you're new to Unity or have a quick question. Please refer to our Wiki before posting! And be sure to flair your post appropriately. Remember to check out /r/unity2D for any 2D specific questions and conversation! A User Showcase of the Unity Game Engine.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |