wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Warcraft III Modding > Developer's Corner > Triggers & Scripts
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 05-11-2009, 06:36 AM   #1
cosmicat
Probably AFK
 
cosmicat's Avatar
 
Join Date: Feb 2009
Posts: 635

cosmicat will become famous soon enough (71)cosmicat will become famous soon enough (71)cosmicat will become famous soon enough (71)

Default [Spell Feedback] Reaver-type units

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: w3x Reaver.w3x (51.6 KB, 10 views)
__________________
+++++++++++[>++++++>++++++++++>++++++++++<<<-]>+.>+.++++.+>-.----.------.--.<.

Last edited by cosmicat : 05-15-2009 at 10:58 PM.
cosmicat is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 05-14-2009, 08:44 AM   #2
Archmage Owenalacaster
Laughs Derisively
 
Archmage Owenalacaster's Avatar


Project Member: PoC
 
Join Date: Jun 2006
Posts: 649

Submissions (1)

Archmage Owenalacaster is a jewel in the rough (180)Archmage Owenalacaster is a jewel in the rough (180)Archmage Owenalacaster is a jewel in the rough (180)

Race-Building Contest #1 Winner

Default

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.
__________________
I enjoy small text.
Resources: Custom Race System
JademusSreg.950, North American region on StarCraft 2
Archmage Owenalacaster is offline   Reply With Quote
Old 05-14-2009, 10:34 AM   #3
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,087

Submissions (19)

Anitarf has a brilliant future (888)Anitarf has a brilliant future (888)Anitarf has a brilliant future (888)Anitarf has a brilliant future (888)Anitarf has a brilliant future (888)Anitarf has a brilliant future (888)Anitarf has a brilliant future (888)Anitarf has a brilliant future (888)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

Couldn't you base the build scarab ability on charge gold&lumber or something? Why the triggered gold and lumber costs?
__________________
Anitarf is offline   Reply With Quote
Old 05-14-2009, 07:45 PM   #4
cosmicat
Probably AFK
 
cosmicat's Avatar
 
Join Date: Feb 2009
Posts: 635

cosmicat will become famous soon enough (71)cosmicat will become famous soon enough (71)cosmicat will become famous soon enough (71)

Default

Holy cow. <3
__________________
+++++++++++[>++++++>++++++++++>++++++++++<<<-]>+.>+.++++.+>-.----.------.--.<.
cosmicat is offline   Reply With Quote
Old 05-14-2009, 08:30 PM   #5
Hans_Maulwurf
root bloody root
 
Hans_Maulwurf's Avatar
 
Join Date: Mar 2007
Posts: 117

Hans_Maulwurf will become famous soon enough (52)Hans_Maulwurf will become famous soon enough (52)

Send a message via ICQ to Hans_Maulwurf
Default

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.
Hans_Maulwurf is offline   Reply With Quote
Old 05-14-2009, 09:10 PM   #6
Archmage Owenalacaster
Laughs Derisively
 
Archmage Owenalacaster's Avatar


Project Member: PoC
 
Join Date: Jun 2006
Posts: 649

Submissions (1)

Archmage Owenalacaster is a jewel in the rough (180)Archmage Owenalacaster is a jewel in the rough (180)Archmage Owenalacaster is a jewel in the rough (180)

Race-Building Contest #1 Winner

Default

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.
__________________
I enjoy small text.
Resources: Custom Race System
JademusSreg.950, North American region on StarCraft 2

Last edited by Archmage Owenalacaster : 05-14-2009 at 09:32 PM.
Archmage Owenalacaster is offline   Reply With Quote
Old 05-14-2009, 09:28 PM   #7
Szythe
User
 
Join Date: Sep 2006
Posts: 320

Submissions (3)

Szythe has a spectacular aura about (143)

Spell Making Session 11 WinnerSmiley contest 4th and 5th place.Mapping Contest Third PlaceSpell making session 08

Default

If a unit dies while it's making a "scarab", the process is not stopped and the unit continues to make and store scarabs.
Szythe is offline   Reply With Quote
Old 05-14-2009, 10:12 PM   #8
Alevice
It feels good
 
Alevice's Avatar
 
Join Date: Mar 2006
Posts: 1,305

Alevice is a jewel in the rough (190)Alevice is a jewel in the rough (190)Alevice is a jewel in the rough (190)

Default

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!
__________________
_-|-_

Alevice.jones is SC2 Beta, losers.

Check out my never updated deviantart gallery!!

Kalimdor Raiders (Race Contest #1) Pastebin Page
Cavern Crawlers (Race Contest #2) Pastebin Page
Airship Race Motherfuckers!
Quote:
Originally Posted by http://ajaxian.com/archives/would-you-like-a-_-with-that-new-library-gives-js-what-it-should-have#comment-276203
- Dont solve problems that dont exist.
- Improve the wheel, dont reinvent it.
- Port the wheel if it doesnt exist in your environment.
- Integrate the wheel into your project.
- Make sure you can replace your wooden wheel for a rubber one if someone else invents it.
Alevice is offline   Reply With Quote
Old 05-14-2009, 11:39 PM   #9
Hans_Maulwurf
root bloody root
 
Hans_Maulwurf's Avatar
 
Join Date: Mar 2007
Posts: 117

Hans_Maulwurf will become famous soon enough (52)Hans_Maulwurf will become famous soon enough (52)

Send a message via ICQ to Hans_Maulwurf
Default

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.
Hans_Maulwurf is offline   Reply With Quote
Old 05-15-2009, 01:39 AM   #10
Kyrbi0
~There we go~
 
Kyrbi0's Avatar
 
Join Date: May 2008
Posts: 2,908

Submissions (1)

Kyrbi0 is a jewel in the rough (156)Kyrbi0 is a jewel in the rough (156)

Send a message via MSN to Kyrbi0
Default

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).
__________________
My Projects, Resources, + Tutorials: ~Just got back from my mission. Glad to be back. Woot! :P~
=It was brought to my attention recently that the ":P" icon stands for "tongue-sticking out", and not the "smirky half-smile" I was using it for all these years. = Thusly I apologize for any unintentional juvenilization of my messages to anyone so afflicted.=
Kyrbi0 is offline   Reply With Quote
Old 05-15-2009, 03:29 AM   #11
cosmicat
Probably AFK
 
cosmicat's Avatar
 
Join Date: Feb 2009
Posts: 635

cosmicat will become famous soon enough (71)cosmicat will become famous soon enough (71)cosmicat will become famous soon enough (71)

Default

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!
__________________
+++++++++++[>++++++>++++++++++>++++++++++<<<-]>+.>+.++++.+>-.----.------.--.<.

Last edited by cosmicat : 05-15-2009 at 03:34 AM.
cosmicat is offline   Reply With Quote
Old 05-15-2009, 11:06 PM   #12
cosmicat
Probably AFK
 
cosmicat's Avatar
 
Join Date: Feb 2009
Posts: 635

cosmicat will become famous soon enough (71)cosmicat will become famous soon enough (71)cosmicat will become famous soon enough (71)

Default

Significant update.
__________________
+++++++++++[>++++++>++++++++++>++++++++++<<<-]>+.>+.++++.+>-.----.------.--.<.
cosmicat is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 03:03 AM.


Donate

Affiliates
The Hubb http://bylur.com - Warcraft, StarCraft, Diablo and DotA Blog & Forums The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2014, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services