HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

[Spell Feedback] Reaver-type units

05-11-2009, 05:36 AM#1
cosmicat
This script and OE data mimics the Starcraft Reaver style of unit - one that has to build things to attack. Plus a little extra, of course. Calibration can take a really long time, due to the number of variables involved, but other than that it's pretty easy to use, I think. Any suggestions on how to streamline this or make it more portable (do I use too many weird systems?) would be much appreciated.

Edit: To clarify, a "Reaver" is a unit that builds "Scarabs," which are automatically loaded into the unit. The Reaver uses the Scarabs to attack, so each time the Reaver attacks it loses a Scarab. To be able to keep attacking, the Reaver must continually be building Scarabs.

Note: There are still a number of things that are not easy to calibrate, mostly because there's far too many global thingies as is.

Note 2: Even though I'm posting the code, I recommend that you download and run the test map to see how it actually works, because a lot of what's involved relies on object data.

Without further ado, here's the spell.

Expand Reaver:

Edit: Odd. It seems vBulletin wants to apply URL tags to stuff inside Jass tags.

Edit: Updated with a few bug fixes and some useful features.
Attached Files
File type: w3xReaver.w3x (51.6 KB)
05-14-2009, 07:44 AM#2
Archmage Owenalacaster
I think most of your global booleans can be moved below the configurable block, or at least in a sub-block in the configuration globals. That is, I can't imagine why a person would want to permit multi-building of scarabs. But I guess the option should be available. By the way, have you tested scarab multi-building?

You could replace the region events with either unit summon & death events. Or the former may be unnecessary; the enter region event would be unnecessary if the unit is created by script, because then it could be handled by the spell effect event trigger.

Some of your globals could be included in the structs, I think, as private static members.
05-14-2009, 09:34 AM#3
Anitarf
Couldn't you base the build scarab ability on charge gold&lumber or something? Why the triggered gold and lumber costs?
05-14-2009, 06:45 PM#4
cosmicat
Holy cow. <3
05-14-2009, 07:30 PM#5
Hans_Maulwurf
nice thing. but you should improve one thing:
instead of using an ability, to build new rockets make it sell a unit. this way it would use the real game error, when you don´t have enough gold/lumber.
05-14-2009, 08:10 PM#6
Archmage Owenalacaster
No, Hans, it wouldn't display production due to the cargo hold display, would give the rally point ability to the unit, and it would disable abilities while in production.

EDIT: Ah, you mean selling instead of training. Sale is instant and scarabs are meant to have a production time.

EDIT 2: Levi convinced me selling a scarab unit, hiding & pausing it, running the progress display bar, then unhiding/pausing it may be viable.
05-14-2009, 08:28 PM#7
Szythe
If a unit dies while it's making a "scarab", the process is not stopped and the unit continues to make and store scarabs.
05-14-2009, 09:12 PM#8
Alevice
Quote:
Originally Posted by Archmage Owenalacaster
No, Hans, it wouldn't display production due to the cargo hold display, would give the rally point ability to the unit, and it would disable abilities while in production.

EDIT: Ah, you mean selling instead of training. Sale is instant and scarabs are meant to have a production time.

EDIT 2: Levi convinced me selling a scarab unit, hiding & pausing it, running the progress display bar, then unhiding/pausing it may be viable.

You could even recycle them in case the reaver dies!
05-14-2009, 10:39 PM#9
Hans_Maulwurf
What I meant, was just another way of registering an event, when the player wants to build new rockets. The unit at sale is just a dummy, that gets removed instantly. It would work the exact same way as now, just with 'casting unit' replaced by 'selling unit' and 'unit casts spell event' with 'unit is sold event' in the trigger.
05-15-2009, 12:39 AM#10
Kyrbi0
Wow. I've always loved this idea (heck, all Starcraft -> Wc3 ideas ^_^), so it's good to see this working. No less in something that makes so much sense...

Anyway, just to clarify:
Quote:
Originally Posted by cosmicat
Edit: To clarify, a "Reaver" is a unit that builds "Scarabs," which are automatically loaded into the unit. The Reaver uses the Scarabs to attack, so each time the Reaver attacks it loses a Scarab. To be able to keep attacking, the Reaver must continually be building Scarabs.

Quote:
Originally Posted by Sc Wiki
Scarabs have a unique attack in StarCraft. Scarabs are built from the reaver itself, for a cost of 15 minerals each. The reaver can store up to 5 at one time. Often players will queue up all 5 as soon as the reaver is produced. The time to create a scarab is longer then a reaver's firing cooldown, so it is important to create new scarabs as soon as the reaver is no longer full.
Instead of having an actual attack, a Reaver launches a Scarab, which blindly explodes on the target (attacked) unit).
05-15-2009, 02:29 AM#11
cosmicat
Ah, good point. That gives the player more options where graphics are concerned as well, since a trail effect can be triggered for such an "attack type."

Edit: It also removes the need for at least one timer (scarab killing), since the reaver doesn't need to complete its attack for a scarab to launch.

Edit2: It also allows me to have more fun with Scarab capabilities; since I've been trained (in a very Pavlovian sense) to use global constants wherever practical, it's certainly possible to have the Scarabs cast a *spell* effect (with an arc) instead of exploding. Once a scarab has finished casting (hopefully near-instantaneous assuming no backswing or cast time), it can die and be removed from the group. Yay!
05-15-2009, 10:06 PM#12
cosmicat
Significant update.