Nameless2you Posted May 19, 2012 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 351 Reputation: 52 Joined: 11/15/11 Last Seen: June 15, 2015 Share 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 Link to comment Share on other sites More sharing options...
MarkZD Posted May 20, 2012 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 134 Reputation: 35 Joined: 02/27/12 Last Seen: April 5, 2022 Share 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 Link to comment Share on other sites More sharing options...
Lighta Posted May 20, 2012 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 737 Reputation: 216 Joined: 11/29/11 Last Seen: December 20, 2020 Share 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 Link to comment Share on other sites More sharing options...
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.