I am currently working on weapon system similiar to MW-1 munitions dispenser, is there any method to have random value in cannon projectile velocity? to random generate a value between A to B every time when shoot?
I am currently working on weapon system similiar to MW-1 munitions dispenser, is there any method to have random value in cannon projectile velocity? to random generate a value between A to B every time when shoot?
@senkanhitachi If you need a float you can try multiplying the function output with a float and see if that does any good.
@Aerofy Seems like the projectile velocity can only apply the flout/double value and not support function. I try to use a function as a value on that, it always use 0 as default
@senkanhitachi Use funky trees
@Aerofy I understand how to create a random function, i dont know how to create a function in simpleplanes xml.
Stackoverflow is generally where you find formula's like that with plenty of explanation.
Here's an example I stumbled upon: Link
@Aerofy is there any document for that?
I don't think there is. But you can try looking up a function for generating random numbers and implement it yourself.