Warp and epic explosion scripts, my gift to you

Post Reply
User avatar
Ardis
Terran Nuclear Silo Safety Inspector
Terran Nuclear Silo Safety Inspector
Posts: 228
Joined: Tue Sep 05, 2006 5:03 pm
Location: Ohio, USA

Warp and epic explosion scripts, my gift to you

Post by Ardis »

Well, because my computer hates Starcraft and many other issues that all combined equal "Your Starcraft mod will never be finished." I give up. I doubt I will finish my Starcraft mod... ever. My mind is constantly throwing out current ideas and finding the ones I want to implement... impossible. So, basically, I'm going to either step out of modding entirely and wait until I get a chance to work with others to make a brand new engine from the ground up or I'm going to work with others (/shudder) make some lesser projects that won't touch my Iron Wars ships because I don't want anyone to mess with those, story, etc. However, I don't want this to be an entire loss, so I'm going to share with you the warp script that I made for ships that couldn't have happened without the help of the helpful people here. I hope to see this script put to good use. I've included comments with it to try to explain what does what. Feel free the ask questions, I will try to check in on this thread once in a while to answer, but don't expect immediate responses.

Code: Select all

DropshipWalkingToIdle:
	setvertpos     	1
	setflspeed	864 #used to set the speed back to normal after the ship exits warp because of the acceleration period shown later
	waitrand       	8 10
	setvertpos     	2
	waitrand       	8 10
	setvertpos     	1
	waitrand       	8 10
	setvertpos     	0
	waitrand       	8 10
	goto           	DropshipWalkingToIdle

DropshipWalking:
	imgol          	225 0 0	# DropshipGlow (thingy\tdrGlow.grp)
	setvertpos     	0
	wait		425  #warp charging time, adjust as you like
	goto           	DropshipLocal03

DropshipLocal03:
	setflspeed	3200 #temporarily raises max velocity for the unit so it appears to accelerate into warp
	setvertpos     	0
	wait		92 #unit will start to accelerate at this period before going into actual warp, consider extending
	playsnd        	110	# Deflier Attack? (bullet\zdeatt00.wav)
	imgol		555 0 0 # EMP Shockwave Hit Part 1 (thingy\emp.grp)
	imgol		556 0 0 # EMP Shockwave Hit Part 1 (thingy\emp.grp)
	goto		DropshipMidwarp #this goes to the part where the unit is actively warping across the map and it loops this next part until the unit stops.

DropshipMidwarp:
	wait		1
	move		25 #Turn this value up or down to increase or decrease the warp speed
	imgol		555 0 0 # EMP Shockwave Hit Part 1 (thingy\emp.grp) #multiple of these are used because this one was written for a larger ship, needed to cover the whole thing
	imgol		555 0 -32 # EMP Shockwave Hit Part 1 (thingy\emp.grp)
	imgol		555 0 32 # EMP Shockwave Hit Part 1 (thingy\emp.grp)
	imgol		555 64 0 # EMP Shockwave Hit Part 1 (thingy\emp.grp)
	imgol		555 -64 0 # EMP Shockwave Hit Part 1 (thingy\emp.grp)
	goto		DropshipMidwarp #loops this part until the unit stops
	
I also think I should include the basic idea for my multiple explosions on death scripts. I feel that any large ship that takes up the full size of a sprite deserves more than one big explosion, so I put this together.

Code: Select all

BattlecruiserDeath:
	playsnd        	177	# Terran\BATTLE\tbaDth00.wav
	wait		2
	move		5
	playsnd        	7	# Misc\ExploLrg.wav
	imgol          	333 42 0	# TerranBuildingExplosionlarge (thingy\tBangX.grp)
	waitrand        7 12
	move		5
	playsnd        	7	# Misc\ExploLrg.wav
	imgol          	334 0 -32	# TerranBuildingExplosionlarge (thingy\tBangX.grp)
	waitrand	2 10
	move		5
	playsnd        	7	# Misc\ExploLrg.wav
	imgol          	334 0 42	# TerranBuildingExplosionlarge (thingy\tBangX.grp)
	waitrand	2 8
	imgol          	334 0 -42	# TerranBuildingExplosionlarge (thingy\tBangX.grp)
	move		5
	wait            4
	end            	
User avatar
Pr0nogo
Protoss Zealot Practice Dummy
Protoss Zealot Practice Dummy
Posts: 874
Joined: Wed Apr 08, 2009 3:59 pm
Contact:

Re: Warp and epic explosion scripts, my gift to you

Post by Pr0nogo »

Your warp script is very well-put together and could find a place in many of my projects. The multiple explosions script, while much less complex than your warp script, is also equally as useful.

I must ask, though; can the warp script be applied to any unit? I know that several of the other units don't have Local ### entries in them, so I wasn't sure how that would work out.
User avatar
IskatuMesk
Xel'naga World Shaper
Xel'naga World Shaper
Posts: 8332
Joined: Sat Feb 07, 2009 1:40 pm
Location: M͈̙̞͍͞ͅE̹H̨͇̰͈͕͇̫Ì̩̳CO̼̩̤͖͘ జ్ఞ‌ా
Contact:

Re: Warp and epic explosion scripts, my gift to you

Post by IskatuMesk »

Local is relative to the unit. If you are exporting/importing individually, you can assign local blocks without headers and never worry about it.

You can point to things other than locals for such instances where one doesn't exist. In most air units I think local is an idle that does not shift the graphic up and down.
Gameproc
Though we stand alone, stand we shall.
User avatar
Pr0nogo
Protoss Zealot Practice Dummy
Protoss Zealot Practice Dummy
Posts: 874
Joined: Wed Apr 08, 2009 3:59 pm
Contact:

Re: Warp and epic explosion scripts, my gift to you

Post by Pr0nogo »

Ah, that's good. Thanks much.
User avatar
Ardis
Terran Nuclear Silo Safety Inspector
Terran Nuclear Silo Safety Inspector
Posts: 228
Joined: Tue Sep 05, 2006 5:03 pm
Location: Ohio, USA

Re: Warp and epic explosion scripts, my gift to you

Post by Ardis »

Ideally, this is meant for a fleet mod with maximum size maps where your larger ships would enter warp to reach another part of the map. Originally, I wanted to make it so that the ship could not respond to orders while it was in warp, maybe even make it its own command/spell rather than an automatic feature, but I figured I shouldn't mess with something that works fine or I would ruin it or face the disappointment of finding such a task impossible.

EDIT: And yes, I was making it so that I could easily apply it to any unit. The reason it says Dropship on it is because I just copied that out of the Empire's Targe class Carrier (which replaces the Dropship). You just have to replace the word Dropship in the entries to match the unit you're adding it to. You can have as many local entries as you want, unless there is a limit that I haven't reached yet.
Last edited by Ardis on Mon Jul 04, 2011 8:39 am, edited 1 time in total.
User avatar
Pr0nogo
Protoss Zealot Practice Dummy
Protoss Zealot Practice Dummy
Posts: 874
Joined: Wed Apr 08, 2009 3:59 pm
Contact:

Re: Warp and epic explosion scripts, my gift to you

Post by Pr0nogo »

IIRC that's not impossible; TassadarZeratul did something like that with his cat mod on StarEdit.net a long ass time ago. Maybe I'm wrong though.

Thanks for the scripts, anyhow.
User avatar
Ardis
Terran Nuclear Silo Safety Inspector
Terran Nuclear Silo Safety Inspector
Posts: 228
Joined: Tue Sep 05, 2006 5:03 pm
Location: Ohio, USA

Re: Warp and epic explosion scripts, my gift to you

Post by Ardis »

No problem. I figure someone here will put it to good use, maybe even improve upon it. Plus, it wouldn't have been possible without the help of people here.

Also, it doesn't have to be called Local, either. Notice how there is one called DropshipMidWarp? As long as something calls for it in some manner, it will work.
User avatar
Pr0nogo
Protoss Zealot Practice Dummy
Protoss Zealot Practice Dummy
Posts: 874
Joined: Wed Apr 08, 2009 3:59 pm
Contact:

Re: Warp and epic explosion scripts, my gift to you

Post by Pr0nogo »

Righto, works like an everyday average script, then.

Thanks much for putting it together, and I'll be sure to credit you when I use it. You go by Ardis everywhere, or should I credit it to something else?
User avatar
Ardis
Terran Nuclear Silo Safety Inspector
Terran Nuclear Silo Safety Inspector
Posts: 228
Joined: Tue Sep 05, 2006 5:03 pm
Location: Ohio, USA

Re: Warp and epic explosion scripts, my gift to you

Post by Ardis »

I usually go by Ardis, but I sometimes go by Arvex instead if Ardis is taken.
User avatar
Pr0nogo
Protoss Zealot Practice Dummy
Protoss Zealot Practice Dummy
Posts: 874
Joined: Wed Apr 08, 2009 3:59 pm
Contact:

Re: Warp and epic explosion scripts, my gift to you

Post by Pr0nogo »

I'll put both in during the credits section.
User avatar
Lavarinth
Xel'naga Administrator
Xel'naga Administrator
Posts: 6539
Joined: Wed Aug 16, 2006 5:21 pm
Location: His Ashworld Planet

Re: Warp and epic explosion scripts, my gift to you

Post by Lavarinth »

Pic or I can't imagine it.
- - Lavarinth
Campaign Creations Administrator
User avatar
Pr0nogo
Protoss Zealot Practice Dummy
Protoss Zealot Practice Dummy
Posts: 874
Joined: Wed Apr 08, 2009 3:59 pm
Contact:

Re: Warp and epic explosion scripts, my gift to you

Post by Pr0nogo »

Unless he has some stock images, I'll implement it in a mod of mine and take a picture.
This is probably something similar to the warp images found in CC 2000, when The Fenix warped out after destroying a bunch of Zerg.
User avatar
Ardis
Terran Nuclear Silo Safety Inspector
Terran Nuclear Silo Safety Inspector
Posts: 228
Joined: Tue Sep 05, 2006 5:03 pm
Location: Ohio, USA

Re: Warp and epic explosion scripts, my gift to you

Post by Ardis »

I'll do better. How about a demo?

This demo was for an experimental unit that I never finished because I couldn't find a decent way to enforce a unique unit at the time. It was meant to be one of the few Syndicate units that were capable of warp and it would deploy into its gate mode and recall units to its location, maybe even create a persistent wormhole on the map that repeatedly recalled to it until cancelled if that were possible. It incorporates both my warp and explosion scripting, so I figured this would be a good way to demonstrate both scripts. For warp, just order it to move from one part of the map to the other and it kicks in after a moment. For the explosion script... Well, just get it killed of course.

File contents:
-LeviathanDemo.exe - Testing mod for the Leviathan for 1.15.1. I wanted to make sure everything on it was possible before I started putting parts of it in the main mod.
-X_LeviathanTest.scm - A map made to test it. Originally was going to transport units, too. (Might still do that depending how lazy I was.
You do not have the required permissions to view the files attached to this post.
Post Reply