Monty Posted May 20, 2012 Share Posted May 20, 2012 i alway use the code setElementModel(source, ID) is possible to specify some IDs and and say to get one of the accidentaly??? Link to comment
Kenix Posted May 20, 2012 Share Posted May 20, 2012 I don't understand what you mean. Explain better please. Link to comment
Wei Posted May 20, 2012 Share Posted May 20, 2012 like if he desides that he will have random skins like 1, 67, 100, 123, 213... that will chose the random of them i think Link to comment
Monty Posted May 20, 2012 Author Share Posted May 20, 2012 i need somthing like blazy said Link to comment
Stanley Sathler Posted May 20, 2012 Share Posted May 20, 2012 Do you wanna set a random skin to a certain element? If yes, you can create a table containing all available skins: mySkins = { 111, 67, 1, 100, 10, 213 } --Create a table with available skins Later, use math.random() to get a random number and insert to mySkins[random_number]: mySkins = { 111, 67, 1, 100, 10, 213 } setElementModel(theElement, mySkins[math.random(1, #mySkins)]) Link to comment
Smart. Posted May 20, 2012 Share Posted May 20, 2012 StanleySathler: There is an easier way to do this. We'll still use math.random but we wont take ID's from a table we'll just pick a random ID from 1 - 288 setElementModel ( yourElement, math.random ( 1, 288 ) ) Link to comment
Stanley Sathler Posted May 20, 2012 Share Posted May 20, 2012 @Seb, yes, I agree with you. But we need remember: between 1 and 288, there's some ID numbers that not exist. An example is the ID 8. Oh, and if he wanna set a specific group skin, maybe he must use a table. One love bro, Sathler. Link to comment
Smart. Posted May 20, 2012 Share Posted May 20, 2012 Oh shit, I never saw the specified part, my mistake Link to comment
Stanley Sathler Posted May 20, 2012 Share Posted May 20, 2012 Seb:>, haha, don't worry. - Monty, and you? Solved your problem? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now