Quote:
Originally Posted by Galdor
seems complicted
|
Its not complicated at all. The simple script below reacts to when the play '23 Power' is created, keep in mind I just made this out of the top of my head to lower confusion.
PHP Code:
example.play = {2,3,0,"Power"}; // {BackType [2-4], HandOff Hole [1,3,5,7,9], Direction [0-L, 1-R], Type [Power,Veer, etc.]
if ( example.play[0] in |2,4| ) {
temp.playType = example.play[3]; //Type
temp.playRP = example.play[0]; // 2-4: Running Play, 0,70,90: Pass Play
temp.playHole = example.play[1]; // The hole in which the handoff is to be taken (Odd numbers only), pay no mind if its a pass play
temp.playDir = example.play[2]; // 0: Left, 1: Right; If none is provided the play will go left
execPlay(temp.playType,temp.playRP,temp.playHole,temp.playDir);
return;
}