ID:173262
 
I need help to make this snippet take the values of navy, tanks, planes, and infantry, add them together, add the cooresponding usr values, and select a random range in between the final values.

mob/PC
verb
Attack(mob/M as mob in world)
var/attackerchances
We can't really help since we don't know what navy, tanks, planes, ect are in your game, or what any of the variables for them are. However I'll point you to what I think you need.
Press F1 in Dream Maker. This will bring up the reference. Now look up the following:
  • for()
  • rand()

    Thanks for making the extra effort and using the
 tags.
Drafonis wrote:
I need help to make this snippet take the values of navy, tanks, planes, and infantry, add them together, add the cooresponding usr values, and select a random range in between the final values.

mob/PC
> verb
> Attack(mob/M as mob in world)
> var/attackerchances
>


What exactly do you mean by "coresponding usr values", and by "random range in between the final values" do you mean between coresponding usr values and the added values of the military units?