Quantcast
Channel: Questions in topic: "javascipt"
Viewing all articles
Browse latest Browse all 1875

Add items from array to a new clone and give them values.

$
0
0
Hey guys, I have a script called Perks and in the script is 3 seperate Arrays all currently strings. An example of these is //likely to start fights "Agressive", //likely to steal money "Thief", //Drug addict, likey to steal from clients, high upkeep "Drug Addict", //low upkeep "Workaholic" I would like to make it so that when a clone is spawned one or more of these perks are added to it i already have MinPerks and MaxPerks variables attached to the clone and i'd want to spawn a random number of perks between the max and min and for them to be a random selection. I'd also like to give these strings values for example i'd like to check if the clone had the thief perk and if it did in crease the StealChance variable from 0.1 to say 0.6. I realise I'm asking alot and if I haven't given enough info I appologise. Thanks in advance for any help you can offer

Viewing all articles
Browse latest Browse all 1875

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>