Staredit Network

Staredit Network -> UMS Assistance -> Time in milliseconds required to make a DT
Report, edit, etc...Posted by HoCkEy_PUCK on 2006-01-04 at 18:36:58
I need to know the exact time required in milliseconds to create one Protoss Dark Templar. I'm producing a system to spawn a Dark Templar for Starcraft original users after a certain amount of time. This is what it looks like so far:

Trigger("Protoss Refugees"){
Conditions:
Bring("Current Player", "Men", "Warp in Dark Templar", At least, 1);
Accumulate("Current Player", At least, 125, ore);
Accumulate("Current Player", At least, 100, gas);
Command("Current Player", "Protoss Pylon", At least, 1);
Command("Current Player", "Protoss Gateway", At least, 1);
Command("Current Player", "Protoss Templar Archives", At least, 1);
Switch("DTWarp", set);

Actions:
Comment("Warp new DT (P6 meets DT warp requirements)");
Set Resources("Current Player", Subtract, 125, ore);
Set Resources("Current Player", Subtract, 100, gas);
Display Text Message(Always Display, "Warping in Dark Templar...");
Wait(15000);
Create Unit("Current Player", "Dark Templar (Hero)", 1, "Player Gateway");
Minimap Ping("Player Gateway");
Play WAV("staredit\\wav\\PDTRdy00.wav", 2151);
Preserve Trigger();
}

It's the darn wait time that I can't get correct. Everything else seems to work fine. The current time, 15000 milliseconds, spawns the Dark Templar approximately 2/3 into a regular Dark Templar warp. I could make it 25000 milliseconds and it would spawn at approximately the right time, but I'd much rather have an exact time for this.
Report, edit, etc...Posted by LegacyWeapon on 2006-01-04 at 18:47:17
Multiple triggers with waits tend to make the waits stack up.

I suggest you use a Death Counter in place of it.
http://www.staredit.net/index.php?tutorial=124

Or you can use a Physical Timer (which is easier to understand).
http://www.staredit.net/index.php?tutorial=167
Report, edit, etc...Posted by Urmom(U) on 2006-01-04 at 18:48:19
Umm, do you mean the build time?

(Unit Settings>Select unit>Look at build time)
Report, edit, etc...Posted by HoCkEy_PUCK on 2006-01-04 at 19:05:19
QUOTE(LegacyWeapon @ Jan 4 2006, 06:47 PM)
Multiple triggers with waits tend to make the waits stack up.

I suggest you use a Death Counter in place of it.
http://www.staredit.net/index.php?tutorial=124

Or you can use a Physical Timer (which is easier to understand).
http://www.staredit.net/index.php?tutorial=167
[right][snapback]398516[/snapback][/right]

What I'm trying to do is the equivalent of trying to build a Dark Templar in Brood War. This will accomplish the same thing as that, and will spawn them by a gateway that the player has built. This would be how it works:

1. Player places a unit on "Warp in Dark Templar" beacon
2. If player meets requirements for warping in a Dark Templar, text message "Warping in Dark Templar..." will appear on screen, and the appropriate amount of resources will be subtracted from the player's total
3. After the wait time is up, the Dark Templar will spawn at a gateway, a minimap ping will ping where it spawned, and the "Dark Templar Ready" wave from Brood War will play (signaling that said unit is ready)

I'm not quite sure if you understood this. I'm not trying to spawn a Dark Templar a certain way into the game, I'm trying to spawn it a certain time after the player requests one be made. By the way, I'm spawning a hero Dark Templar with the same stats as a Brood War regular Dark Templar. The whole point is to make the map compatible with Starcraft and not just Brood War.

QUOTE(urmom @ Jan 4 2006, 06:48 PM)
Umm, do you mean the build time?

(Unit Settings>Select unit>Look at build time)


The "seconds" that it lists for a unit's creation go by at a differnet pace than 1000 trigger "milliseconds" would, meaning that they aren't compatible and thus are useless for my purposes.
Report, edit, etc...Posted by in_a_biskit on 2006-01-05 at 06:33:42
The reason they're different is because the build time is based on game time (which you can speed up and slow down), whereas the 'wait' action is based on real time (which you can't change the speed of), which is kind of annoying, really...

I think the game speed which is just slower than the default speed gives game seconds which are equal to real seconds (someone can correct me if i'm wrong); but then again, playing at that speed is really quite slow for most people's preferences nowadays...

According to the Countdown Timer Tricks Tutorial, 3 game seconds = 2000 real milliseconds, on fastest speed. So take the build time for a DT and multiply by 2000/3 to get the number of milliseconds you should wait on fastest speed.

Alternatively, you can create a death counter timer, as LegacyWeapon suggested, instead of a wait action; this will avoid any problems with 'wait blocks', where wait actions cause each other to be delayed. This will also have the advantage of the time being proportional to the game speed, so you can play on an game speed without the game becoming unbalanced.
Report, edit, etc...Posted by PhoenixRajoNight on 2006-01-06 at 05:50:45
I'm pretty sure your not going to be able to accomplish what you want neways, regular sc cant make a dark templar, and if it did, it would probably crash sc in the proceess.

good way to make sure of this is when you save the map if it saves as scx or scm, most likely it will save as scx, then if it does happen not to, or you force it to save as acm try running it on regular sc, as i said tho, i dont think youll even get that far, because the dt would even only mentioned in a trigger has you save as scx, unless zeratul was in the first sc, i'm pretty sure he wasnt, been so long since i played the campaign, i dunno.
Report, edit, etc...Posted by HoCkEy_PUCK on 2006-01-10 at 11:41:26
QUOTE(PhoenixRajoNight @ Jan 6 2006, 05:50 AM)
I'm pretty sure your not going to be able to accomplish what you want neways, regular sc cant make a dark templar, and if it did, it would probably crash sc in the proceess.

good way to make sure of this is when you save the map if it saves as scx or scm, most likely it will save as scx, then if it does happen not to, or you force it to save as acm try running it on regular sc, as i said tho, i dont think youll even get that far, because the dt would even only mentioned in a trigger has you save as scx, unless zeratul was in the first sc, i'm pretty sure he wasnt, been so long since i played the campaign, i dunno.
[right][snapback]399836[/snapback][/right]

Both Zeratul and Dark Templar were hereo units available in the original Starcraft game and the Brood War game. That's why Dark Templar is listed under the hero units as well as the ground units.[CODE]

Both Zeratul and Dark Templar are hero units available in both the Starcraft and Brood War games. They are both listed under hero units. The only difference with Brood War is that you can build them, so they're listed under ground units, as well.

QUOTE
According to the Countdown Timer Tricks Tutorial, 3 game seconds = 2000 real milliseconds, on fastest speed. So take the build time for a DT and multiply by 2000/3 to get the number of milliseconds you should wait on fastest speed.


Thanks. That's what I needed.
Next Page (1)