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:28 am]
NudeRaider -- EUD actions, specifically. The conditions remained. Today we can even have actions again, but they're all virtualized/whitelisted (not sure on the actual technical implementation) so you can only use them for specific intended purposed, not arbitrary code injections.
[06:26 am]
NudeRaider -- I mean yes, maps - through EUDs - were theoretically able to do that as well, but that was patched quickly.
[06:25 am]
NudeRaider -- Symmetry
Symmetry shouted: Ohhh imagine a SC map that could delete itself
not the map, the editor
[02:28 am]
Symmetry -- I vaguely remember Voy doing some ACE back in the day, but I had no idea EUDs could do that kind of shit. I am very much catching up on the technology
[02:28 am]
Symmetry -- Ohhh imagine a SC map that could delete itself
[2026-7-15. : 8:51 pm]
NudeRaider -- Symmetry
Symmetry shouted: NudeRaider Is EUD editor capable of writing shit onto the player's harddrive? That seems like it would be dangerous
yeah an editor that isn't allowed to write files sounds rather pointless, so I'd assume it can. Like most other programs too btw. and yes, obviously that's dangerous, but also kinda necessary. MS introduced that virtualization for exactly that reason.
[2026-7-15. : 4:10 am]
Ultraviolet -- I don't think so. I think they shut that shit down after 1.16, maybe even earlier
[2026-7-15. : 2:19 am]
Symmetry -- NudeRaider
NudeRaider shouted: Symmetry I can't tell if it's relevant. You provided literally no context so I was providing an equally generic answer.
Is EUD editor capable of writing shit onto the player's harddrive? That seems like it would be dangerous
[2026-7-14. : 11:43 pm]
Ultraviolet -- let's take each other's clothes off :teach:
[2026-7-14. : 11:03 pm]
Vrael -- :teach:
Please log in to shout.


Members Online: Excalibur