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 > Resources > Code Resources > Samples
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 02-17-2006, 01:04 AM   #1
shadow1500
STARCRAFT II OMFG
 
shadow1500's Avatar
 
Join Date: Jul 2004
Posts: 1,004

Submissions (9)

shadow1500 is just really nice (306)shadow1500 is just really nice (306)shadow1500 is just really nice (306)

Send a message via ICQ to shadow1500 Send a message via AIM to shadow1500 Send a message via MSN to shadow1500
Default Shield System

A system that allows you to create/remove shields, the shields can have an regeneration and armor value (in percentege).
UPDATE 1.1: Added credit, fixed leaks.
UPDATE 1.2: Added function CreateShieldEx with 2 arguments - shield color and damage spill option, also fixed problem with armor also blocking the damage spill.
Attached Images
File Type: jpg ShieldSystem.jpg (87.3 KB, 2478 views)
Attached Files
File Type: w3x Shield System 1.2.w3x (28.5 KB, 1120 views)

Last edited by shadow1500 : 02-18-2006 at 09:19 PM.
shadow1500 is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 02-17-2006, 01:32 AM   #2
Blade.dk
.
 
Blade.dk's Avatar


Respected User
 
Join Date: May 2005
Posts: 1,990

Submissions (15)

Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)

Approved Map: Azeroth's Arcane ArenaSpell session 01 winner

Send a message via MSN to Blade.dk
Default

This seems like a good and interesting system, you will need to update something before I can approve it though.

First of all, you are using KaTTaNa's Local Handle Variables functions. You need to give him credit for his work, else I can't approve this.

Second, you will need to do something like call FlushGameCache(InitGameCache("localvars.w3v")) before initializing the cache, else it can cause problems. Read more here: http://www.wc3jass.com/viewtopic.php?t=2334.

Also, you have a few locals-not-set-to-null leaks (texttags), you should better fix that.
__________________
Spell Making Course: Part 1: Making a simple stomp spell.
I wonder if I'll ever finish part 2.
Blade.dk is offline   Reply With Quote
Old 02-17-2006, 01:38 AM   #3
shadow1500
STARCRAFT II OMFG
 
shadow1500's Avatar
 
Join Date: Jul 2004
Posts: 1,004

Submissions (9)

shadow1500 is just really nice (306)shadow1500 is just really nice (306)shadow1500 is just really nice (306)

Send a message via ICQ to shadow1500 Send a message via AIM to shadow1500 Send a message via MSN to shadow1500
Default

oops srry, i modified my old spell and forgot to update those things, gona do it now.
shadow1500 is offline   Reply With Quote
Old 02-17-2006, 08:53 AM   #4
Blade.dk
.
 
Blade.dk's Avatar


Respected User
 
Join Date: May 2005
Posts: 1,990

Submissions (15)

Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)

Approved Map: Azeroth's Arcane ArenaSpell session 01 winner

Send a message via MSN to Blade.dk
Default

No problem, glad you updated it.

Approved.
__________________
Spell Making Course: Part 1: Making a simple stomp spell.
I wonder if I'll ever finish part 2.
Blade.dk is offline   Reply With Quote
Old 02-17-2006, 01:15 PM   #5
BertTheJasser
xyzi - our universe
 
BertTheJasser's Avatar
 
Join Date: May 2005
Posts: 742

Submissions (2)

BertTheJasser has a spectacular aura about (111)BertTheJasser has a spectacular aura about (111)BertTheJasser has a spectacular aura about (111)BertTheJasser has a spectacular aura about (111)

Default

Some time ago I've read something about texttag. They told me thtat texttags don't leak as long as they are timed. I guess this is true.
BertTheJasser is offline   Reply With Quote
Old 02-17-2006, 03:09 PM   #6
Fulla
Evil Overlord
 
Fulla's Avatar
 
Join Date: Jan 2006
Posts: 1,416

Submissions (3)

Fulla has a spectacular aura about (79)Fulla has a spectacular aura about (79)Fulla has a spectacular aura about (79)

Default

Simply amasing and exactly what I needed :-)
__________________
Fulla is offline   Reply With Quote
Old 02-17-2006, 03:49 PM   #7
shadow1500
STARCRAFT II OMFG
 
shadow1500's Avatar
 
Join Date: Jul 2004
Posts: 1,004

Submissions (9)

shadow1500 is just really nice (306)shadow1500 is just really nice (306)shadow1500 is just really nice (306)

Send a message via ICQ to shadow1500 Send a message via AIM to shadow1500 Send a message via MSN to shadow1500
Default

Quote:
Originally Posted by BertTheJasser
Some time ago I've read something about texttag. They told me thtat texttags don't leak as long as they are timed. I guess this is true.
This is true, but what does this has to do with this spell? The lifebars are permenant in this spell.
I was actually planning to make a lifebar model with 20 anims to reduce lag and to get rid of the 100 texttag limitiation, but now that this is 100% JASS its less laggy than the last version.
shadow1500 is offline   Reply With Quote
Old 02-17-2006, 05:29 PM   #8
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

Quote:
Originally Posted by BertTheJasser
Some time ago I've read something about texttag. They told me thtat texttags don't leak as long as they are timed. I guess this is true.
yeah but local variables that point to them still have to get set to null
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 02-17-2006, 06:22 PM   #9
Joey.
User
 
Joey.'s Avatar
 
Join Date: Jul 2005
Posts: 284

Joey. has little to show at this moment (4)

Send a message via AIM to Joey. Send a message via MSN to Joey.
Default

On your screenshot, I'm not certain you included the 50% shield armor. Either way this is definately usefull - perhaps a Bone Armor.
__________________
Joey. is offline   Reply With Quote
Old 02-17-2006, 08:55 PM   #10
shadow1500
STARCRAFT II OMFG
 
shadow1500's Avatar
 
Join Date: Jul 2004
Posts: 1,004

Submissions (9)

shadow1500 is just really nice (306)shadow1500 is just really nice (306)shadow1500 is just really nice (306)

Send a message via ICQ to shadow1500 Send a message via AIM to shadow1500 Send a message via MSN to shadow1500
Default

Quote:
Originally Posted by Joey.
On your screenshot, I'm not certain you included the 50% shield armor. Either way this is definately usefull - perhaps a Bone Armor.
It says
Quote:
Damage=400
After Armor=200
so yea its included.

Last edited by shadow1500 : 02-17-2006 at 09:20 PM.
shadow1500 is offline   Reply With Quote
Old 02-17-2006, 09:03 PM   #11
Anitarf
Procrastination Incarnate


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

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

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

Default

But this armour then also reduces the damage that spills over the shield, which it shouldn't; or at least make it toggleable. What's the point of having armour, couldn't you just have a twice as powerful shield instead of a 50% reduction? Could also use some more customization, like enabling/disabling spill (does the attack that kills the shield also do damage to the unit or is the extra damage lost), and other such stuff; it would be enat if the system could be used to make more than one different type of shields.

Just some thoughts for any future versions you might make.
__________________
Anitarf is offline   Reply With Quote
Old 02-17-2006, 09:14 PM   #12
shadow1500
STARCRAFT II OMFG
 
shadow1500's Avatar
 
Join Date: Jul 2004
Posts: 1,004

Submissions (9)

shadow1500 is just really nice (306)shadow1500 is just really nice (306)shadow1500 is just really nice (306)

Send a message via ICQ to shadow1500 Send a message via AIM to shadow1500 Send a message via MSN to shadow1500
Default

Quote:
What's the point of having armour, couldn't you just have a twice as powerful shield instead of a 50% reduction?
Well, Fulla requested that i add armor, u dont have to use it.
Quote:
Could also use some more customization, like enabling/disabling spill (does the attack that kills the shield also do damage to the unit or is the extra damage lost)
i dont think anyone will want such a feature, it would be extremly unbalanced, if sum1 casts an ability that does 500 damage and the shield life is like 10, then the spell would deal no damage.
Quote:
it would be enat if the system could be used to make more than one different type of shields.
how can i make different types?
Quote:
But this armour then also reduces the damage that spills over the shield
ill change that

Last edited by shadow1500 : 02-17-2006 at 09:14 PM.
shadow1500 is offline   Reply With Quote
Old 02-17-2006, 10:26 PM   #13
Anitarf
Procrastination Incarnate


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

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

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

Default

Quote:
Originally Posted by shadow1500
i dont think anyone will want such a feature, it would be extremly unbalanced, if sum1 casts an ability that does 500 damage and the shield life is like 10, then the spell would deal no damage.
Well, that depends on the type of map and what gameplay mechanics the user of the system want to have. For me, it's an interesting twist, promotes smart use of spells.

Quote:
how can i make different types?
Well, I meant that the system would be a generic template for making shields that could be customized to make shields that work in diferent ways, depending on how the mapmaker would like them to work. Ideally, you could make different kinds of shields in the same map, allowing one unit to have any number of layers of shields. For example, in a map, some units would have some normal regenerating shields by default, but there would also be a buffing spell that would create a small deflective shield with different parameters (for example, no regeneration, but better armour and no damage spill) on a target unit, on top of any shields it might already have.
__________________
Anitarf is offline   Reply With Quote
Old 02-17-2006, 11:23 PM   #14
shadow1500
STARCRAFT II OMFG
 
shadow1500's Avatar
 
Join Date: Jul 2004
Posts: 1,004

Submissions (9)

shadow1500 is just really nice (306)shadow1500 is just really nice (306)shadow1500 is just really nice (306)

Send a message via ICQ to shadow1500 Send a message via AIM to shadow1500 Send a message via MSN to shadow1500
Default

Quote:
Well, I meant that the system would be a generic template for making shields that could be customized to make shields that work in diferent ways, depending on how the mapmaker would like them to work.
Then there's no need for a system, all the user has to do is to get a generic "unit is damaged" event and the DamageModify function and then he has full control on how the shield works.
Quote:
Ideally, you could make different kinds of shields in the same map, allowing one unit to have any number of layers of shields.
Thats not a good idea, maybe max 2 shields on a unit, with a main shield which will have first piriority, and a secondary shield which will take over if the main shield depletes, because more shields=more bars=more lag.
Quote:
Well, that depends on the type of map and what gameplay mechanics the user of the system want to have. For me, it's an interesting twist, promotes smart use of spells.
Add a new boolean handle var, change the BlockDamage trigger - in the "if dmg>slife" part, make an if statment that says that if that boolean handlevar is true then it will use DamageModify(u,dmg,0) instead of the DamageModify that was there.

Last edited by shadow1500 : 02-17-2006 at 11:26 PM.
shadow1500 is offline   Reply With Quote
Old 02-18-2006, 09:11 AM   #15
Anitarf
Procrastination Incarnate


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

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

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

Default

Quote:
Originally Posted by shadow1500
Then there's no need for a system, all the user has to do is to get a generic "unit is damaged" event and the DamageModify function and then he has full control on how the shield works.
The user could also just code his own system. The point is that this saves him some work.

Quote:
Thats not a good idea, maybe max 2 shields on a unit, with a main shield which will have first piriority, and a secondary shield which will take over if the main shield depletes, because more shields=more bars=more lag.
You could only display the topmost shield, or only display shields for selected units, or whatever. If a player has only a few uits in the map, why not allow them to be able to have up to 3 shields (or more)?

Quote:
Add a new boolean handle var, change the BlockDamage trigger - in the "if dmg>slife" part, make an if statment that says that if that boolean handlevar is true then it will use DamageModify(u,dmg,0) instead of the DamageModify that was there.
Well, it's your system, not mine. The point of a system is that a user shouldn't have to worry about how it works internally, just use it.
__________________
Anitarf 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 09:13 PM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

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