Staredit Network

Staredit Network -> UMS Assistance -> Centering on 20x12 squares
Report, edit, etc...Posted by Wilhelm on 2006-07-06 at 23:27:39
I'm not sure how I could go about doing this. I'm using 20x12 squares for the dungeons, towns, and various building interiors for an RPG. As such, I need some kind of trigger set up that will only let the player view one square at a time, and detect when they leave that square. I don't want to use locations for each square, or one for each row and each column, as RPGs use alot of locations.

I currently have map revealers belonging to P12 in the center of each square, three locations, one 256x1 for finding the vertical placement, one 1x256 for the horizontal, and a 20x12 location to center on the squares and detect if the player has left it. I've spaced the 20x12 squares 4 tiles down and 4 tiles to the right, since I will probably need units to find the x and y coordinates.

I suppose it'd be easier to understand if I posted the map:
[attachmentid=19842]
Report, edit, etc...Posted by Corbo(MM) on 2006-07-07 at 00:11:41
Detect when the unit enters the dungeon, cave or w/e. You say you don't want to use 1 location ok.
Assuming you have a location at "entrance" or else i wouldn't know how you move units to dungeons tongue.gif. detect when the player brings a unit at that location and then center a big location on a Spider Mine/cloaked unit/Burrowed unit that is on the center, then just center view to that location....i really didn't read the hole post i just read key words so i hope this is what you need tongue.gif
Report, edit, etc...Posted by Wilhelm on 2006-07-07 at 01:03:20
The problem with that method is that I'll need locations for every entrance/exit, and it doesn't solve the problem of having to center on a square without using a location for each one.

It's essentially exactly what I don't want to do.
Report, edit, etc...Posted by Shocko on 2006-07-07 at 02:46:37
its late so i cant look at ur map right now but im pretty sure you could do this co ordinate system lethal_illusion taught me for it thats about it it works something like this

p7 p8 p9 p7 p8 p9
p8
p9
p7
p8
p9

u have a two locations center and then if they bring 1 p8 at y axis and p7 is set then theyve gone right if they bring 1 p9 but p8 is set it adds 1 if they bring 1 p7 and p9 is set it adds one and then vice versa (same for each side)

note: the location will have to be 2x the length and width so that itll allways be able to touch y axis and x axis

if u need me to ill go into more detail
Report, edit, etc...Posted by Zeratul_101 on 2006-07-07 at 11:25:13
giving units goes from left to right, then bottom to top?

i suggest a counter method, where you'd give zerglings from p12 to another player and center on p12's units(like a grid).

you'd need a unit at each entrance/exit, like this, assuming its four entrances and its a 3 V by 4 H grid:

............................................hydra(+1)

Drone(-3).........................................................................Infested Terran(+3)

............................................defiler(-1)

R = Room

R...R...R...R
................
R...R...R...R
.................
R...R...R...R

thats how your rooms would look normally. this is how it would look according to the counters:

2...5...8...11
..................
1...4...7...10
.................
0...3...6...9

the numbers represent how many of p12's zerglings should be given away in order to center view on that room.

this is the basis of the system, i'll let you figure out the specifics, but i'll explain it later if you need me to. ps, this is conceptual(for me), but its simple enough that it should work.

of course, depending on your needs, you'll tweak the numbers accordingly

ADDITION:
ps this assumes you have a location on top of the unit
Report, edit, etc...Posted by Shocko on 2006-07-07 at 11:28:27
my system doesnt involve giving units mellow.gif and itd work fine and like it cant go wrong so iunno if he wants to use it he can ask and ill go into more detail for him
Report, edit, etc...Posted by Shocko on 2006-07-07 at 11:32:57
"my system doesnt involve giving units " when did i say theyre not bringing. pre placed for like p9 10 11 or something and then bam ur off sure it does bring but if u set it out so there is 1 in each square going across the x and y axis then u can only bring one and as of what im aware of the order that SC works has nothing to do with pre placed units or sumbody bringing a unit to 1 location as opposed to another
Report, edit, etc...Posted by Zeratul_101 on 2006-07-07 at 11:40:41
okay, my bad, but giving units is MUCH simpler than having switches for every coordinate. not to mention your system calculations has up to 4 switches on at one time, leaving a huge possibility of error. it also requires 7 switches(3x4), needs to have triggers for every specific scenario, and doesn't have anything to center screen on.
Report, edit, etc...Posted by Shocko on 2006-07-07 at 11:51:37
ok just to get this clear there will be 6 switches in total (7y 8y 9y 7x 8x 9x) or death counters w.e floats your boat and only 2 will be set at a time (the x and the y) and itll clear as you go left or right up or down because u change ur setting.

it can be showed like this

7 8 9 7 8 9
8-------|
9-------|
7-------x----
8-------|
9-------|

--7 8 9 7 8 9
8-----|
9-----|
7-----x-------
8-----|
9-----|
this shows that youve gone left 1 (subtract 1 death or mineral to show ur co ordinate or record it if u want)

then its like

Switch 7x Is Set
P9 Brings 1 Zergling To Y

Subtract 1 (co ordinate which will be gas, ore or death counters)
Clear 7x
Set 9x

then the triggers will sorta be like that and when you go up itll be like this

Switch 9x Is Set
P7 Brings 1 Zergling To Y

Add 1 (co ordinate which will be gas, ore or death counters)
Clear 9x
Set 7x

you can center screen on the locations going X and Y because they will be centered on your unit and so the center of that location is where it centers thus itll be centered on your unit so if this is what you want then bam

Addition: on the graphs the lines going to the | e.g -------| those dont mean anything but when i used spaces it didnt work so yeah ------- it was
Report, edit, etc...Posted by Zeratul_101 on 2006-07-07 at 11:59:06
from what i can tell, your system calculates your position after you've moved into another square. he wants the unit to stay in screen. what your system apparently does is center the screen onto the unit after it has moved into the other square.

how big is your locations? the width/length of the map?

when you use grid systems, all those locations cannot be on the very edges of the map.
Report, edit, etc...Posted by Shocko on 2006-07-07 at 13:10:53
"I need some kind of trigger set up that will only let the player view one square at a time, and detect when they leave that square."

my system clearly does that.

its not a grid system as such and by hitting the side of the map it wont make a difference because itll still be able to touch the mine if u make it just over 2x bigger then they actual dungeon that way he can allways detect where hes moving to / from and it cant et screwed up i wish hed hurry up and choose so we can stop debating on this ^_^
Report, edit, etc...Posted by Zeratul_101 on 2006-07-07 at 13:59:48
yes, but how will they leave the square if you can't see the other rooms.

wilhelm better get here soon.

or we can both make a map with our systems.
Report, edit, etc...Posted by Shocko on 2006-07-07 at 14:28:11
I'm using 20x12 squares for the dungeons, towns, and various building interiors for an RPG. As such, I need some kind of trigger set up that will only let the player view one square at a time, and detect when they leave that square. I don't want to use locations for each square, or one for each row and each column, as RPGs use alot of locations.

ok i re read this and it turns out when he reffered to squares he ment the dungeons (he should of been more clear in my opinion) so im not entirely sure what to do without thinking properly (i cant be bothered to) but im pretty sure in a sense u could use my co ordinate finder to determine which square there in ( for example death is atleast 1 at most 5 X) then their in box 1 or something for example

1 2 3 4 5 6 7 8 9 10
1| | | | | | | | | | | | |
2| | | | | | | | | | | | |
3| | | | | | | | | | | | |
4| | | | | | | | | | | | |
5| | | | | | | | | | | | |

so say X1 - X5 = Square 1's Length
and 1Y - 2Y was Square 1's Width

IF

Current Player As Suffered Atleast 1 X
Current Player As Suffered AtMost 5 X
Current Player As Suffered Atleast 1 Y
Current Player As Suffered AtMost 2 Y

Some sort of visioning trigger for that room for that player
PreserveTrigger

thats all i can think of for actions really just vision im not sure ud need to reset the X and Y's for the player and yeah that works fine in which care id advise a

1x? and a ?x1 location ( ? = the map size or dungeon sizex2 your choice )
Report, edit, etc...Posted by Zeratul_101 on 2006-07-07 at 14:35:23
i still don't get what the basis of your system is. the 12x20 location will be directly on top of the 12x20 room for the entire time the player is in there. while your trigger is technically correct, it doesn't really accomplish anything. it centers your room on a room you're already centered on and once again, you haven't addressed the issue of moving to another room.
Report, edit, etc...Posted by Shocko on 2006-07-07 at 15:50:27
ill i understand from his post is that he wants to detect what room their in or something along those lines so my system ill do that it may not be the most efficient system in ways but i read his post wrong and i just span it off into a way thatd work to what i thought he posted (after reading a 2nd time) but sure anything is fine ( i personally think mine would be quite efficient location wise, maybe not entirely efficient triggerwise but still itd work to sum extent if u did it the whole map centering view wouldn't work so really my system would need to be edited as it was because like if u save up 5 x co ordinates going right and then u go to the next place itll start at 5 so in theory itd have to be like

atleast 1 at most 5 on one trigger then

atleast 5 at most 10 on another and just carry it on like that. which i think would work on detecting which room there in and wilhelm please make ur mind this battle for the efficient system isn't going anywhere biggrin.gif
Report, edit, etc...Posted by KinG_JaKe on 2006-07-07 at 16:44:23
Could you use an AI script to turn the lights off then somehow get to where you can only see the guy -like centering a location on a guy then createing and destroying a unit for the comp over the guys head. -will that even work? GL u got me
Report, edit, etc...Posted by Shocko on 2006-07-07 at 17:22:31
QUOTE(KinG_JaKe @ Jul 7 2006, 12:44 PM)
Could you use an AI script to turn the lights off then somehow get to where you can only see the guy -like centering a location on a guy then createing and destroying a unit for the comp over the guys head. -will that even work? GL u got me
[right][snapback]519581[/snapback][/right]


dont point out the obvious on the light switch -_- and ermm i still think my way my work most efficiently but id probably have to say go with Zeratul seeing as his is probably easier to do and w.e its all good
Report, edit, etc...Posted by Zeratul_101 on 2006-07-07 at 23:05:14
QUOTE(Shocko @ Jul 7 2006, 01:50 PM)
ill i understand from his post is that he wants to detect what room their in or something along those lines
[right][snapback]519517[/snapback][/right]


really, i got the idea that he wanted something along the lines of the puzzeling, but with fewer locations.

did you even dl the map?

cause i didn't
Report, edit, etc...Posted by Wilhelm on 2006-07-08 at 00:55:38
Well that explains why your idea is a bunch of crap. I can't have exits and entrances on OPEN AREAS. I'm not going to have every single square be closed off, so anything referring to entrance/exit is useless to me. I can figure out exit and etrance triggers myself, they're not hard.

Shocko, I was extremely tired yesterday and I didn't try your method because I wasn't sure if I'd even be able to process it. I'll try it now and tell you how it works, but perhaps you could post an example map?
Report, edit, etc...Posted by Zeratul_101 on 2006-07-08 at 02:01:03
really? what did i miss? do you actually need the 256x1s for anything except detecting where you are?

from what i gathered on your post, you need:

-screen centered on one square

my system does this by centering the 20x12 on one of p12s zerglings and centering view on the 20x12

-screen adjusted to center on new square

originally planned by using the 4exits/4units system, but can easily be adjusted by centering the screen based on new unit/counter data recieved upon moving to the edges of the map.

-detecting if someone has left their square

player brings 0 to 20x12?
their new location can be determined by the counter #


ps aren't dungeons enclosed and have walls?

ADDITION:
as an added bonus, this system only requires 2 locations. why does your map layout show open squares, yet your post talks about enclosed spaces?
Report, edit, etc...Posted by Wilhelm on 2006-07-08 at 05:07:07
it's because I haven't put in any of the actual terrain, those are just to show were the squares WILL go. I put in some walkable because I was trying a system. You apparently have only read five words from each of my posts. Either post something useful or leave my thread. I need a system to focus on EACH SINGLE SQUARE, SOME OF WHICH WILL BE OPEN AND CONNECTED TO SURROUNDING SQUARES, SOME WILL NOT. I can't have exit/entrance locations or units because not only will it be wasteful, not all squares will have such designated entrances and exits. Okay?

Not getting much actual help here.
Report, edit, etc...Posted by Red2Blue on 2006-07-08 at 06:09:05
A system like that would require a location on every square and a macro program.
Unless... you are into really headache grids... :/
Report, edit, etc...Posted by Rantent on 2006-07-08 at 06:15:47
Well if you don't want to simply use a burrowed unit in the middle of each location, and use that to center; you could always make it so there would be a gridwork to find the center of each.

A mobile grid would work fine, simply starting with a single unit in one area of the map, and move to each room with a number of creating and removing units. Each area would have a different number assigned to it. It wouldn't be 100% excact square for square, but it would work fine for any sort of 12x20 square system you set up.

Once you set the location centered upon each room, you could use smaller grid systems to set up the locations in each room, granted these would be different for each room and might take some testing.

It wouldn't use any lasting units, and could do what your asking I think.
Report, edit, etc...Posted by Shocko on 2006-07-08 at 10:49:34
when i saw rantent in this thread i assumed its all over because rantent = <3 hawt sex <3 and so i guess you wont be needing my help anymore and im not entirely sure what your trying to do without the seeing the map and actually talking to you so my idea may even be completely wrong so w.e if you want me to make a test map or anything just pm me or message me on starcraft as Shocko[xM]@USEast
Report, edit, etc...Posted by Wilhelm on 2006-07-08 at 11:17:21
Rantent, I am going to use a burrowed unit or something else to that effect, but the problem is FINDING the unit. If I have a 20x12 location center on the main unit, a unit leaving via the corners of the square would more than likely mess up the system. If a unit was put in the edges of four squares it wouldn't find the right square, either.

Also, Red, you don't need a macro program, a location for each square, or a super complex grid system to do this, I've done it with horziontal and vertical locations on each row and column, but this is a very inefficent system. It seems you didn't really read my first post (or any other).

Shocko, if you can't help me here, I don't see how you'd be able to help me over B.net. I don't want to have to go through the troubles of waiting for you in Op SEN.

If you guys need a visual example of what I'm talking about:
v-Hero Unit
[ .][ ][ ]<-- Map squares
[ ][ ][ ]
[ ][ ][ ]
The player sees:

[ .]

Player moves to the next square:

[ ][. ][ ]
[ ][ ][ ]
[ ][ ][ ]

Player sees:
[. ]

As you see, the players vision is locked on that particular square, and never inbetween them.
Next Page (1)