Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Launching a Missile in a Direction
Launching a Missile in a Direction
This topic is locked. You can no longer write replies here.
Jul 16 2010, 12:02 pm
By: Kimaru2  

Jul 16 2010, 12:02 pm Kimaru2 Post #1



Well, I'm making a Portal map (from Valve) and it's coming along nicely so far. For those of you unfamiliar with the name, the game revolves around the idea that you create two types of portals (red and blue), which serve as entrances/exits in a room. You can go through portals, and so can most other things, like projectiles.

Now, what I need help on involves a Goliath shooting a missile at your character, which you must then use a portal to make the missile hit a disc. The Goliath may only shoot in 4 directions: up, down, left, right. I'm using four areas of detection: up, down, left right. I have 2 locations, one horizontal one extending the length of the map, and one vertical one, extending the length of the map. I need to know which direction the Goliath must shoot the missile if he finds your character in, say, to his right in the horizontal region. I'd appreciate if I didn't have to use cloaked units to track your position down. Here's the map:

Attachments:
Portal Test2.scm
Hits: 0 Size: 69.51kb



None.

Jul 16 2010, 12:47 pm NudeRaider Post #2

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

If the goliath is stationary just have 4 locations covering each side of the goliath.

If not, you can use the x- and y-axis locations. You center them on the goliath and have P12 2x2 buildings (e.g. creep colony) placed close to the top or bottom and left or right map edge. Always give the colonies to P12 and the colony inside the axis location to P11. Then center an air unit on the P11 x and y colonies and order it to move to the player unit. Then use a mobile grid to detect if it's flying up or down (from the x colony) and left or right (from the y colony), and you know in which direction to shoot the missiles: The direction you detect the air unit first.

Post has been edited 1 time(s), last time on Jul 16 2010, 12:55 pm by NudeRaider.




Jul 16 2010, 10:58 pm Kimaru2 Post #3



Quote from NudeRaider
If the goliath is stationary just have 4 locations covering each side of the goliath.

If not, you can use the x- and y-axis locations. You center them on the goliath and have P12 2x2 buildings (e.g. creep colony) placed close to the top or bottom and left or right map edge. Always give the colonies to P12 and the colony inside the axis location to P11. Then center an air unit on the P11 x and y colonies and order it to move to the player unit. Then use a mobile grid to detect if it's flying up or down (from the x colony) and left or right (from the y colony), and you know in which direction to shoot the missiles: The direction you detect the air unit first.

I was going to do that: make an air unit move to the player unit. But as I said, I'd really like to refrain from doing that to preserve visual effects.



None.

Jul 16 2010, 11:28 pm Roy Post #4

An artist's depiction of an Extended Unit Death

Depending on the distance the goliath has to detect the player, a simple option would be just creating a mobile grid (which can go up to 5x5 for a 1.5 grid without any fancy tricks). Then create large locations to center at each point of interest (up, down, left, right).

Quote
X X X X X
X X X X X
X X X X X
X X X X X
X X X X X
(Green being the center, where the goliath is, and red being the grid unit of interest for each of the four directions)

If the range is too small, you can always change the center point of the grid onto an already created grid unit and create more grid units from there.

This creates a more circular detection range, which would actually be more realistic.

Edit:

Just checked it and the result isn't as pretty as what was in my head.

Image


There's a lot of empty space, and filling it has extreme overlap. You could always make it a little more complex, though:

Quote
X X X X X
X X X X X
X X X X X
X X X X X
X X X X X
(Orange is smaller, square locations that also correspond with direction)

Image


Post has been edited 3 time(s), last time on Jul 16 2010, 11:45 pm by Roy.




Jul 16 2010, 11:43 pm NudeRaider Post #5

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from Kimaru2
I was going to do that: make an air unit move to the player unit. But as I said, I'd really like to refrain from doing that to preserve visual effects.
Yes, I read that, but I think you haven't thoroughly read my suggestion.
What I'm saying is a unit at the edge of the map. You don't need to give vision there and it won't be visible for the player.

EDIT:
Quote from Roy
There's a lot of empty space, and filling it has extreme overlap.
You could always make it a little more complex, though:
Not if you center the filling locations on the edge devourers (blue)
Quote from Roy
Quote
X X X X X
X X X X X
X X X X X
X X X X X
X X X X X
(Orange is smaller, square locations that also correspond with direction)





Jul 17 2010, 12:26 am Roy Post #6

An artist's depiction of an Extended Unit Death

Quote from NudeRaider
Not if you center the filling locations on the edge devourers (blue)
And what direction would that be? It's in the middle of two directions, and determining which direction to use would be more trivial.

Edit: My idea probably serves more use as an 8-direction system.

Post has been edited 1 time(s), last time on Jul 17 2010, 12:46 am by Roy.




Jul 17 2010, 3:10 am Kimaru2 Post #7



Well actually, Roy's first suggestion is very similar to what I ended up doing. Thanks



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06:47 am]
NudeRaider -- lil-Inferno
lil-Inferno shouted: nah
strong
[05:41 am]
Ultraviolet -- 🤔 so inf is in you?
[04:57 am]
O)FaRTy1billion[MM] -- my name is mud
[04:35 am]
Ultraviolet -- mud, meet my friend, the stick
[10:07 pm]
lil-Inferno -- nah
[08:36 pm]
Ultraviolet -- Inf, we've got a job for you. ASUS has been very naughty and we need our lil guy to go do their mom's to teach them if they fuck around, they gon' find out
[05:25 pm]
NudeRaider -- there he is, right on time! Go UV! :D
[05:24 pm]
lil-Inferno -- poopoo
[05:14 pm]
UndeadStar -- I wonder if that's what happened to me. A returned product (screen) was "officially lost" for a while before being found and refunded. Maybe it would have remained "lost" if I didn't communicate?
[2024-5-16. : 3:36 pm]
NudeRaider -- :lol:
Please log in to shout.


Members Online: 1madisonc1291rh3, 6madisone1185rb4, 9madisonc6491wh7, 4harpere47100er4