Okay, so the set-up already works pretty well as-is. Basically right now, if a player's holding a certain button, and has enough energy, it will create an instance of an object in front of them and send it moving. If they hold it, it will just keep making instances, resulting in a continuous beam. An intance of the "beam" is destroyed when it collides with an enemy beam or is outside the bounds of the room.
Right now I have it set up so that when it collides with an opposing beam, it randomly decides which of the 2 to destroy. By modifying the probability, I can make it so one beam is "stronger" than the other, and because it has a greater chance of destroying an opposing instance, it will progress down the length of the other energy beam.
What I want to know is, is there a way to modify the random "chance" via a GML expression? i.e., the chance is one out of "X", X being the answer to the expression, and the chances that the instance ahead will be destroyed.
Because if I just use the drag-and-drop "dice" function, I can only set the value, so one beam is just stronger than the other the whole time. What I WANT to do is have it so the strength of the beam is dependent on the actual strength of the character, and by how quickly you press the space-bar to keep pushing your beam forward.
So does anyone have a simple way to assign the value of "X" (as in, the chances are 1 out of X) using GML expressions?