Nameless2you Posted May 19, 2012 Posted May 19, 2012 So I've come across this new command makeitem, it's pretty nice but I got 2 suggestions for it. Enable omitting x & y, so the item can be spawned randomly on the map. Enable x1,y1,x2,y2; that way you could specify the location of the item within a specific area. Quote
MarkZD Posted May 20, 2012 Posted May 20, 2012 (edited) About the first, it could be 0 0 as x & y, so this function would be random. About second, you can use rand function to get it, but it's a useful suggestion. Edited May 20, 2012 by MarkZD Quote
Lighta Posted May 20, 2012 Posted May 20, 2012 What would be the purpose of x1 y1 x2 y2, to spwan one item is the specific area ? Well you can already do the random x and y first to spawn in given are than invoque the fonction e.g .@x1 = xmin; .@y1 =ymin; //min xy of square '@x2 = xmax; .@y2 = ymax //max xy of square .@x = rand()%(.@x2-.@x1)+.@x1; //get a random x in square .@y = rand()%(.@y2-.@y1)+.@y1; //get a random y in square makeitem (601,1,.@x,.@y); but yeah could be easier if integrated to makeitem fonction, what the issue (well not that hard) will be to keep backward compatibility for current makeitem fonction. (like will need to add x2 and y2 as option...) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.