Hi all,
Can anyone please help with a solution to this?
I dont want to pick the same mesh twice or three times from the character array during the loop...
This is very basically what I'm doing...
Bob = loadmesh("bob.b3d") ;character 1
Fred = loadmesh("Fred.b3d");character 2 and so on up to 16
Jill = loadmesh("Jill.b3d");character 16
Dim characterarray$(16)
characterarray(0) = Bob
characterarray(1) = Fred ;...and so on up to 16
characterarray(16) = Jill
Then I set up a loop to do this...
For spawn = 0 To 2
r.character = New character
randcharacter = Rand(0,16)
mesh = characterarray$(randcharacter)
r\mesh = CopyEntity(mesh)
Next
So what I'm doing is generating 3 random characters from an array of 16. What Im trying to achieve is how to NOT pick the same character twice or three times during the loop.
Any help on how to do this would be appreciated. Thanks.
Can anyone please help with a solution to this?
I dont want to pick the same mesh twice or three times from the character array during the loop...
This is very basically what I'm doing...
Bob = loadmesh("bob.b3d") ;character 1
Fred = loadmesh("Fred.b3d");character 2 and so on up to 16
Jill = loadmesh("Jill.b3d");character 16
Dim characterarray$(16)
characterarray(0) = Bob
characterarray(1) = Fred ;...and so on up to 16
characterarray(16) = Jill
Then I set up a loop to do this...
For spawn = 0 To 2
r.character = New character
randcharacter = Rand(0,16)
mesh = characterarray$(randcharacter)
r\mesh = CopyEntity(mesh)
Next
So what I'm doing is generating 3 random characters from an array of 16. What Im trying to achieve is how to NOT pick the same character twice or three times during the loop.
Any help on how to do this would be appreciated. Thanks.