One guestion about random numbers.

Ask questions, discuss ideas, get answers
Post Reply
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

One guestion about random numbers.

Post by Vilespring »

I remember seeing somewhere about adding random things to, things. (you get my drift) My question is, is this addition totally random, or is it more like a counter? because I have a stupid idea that seems kinda fun! :lol:

EDIT: gonna tell you my secret, because I cannot keep it it! :lol:
I'm going to take all the tank parts, and mix them up.
a random hull, random tracks, random turret, random gun. Sounds STUPIDLY FUN!!! :lol: :lol:
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: One guestion about random numbers.

Post by freddy »

lol! go for it! i know it works for weapons but havent tried on other parts, should work tho :)

and it is more like a counter, seems to start with the second object listed when you load a map

viewtopic.php?f=43&t=1749
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: One guestion about random numbers.

Post by Vilespring »

I got some results. When first testing it, it was great. Then, I noticed, that all it does is pick the SAME 7 COMBINATIONS, AND LOOPS THEM!!! :(
Is there a way to make it more.... random?

There is, theoretically, 2401 combinations, but it only gets 7. I don't want to to make each individual combo and have a spanner randomly make one.

so, I need a more random random number generator. (if that makes any sense :lol: )
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: One guestion about random numbers.

Post by freddy »

nope no real random generator, but maybe if you make for example 5 base thingys (tanks or what ever) but then add 6 "random" of some other stuff (rotational bundle) to it, and 7 of the next (weapons on that rotational bundle), 8 of next thing you add and so on, then its gonna be asynchronous and give you more combinations
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: One guestion about random numbers.

Post by Vilespring »

so just add repeats to the numbers?
Thank god for the find and replace function :lol:
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: One guestion about random numbers.

Post by freddy »

5 tanks was a bad example hehe

but like 1 tank and say 3 ShermanTower, 4 different ShermanGunBase, then when tank #4 spawns it will have ShermanTower1 and ShermanGunBase4, when tank 5 spawns ShermanTower2 and ShermanGunBase1 etc

the more odd pieces you add in the chain the more combinations you get

Code: Select all

ObjectTemplate.create Bundle ShermanComplex
ObjectTemplate.addTemplate ShermanTower
ObjectTemplate.setPosition 0/-0.8/0
ObjectTemplate.setRandomGeometries 3

Code: Select all

ObjectTemplate.create RotationalBundle ShermanTower1
ObjectTemplate.addTemplate ShermanGunBase
ObjectTemplate.setPosition 0/1.95/0.77
ObjectTemplate.setRandomGeometries 4
Post Reply