I am reading and trying to simplfy some codes I had written a year ago. Also trying that to prevent conflicts in coding, since I’m trying a basic match engine logic when values collides it presents a gap or weird part in match scene .
(Like despite it’s goal , understandable by comment vs acts like nothing and passes to next time slot)
So my 1st question is, since I will have several matches that I want to refer to my matchsubroutine scene , I thought if there is a value that we can add for each match scene it will be great. So in each match scene I will attain a valuable like matchcount etc and it will direct to that match scene .
So I will not have to multiply same matchsubroutine scene file with different names:
here is an example . What I want is if possible attain a value so instead of go_to friendly01match0 tzone, I can use go_to matchid tzone(will increase it’s numerical value so each time it will now which match scene to go to)
I hope I am clear on the thought I’m trying to share.
Summary
*label ap3moves
*if passtoken10 > 0
*goto no11
*if passtoken11 > 0
*goto no10
*label no11
${no11name} smoothly.
*if no11mability > opgkprmability
*goto goalfinish
*if no11mability < opgkprmability
${no11name} tried but missed.
Good save by the keeper!
*set passtoken10 -1
*goto_scene friendly01match tzone
*if no11speed > opgkprspeed
*goto goalposition
*label no10
${no10name} smoothly.
*if no10mability > opgkprmability
*goto goalfinish
*if no10mability < opgkprmability
${no10name} tried but missed
Good save by the keeper!
*set passtoken11 -1
*goto_scene friendly01match tzone
*if no10speed > opgkprspeed
*goto goalposition
Besides that when I have 4 main ability attributes to each player and they are mathematically letting the positions direction, attack or defence, failed or succeeded, passed or couldn’t pass or control , scored or not etc.
So I am using the method above to make the attributes clash with each other.
As soon as we identify variables (randomized as well) and make sure there is no conflict for code to read and execute all is ok. See bold below , it fixed the problem.
Also I tinkered match day file to make it more basic - to increase consistency.
Summary
*label goalfinish
*temp goalfinish
*rand goalfinish 1 5
@{(goalfinish) A spectacular header from the player … | The goalie didn’t see the ball comes like a bullet, superb flying header from the player… | A powerful shot from the player … | A sweet touch … | A Powerfull volley … }
*if (no10mability > opgkprmability ) or (no11mability > opgkprmability )
*temp finalroll
*rand finalroll 1 8
*if finalroll < 7
*goto goal
*if finalroll > 6
*goto almostgoal
*if (no10mability = opgkprmability ) or (no11mability = opgkprmability )
*temp finalroll
*random finalroll 1 8
*if finalroll < 5
*goto goal
*if finalroll > 4
*goto almostgoal
*if (no10plyability > opgkprplyability)
*goto goal
*if (no10plyability < opgkprplyability)
*goto almostgoal
*if (no11plyability > opgkprplyability)
*goto goal
*if (no11plyability < opgkprplyability)
*goto almostgoal
Edit: Found the inconsistency and fixed it, it is bold & italic. Needed to add the randomized variables to the
Thought the variables are clashing and making the outcome defunct. So solved my first question.
I will try the variable addition to scene names as @Sinnie suggested and will see.
