[Log in / Register]
| News | Chat | Pastebin | Donations | Tutorials | Rules | Forums |
| Maps | Skins | Icons | Models | Spells | Tools | Jass | Packs | Hosted Projects | Starcraft II Modding | Starcraft II Resources | Galaxy Wiki |
(Keeps Hive Alive)
Go Back   The Hive Workshop > Warcraft III Modding > World Editor Help Zone


World Editor Help Zone Ask general questions about World Editor features and use in this forum. If you need help fixing a trigger, please post it in Triggers & Scripts. Please review the forum rules before posting.

Closed Thread
 
Thread Tools
Old 08-09-2012, 01:55 PM   #1 (permalink)
Registered User Razwerd
User
 
Join Date: Jan 2012
Posts: 74
Razwerd has little to show at this moment (8)
How to make a passive skill that gives mana per hit?

Hello! As the title says, I want to make a passive skill that gives the Hero mana with every hit (prefferably a fixed amount, but you could tell me based on damage if you have time).
Can anyone help?
Razwerd is offline  
Old 08-09-2012, 02:09 PM   #2 (permalink)
Registered User _PV
*Le hive random ^_^*
 
_PV's Avatar
 
Join Date: Aug 2010
Posts: 187
_PV has little to show at this moment (44)_PV has little to show at this moment (44)_PV has little to show at this moment (44)_PV has little to show at this moment (44)_PV has little to show at this moment (44)
A GUI trigger will suffice. Gimme a sec and I'll see what I can do.
Firstly, Do you want the amount of mana regenerated increase as the damage increases or as the mana pool increases?
e.g. Steals 5 mana per hit and has 100 damage,
Steals 10 mana per hit and has 200 damage.
OR
Steals 10 mana per hit with a mana pool of 1000
Steals 20 mana per hit with a mana pool of 2000

Understand? :PP
__________________
Cool story bro
Events
Story told
Conditions
((Story) is Cool) Equal to True
Actions
Cinematic - Send transmission to (Story teller) from Me Play LOL<gen> and display Cool story bro Modify duration: Add 0.00 seconds and Wait
_PV is offline  
Old 08-09-2012, 02:16 PM   #3 (permalink)
Registered User claptomanic
User
 
Join Date: Jul 2011
Posts: 562
claptomanic is on a distinguished road (86)claptomanic is on a distinguished road (86)
search for DDS (i recommend bribes) and then do whenever a unit damaged, check whether the unit has ability level 1 or higher then do add X mana (X can also be calculated by damage ; for example (dealt damage/10))
claptomanic is offline  
Old 08-09-2012, 02:25 PM   #4 (permalink)
Registered User _PV
*Le hive random ^_^*
 
_PV's Avatar
 
Join Date: Aug 2010
Posts: 187
_PV has little to show at this moment (44)_PV has little to show at this moment (44)_PV has little to show at this moment (44)_PV has little to show at this moment (44)_PV has little to show at this moment (44)
Can you add % mana? That makes it much more practical, Like gaining a fixed amount of mana, like 5 per hit, would suck if you have a mana pool of 10000. Or it would be IMBA if you gain 50 per hit with a mana pool of 500
IMO
__________________
Cool story bro
Events
Story told
Conditions
((Story) is Cool) Equal to True
Actions
Cinematic - Send transmission to (Story teller) from Me Play LOL<gen> and display Cool story bro Modify duration: Add 0.00 seconds and Wait
_PV is offline  
Old 08-09-2012, 02:33 PM   #5 (permalink)
Registered User Razwerd
User
 
Join Date: Jan 2012
Posts: 74
Razwerd has little to show at this moment (8)
It would be nice if I added % mana based on maximum mana, like 1/2/3 % of maximun mana with every hit. If it's too difficult to do (because I'm new to triggers) just tell me the fixed amount one. :D
Razwerd is offline  
Old 08-09-2012, 02:49 PM   #6 (permalink)
Registered User claptomanic
User
 
Join Date: Jul 2011
Posts: 562
claptomanic is on a distinguished road (86)claptomanic is on a distinguished road (86)
its not hard to do..^^

if you wanna add percentage mana you just have to change the action after the trigger runs (the event the DDS uses)

just do :
set percentage mana of 'DamageSource' to (current percentage mana of 'DamageSource' + X)

or if you want it to be percentage mana of the target added to the attacker just change DamageSource to 'DamagedUnit' in the equation.

(i just used understandable variable names they will be different in the system)
claptomanic is offline  
Old 08-09-2012, 03:54 PM   #7 (permalink)
Registered User Spartipilo
User
 
Join Date: Jul 2011
Posts: 2,522
Spartipilo is just really nice (293)Spartipilo is just really nice (293)Spartipilo is just really nice (293)Spartipilo is just really nice (293)Spartipilo is just really nice (293)
Actually, this way the unit wold gain mana everytime it deals damage with anything: hit, ability, etc, which wouldn't actually work as a "Mana steal" thing or something.

You have to detect the damage source actually hit the target unit.

What I would do?

On event "A unit is attacked" save "True" on the attacked unit index or id. That works for detecting the unit began the attack animation of a unit. To add the mana only when the unit hits, you need this boolean to be "True". If the unit is given any order (target, no target, point), and boolean is "True" you set the boolean to False, just in case a player tries to spam the small time gap between the "Attack" and the Damage. When damage is received the boolean is also set to false.

It's a pain in the ass tough for ranged unit, which could receive an order while the missile is still on the air, or could have more than 1 missile in the air.

You could also do the ooposite: Set "True" when the unit is casting to prevent attack bonuses apply, and set to false when the unit is not casting anymore.
Spartipilo is offline  
Old 08-09-2012, 07:34 PM   #8 (permalink)
Registered User Razwerd
User
 
Join Date: Jan 2012
Posts: 74
Razwerd has little to show at this moment (8)
The skill is for a ranged unit. I have a DDS but I still can't figure out how to do it.
Razwerd is offline  
Old 08-09-2012, 07:55 PM   #9 (permalink)
Registered User Spartipilo
User
 
Join Date: Jul 2011
Posts: 2,522
Spartipilo is just really nice (293)Spartipilo is just really nice (293)Spartipilo is just really nice (293)Spartipilo is just really nice (293)Spartipilo is just really nice (293)
Event: Damage Event Happens
Condition: Level of PassiveManaRegain for DamageSource is > 0
Action: Set mana of DamageSource = (Mana of DamageSource + 10)
Spartipilo is offline  
Old 08-09-2012, 08:52 PM   #10 (permalink)
Registered User Codric
Ghost
 
Codric's Avatar
 
Join Date: Apr 2012
Posts: 620
Codric will become famous soon enough (119)Codric will become famous soon enough (119)Codric will become famous soon enough (119)
And how may you make a damage event
__________________
MySig MyPicSig Misc.
“When the snows fall and the white winds blow, the lone wolf dies but the pack survives.”
None

Codric is offline  
Old 08-09-2012, 08:55 PM   #11 (permalink)
Registered User Razwerd
User
 
Join Date: Jan 2012
Posts: 74
Razwerd has little to show at this moment (8)
Action: Set mana of DamageSource = (Mana of DamageSource + 10)

How to do this? Through the Unit - Set Mana (To Value) ?

And I also want to make it have levels, please explain how to increase mana after leveling the ability.
Razwerd is offline  
Old 08-09-2012, 09:47 PM   #12 (permalink)
Registered User Spartipilo
User
 
Join Date: Jul 2011
Posts: 2,522
Spartipilo is just really nice (293)Spartipilo is just really nice (293)Spartipilo is just really nice (293)Spartipilo is just really nice (293)Spartipilo is just really nice (293)
Quote:
I have a DDS but I still can't figure out how to do it.
Did you, at least, read how the DDS works?

DAMAGE DETECTION SYSTEM creates a Real Variable used to detect when damage is dealt, and by whom, and to who. You have to use "Game - Value of Real Variable" event and follow the selected DDS Instructions to use it.

Yes, you set the mana with that action "Unit - Set mana (To value)". To make it scale with levels you can base it on the Level of the Ability like

"Set mana of DamageSource = (MAna of Damage Source + (Level of PassiveManaGain for (Triggering Unit) * 2.5)))"
Spartipilo is offline  
Old 08-09-2012, 10:54 PM   #13 (permalink)
Registered User Razwerd
User
 
Join Date: Jan 2012
Posts: 74
Razwerd has little to show at this moment (8)
Mana Steal
Events
Game - GDD_Damage becomes Equal to 0.00
Conditions
(Level of Mana Steal for GDD_DamageSource) Greater than 0
Actions
Unit - Set mana of GDD_DamageSource to ((Mana of GDD_DamageSource) + ((Real((Level of Mana Steal for (Triggering unit)))) x 5.00))

I made this trigger but when I try it ingame it doesn't work. Maybe I'm doing something wrong since I'm new to triggers.
Razwerd is offline  
Old 08-09-2012, 11:23 PM   #14 (permalink)
Registered User Zyne
Intermediate Modeler
 
Zyne's Avatar
 
Join Date: May 2012
Posts: 374
Zyne is on a distinguished road (68)Zyne is on a distinguished road (68)
can the condition be : ((Triggering Unit) has buff "Buff") Equal to True ?
__________________
My Workshop Kael What am I working on right now?

Simple Model Workshop (Now ACCEPTING)
Zyne is offline  
Old 08-10-2012, 01:39 AM   #15 (permalink)
Registered User Spartipilo
User
 
Join Date: Jul 2011
Posts: 2,522
Spartipilo is just really nice (293)Spartipilo is just really nice (293)Spartipilo is just really nice (293)Spartipilo is just really nice (293)Spartipilo is just really nice (293)
If it has the buff, then it works.

Razwerd, i'm not sure, but I've heard around that if the gained mana is higher than the maximum mana, it does nothing. So you have to check if the current mana + restored mana is higher than maximum mana, set mana to max, else, set mana to current mana + restored mana.

Try to display a message (Game - Display message) to test if the event and conditions are working.
Spartipilo is offline  
Closed Thread

Bookmarks

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 05:49 PM.





Powered by vBulletin
Copyright 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.5.1 PL2
Copyright © Ralle