[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 > Spells > Filtered Listing


Reply
 
Thread Tools
The Hive Workshop Spells:
Undieable System
Images
Highslide JS
Details
Uploaded:13:03, 23rd Aug 2012
Last Updated:03:49, 28th Aug 2012
Keywords:die, death, dead, undieable, system, btdonald
Type:System
Category:GUI / Triggers

+ This system will allow you to make a unit undieable. When a unit die instead of it die immediately, it will have a revive bar and do death animation .......

+ Trigger:
SYSTEM

US Initialization
Events
Map initialization
Conditions
Actions
-------- Create US Hashtable --------
Hashtable - Create a hashtable
Set US_Hashtable = (Last created hashtable)
-------- Set time interval in Looping Trigger --------
Set US_TimeInterval = 0.03
Trigger - Add to US Loop <gen> the event (Time - Every US_TimeInterval seconds of game time)
-------- Set size and color of Reviving Bar --------
Set US_BarColor = |cffffcc00
Set US_BarSize = 5.50
US Add Unit
Events
Conditions
Actions
Unit Group - Add US_Unit to US_Group
Set US_ID = (Custom value of US_Unit)
Hashtable - Save US_ReviveTime as US_ID of 0 in US_Hashtable
Set US_Player = (Owner of US_Unit)
Custom script: if udg_US_Player == GetLocalPlayer() then
Floating Text - Create floating text that reads above US_Unit with Z offset -5.50, using font size US_BarSize, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Hashtable - Save Handle Of(Last created floating text) as US_ID of 2 in US_Hashtable
Hashtable - Save US_SFX[1] as US_ID of 3 in US_Hashtable
Hashtable - Save US_SFX[2] as US_ID of 4 in US_Hashtable
Custom script: endif
Set US_SFX[1] = <Empty String>
Set US_SFX[2] = <Empty String>
Custom script: call SaveReal(udg_US_Hashtable, udg_US_ID, 6, GetLocationX(udg_US_ReviveLoc))
Custom script: call SaveReal(udg_US_Hashtable, udg_US_ID, 7, GetLocationY(udg_US_ReviveLoc))
Set US_Unit = No unit
US Set Damage
Events
Game - DamageModifierEvent becomes Equal to 1.00
Conditions
DamageEventOverride Equal to False
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(DamageEventTarget is in US_Group) Equal to True
DamageEventAmount Greater than or equal to (Life of DamageEventTarget)
Then - Actions
Set DamageEventAmount = 0.00
-------- Action do when a unit die (fake dying) --------
Set US_Unit = DamageEventTarget
Set US_ID = (Custom value of US_Unit)
Hashtable - Save (Load US_ID of 0 from US_Hashtable) as US_ID of 1 in US_Hashtable
Unit - Make US_Unit Invulnerable
Unit - Pause US_Unit
Animation - Play US_Unit's death animation
Special Effect - Create a special effect attached to the origin of US_Unit using (Load US_ID of 3 from US_Hashtable)
Hashtable - Save Handle Of(Last created special effect) as US_ID of 5 in US_Hashtable
Unit Group - Add US_Unit to US_DyingGroup
-------- ================ --------
Set US_Event = 1.00
Set US_Event = 0.00
Else - Actions
Set US_Event = 0.00
US Loop
Events
Conditions
Actions
Unit Group - Pick every unit in US_DyingGroup and do (Actions)
Loop - Actions
Set US_Unit = (Picked unit)
Set US_ID = (Custom value of US_Unit)
Set US_ReviveTime = (Load US_ID of 0 from US_Hashtable)
Set US_Time = (Load US_ID of 1 from US_Hashtable)
Set US_Time = (US_Time - US_TimeInterval)
Hashtable - Save US_Time as US_ID of 1 in US_Hashtable
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
US_Time Greater than 0.00
Then - Actions
-------- Action do when a unit is in reviving time. --------
Set US_String = US_BarColor
For each (Integer US_Int) from 1 to (100 - (Integer(((US_Time x 100.00) / US_ReviveTime)))), do (Actions)
Loop - Actions
Set US_String = (US_String + |)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((100 - (Integer(((100.00 x US_Time) / US_ReviveTime)))) mod 2) Equal to 1
Then - Actions
Set US_String = (US_String + ||r)
Else - Actions
Set US_String = (US_String + |r|)
For each (Integer US_Int) from 1 to (Integer(((US_Time x 100.00) / US_ReviveTime))), do (Actions)
Loop - Actions
Set US_String = (US_String + |)
Custom script: if udg_US_Player == GetLocalPlayer() then
Floating Text - Change text of (Load US_ID of 2 in US_HashtableIf the label is not found, this function returns NULL.) to US_String using font size US_BarSize
Floating Text - Change the position of (Load US_ID of 2 in US_HashtableIf the label is not found, this function returns NULL.) to US_Unit with Z offset -5.50
Custom script: endif
Set US_String = <Empty String>
-------- ================ --------
Set US_Event = 1.50
Set US_Event = 0.00
Else - Actions
-------- Action do when a unit revive --------
Custom script: call SetUnitX(udg_US_Unit, LoadReal(udg_US_Hashtable, udg_US_ID,6))
Custom script: call SetUnitY(udg_US_Unit, LoadReal(udg_US_Hashtable, udg_US_ID,7))
Special Effect - Create a special effect attached to the origin of US_Unit using (Load US_ID of 4 from US_Hashtable)
Special Effect - Destroy (Last created special effect)
Unit - Make US_Unit Vulnerable
Unit - Unpause US_Unit
Unit - Set life of US_Unit to 100.00%
Unit - Set mana of US_Unit to 100.00%
Animation - Reset US_Unit's animation
Special Effect - Destroy (Load US_ID of 5 in US_Hashtable)
Set US_String = <Empty String>
Custom script: if udg_US_Player == GetLocalPlayer() then
Floating Text - Change text of (Load US_ID of 2 in US_HashtableIf the label is not found, this function returns NULL.) to US_String using font size US_BarSize
Floating Text - Change the position of (Load US_ID of 2 in US_HashtableIf the label is not found, this function returns NULL.) to US_Unit with Z offset -5.50
Custom script: endif
Unit Group - Remove US_Unit from US_DyingGroup
-------- ================ --------
Set US_Event = 2.00
Set US_Event = 0.00


+ HOW TO USE:
ADD UNIT

US Test Add Unit
Set US_Unit = Footman 0000 <gen>
Set US_ReviveTime = 5.00
Set US_SFX[1] = Abilities\Spells\Orc\Reincarnation\ReincarnationTarget.mdl
Set US_SFX[2] = Abilities\Spells\Other\Awaken\Awaken.mdl
Set US_ReviveLoc = (Center of (Playable map area))
Trigger - Run US Add Unit <gen> (checking conditions)

Undieable Event

Game - US_Event becomes Equal to 1.00
-> When a unit die (fake dying)
Game - US_Event becomes Equal to 1.50
-> A Unit is in reviving time.
Game - US_Event becomes Equal to 2.00
-> A unit revive.

+
NEW CHANGELOG

- Change almost code.

+
OLD CHANGELOG

- Use SetUnitX(udg_unit, LoadReal(...)) and SetUnitY(udg_unit, LoadReal(...)) instead of create a location by loading the coordinates from the hashtable and passing them to Point(x, y).
- Run code before Set US_Event.
- Fix some minor codes.

+ Credit: Bribe (Damage Engine and GUI Unit Indexer)
Rating - 4.00 (1 vote)
(Hover and click)
Moderator Comments
Recommended
18:41, 23rd Aug 2012
Magtheridon96:

This spell is approved and works properly.


Download US280812.w3x
(29.65 KB, 241 Downloads)

Old 08-23-2012, 01:10 PM   #2 (permalink)
Registered User Vengeancekael
Touch
 
Vengeancekael's Avatar
 
Join Date: Aug 2009
Posts: 5,612
Vengeancekael has a brilliant future (1996)Vengeancekael has a brilliant future (1996)Vengeancekael has a brilliant future (1996)
Former Staff Member: This user used to be on the Hive Workshop staff. User of the Year: 2012 Merit Badge - Level 0: This user has proven to be extremely valuable to the Warcraft III Modding Community. 
Oh I was hoping more for a different kind of spinoff, where as the dead unit will stay there until an allied unit comes and channels next to him, reviving the guy :P
But this is nice too.
Vengeancekael is offline   Reply With Quote
Old 08-23-2012, 01:12 PM   #3 (permalink)
Registered User btdonald
User
 
btdonald's Avatar
 
Join Date: Dec 2011
Posts: 100
btdonald has little to show at this moment (26)btdonald has little to show at this moment (26)btdonald has little to show at this moment (26)
Quote:
Originally Posted by Vengeancekael View Post
Oh I was hoping more for a different kind of spinoff, where as the dead unit will stay there until an allied unit comes and channels next to him, reviving the guy :P
But this is nice too.
This system is configurable. You can easy to change it or use it to do what you want :D
btdonald is offline   Reply With Quote
Old 08-23-2012, 03:31 PM   #4 (permalink)
Forum Moderator Magtheridon96
Go away.
 
Magtheridon96's Avatar
Resource Moderator
 
Join Date: Dec 2008
Posts: 5,752
Magtheridon96 has a brilliant future (1891)Magtheridon96 has a brilliant future (1891)Magtheridon96 has a brilliant future (1891)Magtheridon96 has a brilliant future (1891)
Merit Badge - Level 0: This user has proven to be extremely valuable to the Warcraft III Modding Community. 
BAR SYSTEMS.
BAR SYSTEMS EVERYWHERE.

This makes me worry for the 100 texttag limit D:
Imagine how many innocent users are going to put these systems into their maps and complain D:
__________________
Magtheridon96 is offline   Reply With Quote
Old 08-23-2012, 03:40 PM   #5 (permalink)
Registered User btdonald
User
 
btdonald's Avatar
 
Join Date: Dec 2011
Posts: 100
btdonald has little to show at this moment (26)btdonald has little to show at this moment (26)btdonald has little to show at this moment (26)
Quote:
Originally Posted by Magtheridon96 View Post
BAR SYSTEMS.
BAR SYSTEMS EVERYWHERE.

This makes me worry for the 100 texttag limit D:
Imagine how many innocent users are going to put these systems into their maps and complain D:
I dun know :D I can use count second instead of bar :D
btdonald is offline   Reply With Quote
Old 08-24-2012, 03:02 AM   #6 (permalink)
Registered User btdonald
User
 
btdonald's Avatar
 
Join Date: Dec 2011
Posts: 100
btdonald has little to show at this moment (26)btdonald has little to show at this moment (26)btdonald has little to show at this moment (26)
Updated ......
btdonald is offline   Reply With Quote
Old 08-25-2012, 03:45 AM   #7 (permalink)
Registered User Striker21
Dota's Fan
 
Striker21's Avatar
 
Join Date: Aug 2009
Posts: 362
Striker21 has little to show at this moment (34)Striker21 has little to show at this moment (34)Striker21 has little to show at this moment (34)Striker21 has little to show at this moment (34)
It would be even nicer if user can edit things (easily) such as:
Percentage/amount of hitpoints the dead unit's animation has
percentage/amount of hp the unit has after its revived
But i can see uppoints of your system:
original
special effects
easy configurable
hashtables
For voting, i give: 4.5 (Since there's no 4.5, i voted 4)
Thanks, it was useful for me
__________________
Wanna see DotA heroes on paper? ===> Click to visit <===
Nothing is IMPOSSIBLE but Nothing is EASY
Striker21 is offline   Reply With Quote
Old 08-27-2012, 04:01 AM   #8 (permalink)
Registered User btdonald
User
 
btdonald's Avatar
 
Join Date: Dec 2011
Posts: 100
btdonald has little to show at this moment (26)btdonald has little to show at this moment (26)btdonald has little to show at this moment (26)
I've test it many times.... I couldn't find any bugs inside my code... I think now it's good

fixed

Last edited by Vengeancekael; 08-28-2012 at 04:36 PM. Reason: Merged (Double-post)
btdonald is offline   Reply With Quote
Old 08-30-2012, 02:52 AM   #10 (permalink)
Registered User btdonald
User
 
btdonald's Avatar
 
Join Date: Dec 2011
Posts: 100
btdonald has little to show at this moment (26)btdonald has little to show at this moment (26)btdonald has little to show at this moment (26)
Quote:
Originally Posted by Adiktuz View Post
bugs are seen in-game... XD...

anyway, yeah caster bar overload...
Bug .... where's it @@
btdonald is offline   Reply With Quote
Old 08-30-2012, 02:57 AM   #11 (permalink)
Registered User Adiktuz
BusyWithSchool
 
Adiktuz's Avatar
 
Join Date: Oct 2008
Posts: 8,613
Adiktuz has much of which to be proud (1110)Adiktuz has much of which to be proud (1110)Adiktuz has much of which to be proud (1110)Adiktuz has much of which to be proud (1110)Adiktuz has much of which to be proud (1110)Adiktuz has much of which to be proud (1110)
I just said that bugs are seen in-game because you said that you cannot see bugs on the code... and of course you cannot... XD
Adiktuz is offline   Reply With Quote
Old 08-30-2012, 02:58 AM   #12 (permalink)
Registered User btdonald
User
 
btdonald's Avatar
 
Join Date: Dec 2011
Posts: 100
btdonald has little to show at this moment (26)btdonald has little to show at this moment (26)btdonald has little to show at this moment (26)
=)) lol ... troll me :-L
btdonald is offline   Reply With Quote
Old 09-08-2012, 08:01 PM   #13 (permalink)
Registered User Brambleclaw
Standard Map maker
 
Brambleclaw's Avatar
 
Join Date: Apr 2010
Posts: 771
Brambleclaw is a jewel in the rough (178)
I think Reincarnation CD 0 would do mostly the same thing but oh well. I dunno.

Also Immortal would be better than undieable
__________________

Brambleclaw is offline   Reply With Quote
Old 09-09-2012, 10:52 AM   #14 (permalink)
Registered User Anachron
Hello old friend.
 
Anachron's Avatar
 
Join Date: Sep 2007
Posts: 6,392
Anachron has much of which to be proud (1083)Anachron has much of which to be proud (1083)Anachron has much of which to be proud (1083)Anachron has much of which to be proud (1083)Anachron has much of which to be proud (1083)
Hosted Project of the Year - 2009: Diablo III Warcraft 
Quote:
Unit - Set mana of US_Unit to 100.00%
Isn't this kind of cheating for heroes?
Anachron is offline   Reply With Quote
Old 09-10-2012, 01:15 PM   #15 (permalink)
Registered User btdonald
User
 
btdonald's Avatar
 
Join Date: Dec 2011
Posts: 100
btdonald has little to show at this moment (26)btdonald has little to show at this moment (26)btdonald has little to show at this moment (26)
Quote:
Originally Posted by Anachron View Post
Isn't this kind of cheating for heroes?
...
btdonald is offline   Reply With Quote
Reply

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 03:56 PM.





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