Winboats
Mar 29 2009, 10:52 pm
By: Biophysicist  

Mar 29 2009, 10:52 pm Biophysicist Post #1



Here's a little technique I figured out for making naval units work in mods, without any of the usual problems with naval units such as vision getting fucked. There are a few parts to it.

Part one: Setting up the Water terrain and locations.
1: Use some tileset editor to make sure that water is the only Low terrain on each tileset with water. Also, mark the water as walkable.
2: Use LocUnlock to set up a location (which I'll be calling LOC1 here) that covers the whole map and is only at the Low Ground elevation level.
3: Create another location (which I'll be calling LOC2 here) which is slightly larger than the largest land unit in the mod.
4: Remove the Factory flag (in the StarEdit tab of DatEdit) from all units, then set the Factory flag on all land units (but not air/water units).
5: Now, have a trigger constantly Centers LOC2 on [Factory] owned by Current Player at LOC1.
6: Have another trigger that runs the Enter Nearest Transport AI script at LOC2 if Current Player Brings at least 1 [Factory] to LOC2.
7: Now, define your naval units as land units.
Now, ships can move on water, because it's walkable. However, if a player tries to use a transport to put ground units on water, a trigger will push them back into the transport! (If you're confused about what I mean by "the Factory flag" and [Factory]: The Factory flag is used in non-modded SC to allow triggers to affect only buildings which produce units, kind of like how you can make a trigger only affect Men or only affect Buildings. Here, we are repurposing it to instead provide a convinient way to make our triggers run on only land units.)

Now, there is a problem, which is that the ships' vision gets fucked up because of the terrain height. So, in the next step, we will fix that.
1: Set your ship production buildings to not actually build the ships, but instead to produce some arbitrary air unit.
2: Use a trigger to create the ship (in the water [I'll leave the exact method of getting the ship to appear in the water up to you] ) when the player has that air unit. In the same trigger, create some air unit (I'll call it VISIONUNIT) on top of the ship for the player who owns the ship. Also, create some air unit (I'll call it CYCLEUNIT) for P12 at the same position. VISIONUNIT and CYCLEUNIT should both be flying, invisible, cloaked, invincible, and unselectable. Make sure neither are flagged as Men in the StarEdit tab of DatEdit.
3: Create a location (I'll call it LOC3). It should be pretty small.
4: Have a trigger constantly center LOC3 on CYCLEUNIT owned by P12 at LOC1.
5: Have a second trigger that centers LOC3 on [Men] owned by Any Player at LOC3, then moves all VISIONUNIT and CYCLEUNIT at LOC3 to LOC3, and gives 1 CYCLEUNIT owned by P12 at LOC3 to P11.
6: Have a trigger that gives all CYCLEUNIT owned by P11 to P12 if P12 doesn't have any CYCLEUNITs.
So, basically, the VISIONUNIT provides vision for the ship. The triggers make sure that the VISIONUNIT stays with the associated ship.

I also have a method for making naval transports work. I'll post it once I figure out how to explain it.

Did I explain my technique well, or did I confuse you? I'll be happy to re-explain it if you want.



None.

Mar 30 2009, 12:15 am Magicide Post #2

Sleeping wolves wake hungry.

Permission to do this and then shout "I'M ON A BOAT"




Mar 31 2009, 8:14 pm bajadulce Post #3



Quote from name:TassadarZeratul
Did I explain my technique well, or did I confuse you? I'll be happy to re-explain it if you want.
How about upload an example? I'd like to see it in action plz.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[07:46 am]
RIVE -- :wob:
[2024-4-22. : 6:48 pm]
Ultraviolet -- :wob:
[2024-4-21. : 1:32 pm]
Oh_Man -- I will
[2024-4-20. : 11:29 pm]
Zoan -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
[2024-4-20. : 8:20 pm]
Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
[2024-4-20. : 8:20 pm]
Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
[2024-4-20. : 8:18 pm]
Ultraviolet -- Oh_Man
Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
oh ya I saw that when Armo posted it on Discord, pretty crazy
[2024-4-20. : 8:09 pm]
Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
[2024-4-20. : 8:09 pm]
Vrael -- woo baby talk about a time crunch
[2024-4-20. : 8:08 pm]
Vrael -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
so that gives me approximately 27 more years to finish tenebrous before you get to it?
Please log in to shout.


Members Online: Ultraviolet, Roy