After changing the void Start() method to be triggered by a button, the functionality logic started
I'm sorry that for English is not my native language. I will use translation to communicate, and I might have used some words incorrectly, but I still really appreciate your help.:catlove:
So, let me first explain the context. I learned programming by following a tutorial that used chess as an example.
I made some modifications to the original logic and conditions to create a method for generating chess piece fragments.
Originally, this method was in void Start(), and the logic for creating the first chess piece worked fine.
However, after I moved it to public void Lv1() and applied it to a button, the logic for the first chess piece’s movement board and attack detection started malfunctioning.
The issue seems to disappear after the first move. I believe it’s related to the timing of the trigger, but I’m not sure how to modify my script to fix it.:catsweat:
And, I'm not sure which part needs to be modified the most, so I didn't attach any images. If you can point it out, I will take a screenshot!! TYSM!:catlove:
5 Replies
Wow, I don't know what I did, even the chess pieces created in void Start() are starting to malfunction...
$paste
If your code is too long, you can post to https://paste.mod.gg/, save, and copy the link into chat for others to see your shared code!
Here is my Script code!!:catlost:
https://paste.mod.gg/xjssohryagkt/2
BlazeBin - xjssohryagkt
A tool for sharing your source code with the world!
First one image is malfunction, second one is correct.