HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Mr. Wizard, need some help over here!

09-16-2002, 04:51 PM#1
Mandork
Okey, sorry for the lousy mix of Matrix quotes, but anyway, I've got a problem (duh!). I would need some help with fixing this up, first of all to make it work and second of all to cut down the number of triggers. Thanks!

09-16-2002, 07:20 PM#2
Guest
The only obvious thing that stands out as wrong is that in that for loop you said "from 18 to 1". Do from 1 to 18 instead. Other than that, I don't know, as you seem to have forgotten to mention what the problem is.
09-17-2002, 01:03 PM#3
Mandork
Damn, you're right, I did forget that :)
Well, the problem is that I want to create a Circle of Power in a specified region, but it is only created in the middle of the map, where there is no region.. And I wan't it to go from 18 to 1, isn't that possible?
09-17-2002, 01:58 PM#4
h0pesfall
well from 18-1 you go backwards thus it returns nothing or maybe negative numbers
09-17-2002, 06:42 PM#5
Newhydra
Replace the create circle at center of centeregions[openslot] with create circle at XXX region, then tell me if it still creates the circle in the middle of the map...
09-17-2002, 07:30 PM#6
Mandork
When I specified a region it was created there, and not in the middle. I guess that has got something to do with the fact that I'm using a Region Array.. Is there some kind of work around?
09-18-2002, 10:35 AM#7
Guest
What exactly isn't working?
09-18-2002, 04:37 PM#8
Mandork
Wasn't I clear on that one? Oh well, here comes a brief description on what the finished trigger is supposed to do.
When someone sends the message /sell x I wan't to find an open "for-sale-slot" where a Circle of Power is to be placed and then the units that (hopefully) were selected are moved to about 500 points above that circle. The number of places are limited to 18 but whenever someone buys something that slot will be opened up for new sales. As you see, it's pretty much a buyers & sellers, but everyone can buy and sell.. Hope this helped you help me :)
Oh, and sorry if my English isn't the best, I'm Swedish :P
09-18-2002, 06:38 PM#9
Guest
Ok, you've told me what it's supposed to do. Now you tell me what it is doing.
09-18-2002, 07:04 PM#10
Mandork
I said that a few messages above, the CoP is created in the center of the map instead of in the center of the specified region, so my guess is that there's something wrong with the use of Region Arrays.
09-18-2002, 09:37 PM#11
Newhydra
Are you sure that the region array is defined before this function is called? (I've used arrays of regions successfuly in the past...)
09-19-2002, 02:05 AM#12
Draco
Also remember that you can't create, kill, move something at a 'moved' region or it will not work.
09-19-2002, 05:37 AM#13
Guest
Well, have you done anything to see if 18 to 1 does what you'd want it to? If not, that could be your problem. If it is the problem, I would suggest switching to 1 to 18 and then having the action run a trigger which sets OpenSlot to Integer A and then sets Integer A to 19.

Also do some checks to see if CircleRegions[OpenSlot] is where you expect it to be. Ping the minimap at it's center, center the camer on it, create a text display which shows you it's values.

Finally, try creating a different unit, for a different player to make sure it's not a problem with Player 11 or with the COP unit itself. I doubt this is the problem but if the above two are not it, then you have to start checking other things.
09-19-2002, 11:41 PM#14
dataangel
18 to 1 shouldn't cause any technical problems. The GUI is smart enough to know that if the second number is less than the first to start at the top and go down with each loop iteration.

Also, there are only three circumstances I know of where a unit you're trying to create will spawn at the center of the map:

1. You've given coordinates outside the map boundary
2. You're creating a unit in a region already taken up by another unit
3. There's isn't enough room for the unit

Try enlarging your region, and seeing if you can normally place a circle there.