What would be the best way of adding multiple, in play editable scripts to multiple GameObjects ?
I'm trying to make a card game and I've gotten to the point where it's basically Hearthstone with no cardtext. So now it's time to add said cardtext but hardcoding every card effect (especially since a lot are just "on play do x" and "On play do y" or "On death do x" etc.) would be not only time consuming but really bad since I want more of these effects/edit x and y during play/copy and remove the cardtext during play. So my question is if anyone has an idea or a tutorial that I can see to help me star adding these effects to my cards (the cards themselves are programmable objects).
Ty :D
Good day.
Are you asking a full structure format for a card game?
Well I'm not 100% sure what "structure format" really means, but I just want someone more experienced than me to point me in the right direction, like maybe a guide link or something like that. I just want to learn if there's an easyer way to asociate and edit scripts while playing then the usual gameObject ... or GameObject.Find(...
Answer by Pinkuboxu · Sep 18, 2018 at 10:24 AM
You can't edit C# or scriptables during run-time but you could use a scripting language asset. The other option would be to write your own proprietary interpreter, if you fancy writing your own scripting language. If that's too much work, Fungus has an implementation of the LUA scripting language. You would have to learn LUA but it's really not much different than most other languages. Besides that, Fungus has a node based visual scripting system that uses LUA in the form of "Flowcharts" that might come in handy along with Visual Novel/RPG style dialog UI prefabs among a bunch of other really good stuff. Best of all it's Free. https://assetstore.unity.com/packages/templates/systems/fungus-34184
Follow this Question
Related Questions
Card Game: Where do I begin 1 Answer
Why does Debug.Log continue to execute from Start() and why does InvokeRepeating() not? 1 Answer
[Absolute beginner] Play animation on trigger (trigger = several fallen objects) script 1 Answer
HingeJoint motor will not change values? 1 Answer
Jump animation not returning to normal? 0 Answers