[Log in / Register]
| News | Chat | Pastebin | Donations | Tutorials | Rules | Forums | Starcraft II |
| Maps | Skins | Icons | Models | Spells | Tools | Jass | Packs |
(Keeps Hive Alive)
Go Back   The Hive Workshop > Warcraft III Resources > JASS Functions

JASS Functions Approved JASS functions will be located here.
Remember to submit your own resources to the submission forum.

Reply
 
LinkBack (34) Thread Tools
Old 09-03-2009, 10:11 PM   #16 (permalink)
Registered User PurplePoot
 
Join Date: Dec 2005
Posts: 10,057
PurplePoot has a brilliant future (1297)PurplePoot has a brilliant future (1297)PurplePoot has a brilliant future (1297)PurplePoot has a brilliant future (1297)PurplePoot has a brilliant future (1297)
Former Staff Member: This user used to be on the Hive Workshop staff. Respected User: This user has been given the respected user award. Paired Mapping Contest #4 - Winner: Fallen Angel - Lucifer's Keep Map Development Mini-Contest #1 - Winner: Stand of the Elements 
With a second version which does address such changes I can see why you don't want to bother with them for this one. If it's going to be soon then I'll just leave this here (assuming you plan to attach it to the same post, which would make sense). Otherwise, I'll approve it (just confirm which you plan on doing).
PurplePoot is offline   Reply With Quote
Old 09-03-2009, 10:59 PM   #17 (permalink)
Registered User Cassiel
a.k.a. Litany
 
Cassiel's Avatar
 
Join Date: Mar 2004
Posts: 21
Cassiel has disabled reputation
It's not going to be for at least several weeks, probably longer. Ideally it wouldn't be until after JassHelper finally gives us either optional library support with ifdef or better function hooking, that way I can make the system truly modular instead of having to provide instructions on how to add or remove modules from the core.

However, this version doesn't really need to be approved, either. It just needs a thread where some of the people already using it can go to look back at the unmodified code, redownload the Lua script, etc. I suppose it may be worth approving in case other people want to use this version for now.

Also, any way we can get .lua allowed as an attachment extension? I dug up the other version of the Evasion Module. The lua script is:
Lua
Code:
-- Generates Evasion abilities from 1 to 100% and places each in a spellbook.

setobjecttype("abilities")
CharFinder = [[ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~]]

function CreateEvasionAbilities ()
	for i = 1, 95 do
		cha = string.sub(CharFinder, i, i)
		raw = "eva"..cha

		createobject("ACes", raw)
      	  	makechange(current, "Eev1", 1, i / 100.)
     	   	makechange(current, "arac", "Other")
     	   	makechange(current, "Name", "Evasion")
     	   	makechange(current, "ansf", "("..tostring(i).."%)")

		createobject("Aspb", "bea"..cha)
      	  	makechange(current, "spb1", 1, raw)
     	   	makechange(current, "aite", 0)
     	   	makechange(current, "Name", "Evasion Spell Book")
     	   	makechange(current, "ansf", "("..tostring(i).."%)")
	end

	for i = 1, 5 do
		cha = string.sub(CharFinder, i, i)
		raw = "evb"..cha

		createobject("ACes", raw)
      	  	makechange(current, "Eev1", 1, (i + 95) / 100.)
     	   	makechange(current, "arac", "Other")
     	   	makechange(current, "ansf", "("..tostring(i + 95).."%)")
     	   	makechange(current, "Name", "Evasion")

		createobject("Aspb", "beb"..cha)
      	  	makechange(current, "spb1", 1, raw)
     	   	makechange(current, "aite", 0)
     	   	makechange(current, "Name", "Evasion Spell Book")
     	   	makechange(current, "ansf", "("..tostring(i + 95).."%)")
	end

end

CreateEvasionAbilities()

And the (tiny) library is:
EvasionModule
library EvasionModule initializer Init

    // //! external ObjectMerger EvasionGenerator.lua

    globals
        private integer EvasionA = 'bea ' - 1
        private integer EvasionB = 'beb ' - 1
        private integer array E
        private integer array U
    endglobals

    function UnitSetAttackEvasion takes unit u, integer e returns nothing
        local integer i = u:Id
        if U[i] != 0 then
            call UnitRemoveAbility(u, E[U[i]])
        endif
        set U[i] = e
        call UnitAddAbility(u, E[e])
    endfunction

    private function Init takes nothing returns nothing
        local integer i
        local integer e
        local player p

        set i = 1
        loop
            exitwhen i == 101
            if i < 96 then
                set E[i] = EvasionA + i
            else
                set E[i] = EvasionB + i - 95
            endif
            set i = i + 1
        endloop

        set i = 0
        loop
            exitwhen i == 16
            set p = Player(i)
            set e = 1
            loop
                exitwhen e == 101
                call SetPlayerAbilityAvailable(p, E[e], false)
                set e = e + 1
            endloop
            set i = i + 1
        endloop
    endfunction
endlibrary
Cassiel is offline   Reply With Quote
Old 09-04-2009, 12:03 AM   #18 (permalink)
Registered User PurplePoot
 
Join Date: Dec 2005
Posts: 10,057
PurplePoot has a brilliant future (1297)PurplePoot has a brilliant future (1297)PurplePoot has a brilliant future (1297)PurplePoot has a brilliant future (1297)PurplePoot has a brilliant future (1297)
Former Staff Member: This user used to be on the Hive Workshop staff. Respected User: This user has been given the respected user award. Paired Mapping Contest #4 - Winner: Fallen Angel - Lucifer's Keep Map Development Mini-Contest #1 - Winner: Stand of the Elements 
May as well just leave this here if it will be obsolete by that time, then.
PurplePoot is offline   Reply With Quote
Old 09-05-2009, 10:30 AM   #19 (permalink)
Registered User MapperMalte
MapperMalte
 
MapperMalte's Avatar
 
Join Date: Nov 2007
Posts: 368
MapperMalte has little to show at this moment (29)MapperMalte has little to show at this moment (29)MapperMalte has little to show at this moment (29)
Wow, this is so cool.
I'm planning to make a tower defense,
and with this + xe dummy unit, I can create new unittypes dynamically, so I don't have to use the object editor.
MapperMalte is offline   Reply With Quote
Old 09-07-2009, 06:39 AM   #20 (permalink)
Registered User Element of Water
He has beautiful eyes...
 
Element of Water's Avatar
 
Join Date: Aug 2008
Posts: 2,062
Element of Water is just really nice (284)Element of Water is just really nice (284)Element of Water is just really nice (284)Element of Water is just really nice (284)Element of Water is just really nice (284)
Quote:
Originally Posted by MapperMalte View Post
Wow, this is so cool.
I'm planning to make a tower defense,
and with this + xe dummy unit, I can create new unittypes dynamically, so I don't have to use the object editor.
Have you thought about animations? Tooltips? Attack/defense types? Number of attacks? I didn't think so.
Element of Water is offline   Reply With Quote
Old 09-14-2009, 06:24 PM   #21 (permalink)
Registered User Silvenon
BBoy Silv
 
Silvenon's Avatar
 
Join Date: Nov 2006
Posts: 1,192
Silvenon is a jewel in the rough (161)
//For each of these functions, there is also a UnitSet and a UnitGet equivalent.

This is not entirely true. For example, there isn't a UnitSetLife/Mana or UnitGetLife/Mana. I know that I can get those simply by calling GetUnitState, but it would be cool if you added those as as wrappers.
Silvenon is offline   Reply With Quote
Old 09-15-2009, 11:37 AM   #22 (permalink)
Registered User Cassiel
a.k.a. Litany
 
Cassiel's Avatar
 
Join Date: Mar 2004
Posts: 21
Cassiel has disabled reputation
That's one of the reasons I hated maintaining multiple versions of the library simultaneously. Silly inconsistencies are always popping up.

I removed those functions because there's just no point to them with the colon operator. States inline completely, unlike some other properties. Unless you just hate the syntax or something there's never a reason not to use set unit:Life = unit:Life + 200.

After seeing several people try and fail to copy my Widgetizer-enabled UnitState module though I may upload that separately here pretty soon, ahead of UP2, since neither requires the other. That version preserves all syntax options just for kicks [UnitSetLife/Mana(unit, value), UnitSetState(unit, state, value), and set unit:State = value)].
Cassiel is offline   Reply With Quote
Old 09-15-2009, 04:03 PM   #23 (permalink)
Registered User Silvenon
BBoy Silv
 
Silvenon's Avatar
 
Join Date: Nov 2006
Posts: 1,192
Silvenon is a jewel in the rough (161)
Btw, I was one of those idiots you mentioned who forgot to call CreateUnitProperties :P
Silvenon is offline   Reply With Quote
Old 09-15-2009, 10:29 PM   #24 (permalink)
Registered User Cassiel
a.k.a. Litany
 
Cassiel's Avatar
 
Join Date: Mar 2004
Posts: 21
Cassiel has disabled reputation
Yeah but did you post threads with subject lines like "Unit Properties Doesn't Work"--?
Cassiel is offline   Reply With Quote
Old 09-16-2009, 09:50 AM   #25 (permalink)
Registered User Silvenon
BBoy Silv
 
Silvenon's Avatar
 
Join Date: Nov 2006
Posts: 1,192
Silvenon is a jewel in the rough (161)
No, because the effect that I wanted was so small that I didn't notice that something's wrong :P

But I'd just PM you, I wouldn't start a new thread :D
Silvenon is offline   Reply With Quote
Old 10-11-2009, 06:46 AM   #26 (permalink)
Registered User forsakener
Walking in Shadow
 
forsakener's Avatar
 
Join Date: Jun 2008
Posts: 165
forsakener has little to show at this moment (17)forsakener has little to show at this moment (17)
When I try to copy and paste the library for the UnitProperties, When I paste it to the trigger in my map, it goes on 1 line for some reason. Any Idea on how to fix? Or upload a map I can copy/paste?
__________________
forsakener is offline   Reply With Quote
Old 10-11-2009, 04:39 PM   #27 (permalink)
Registered User Viikuna
User
 
Viikuna's Avatar
 
Join Date: Aug 2008
Posts: 338
Viikuna is on a distinguished road (61)Viikuna is on a distinguished road (61)
Thats some problem with Hives Jass tags and it kinda sucks since there aint any test map.

Probably you should ask about in Site Discussion thread. There might be more guys who know about this stuff reading your posts than in this thread.
__________________
No Marlo, no game.
Viikuna is offline   Reply With Quote
Old 10-11-2009, 11:16 PM   #28 (permalink)
Registered User Cassiel
a.k.a. Litany
 
Cassiel's Avatar
 
Join Date: Mar 2004
Posts: 21
Cassiel has disabled reputation
Paste with Opera or Chrome. Firefox and IE are incompetent.
Cassiel is offline   Reply With Quote
Old 10-13-2009, 04:58 PM   #29 (permalink)
Registered User Silvenon
BBoy Silv
 
Silvenon's Avatar
 
Join Date: Nov 2006
Posts: 1,192
Silvenon is a jewel in the rough (161)
Or just click on the button and CnP it from there.
Silvenon is offline   Reply With Quote
Old 10-26-2009, 01:34 PM   #30 (permalink)
Registered User Anachron
^ That guy is awesome
 
Anachron's Avatar
 
Join Date: Sep 2007
Posts: 4,207
Anachron is a name known to all (639)Anachron is a name known to all (639)
Hosted Project of the Year - 2009: Diablo III Warcraft 
Quote:
Originally Posted by Cassiel View Post
Paste with Opera or Chrome. Firefox and IE are incompetent.
I use FF and I have no problems CnPing.
__________________
CustomInventory [Discussion - Download] - Got Directors Cut!
CustomMissle [Discussion - [Download (not yet)] - In development!
Other systems [Spawn System] [Move System] [CustomBar] [SpellBar]
Howto [install JNGP.]
Anachron is online now   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 On
Pingbacks are On
Refbacks are On


LinkBacks (?)
LinkBack to this Thread: http://www.hiveworkshop.com/forums/jass-functions-413/vjass-system-unit-properties-142012/
Posted By For Type Date
Question on LUA - Wc3C.net This thread Refback 01-14-2010 05:03 AM
Using Tomes of Damage to add natural damage to stuff - The Helper Forums This thread Refback 01-10-2010 12:19 PM
Max mana / hit point - The Helper Forums This thread Refback 12-10-2009 02:31 PM
A physical block (evasion) trigger? - Page 3 - The Helper Forums This thread Refback 12-08-2009 09:42 AM
Mini Problem - Ability that increase attack speed by value not % - The Helper Forums This thread Refback 11-23-2009 08:52 AM
Range Based Dynamic Evasion - The Helper Forums This thread Refback 11-19-2009 12:37 PM
Increasing Damage Passivly - The Helper Forums This thread Refback 10-27-2009 06:22 AM
How to use Grimext Object Merger - The Helper Forums This thread Refback 10-24-2009 12:51 AM
How to use Grimext Object Merger - The Helper Forums This thread Refback 10-23-2009 12:34 PM
T32, how to use the This thread Refback 10-11-2009 11:41 AM
T32, how to use the This thread Refback 10-10-2009 07:43 PM
Changing Defense on the hero - The Helper Forums This thread Refback 10-10-2009 11:45 AM
T32, how to use the This thread Refback 10-06-2009 11:31 PM
Tides of Blood: Kudzu - Wc3C.net This thread Refback 10-01-2009 05:30 PM
Patch 1.24b Discussion - Wc3C.net This thread Refback 09-28-2009 05:09 PM
Increase a units HP, Damage, Defense via trigger - Wc3C.net This thread Refback 09-27-2009 02:43 PM
Increase a units HP, Damage, Defense via trigger - Wc3C.net This thread Refback 09-27-2009 02:28 PM
Increase a units HP, Damage, Defense via trigger - Wc3C.net This thread Refback 09-27-2009 02:27 PM
setting unit hp to above normal max - The Helper Forums This thread Refback 09-26-2009 07:43 PM
setting unit hp to above normal max - The Helper Forums This thread Refback 09-26-2009 06:30 PM
setting unit hp to above normal max - The Helper Forums This thread Refback 09-26-2009 02:39 PM
Stacking buffs with Jass not possible? - The Helper Forums This thread Refback 09-22-2009 04:53 PM
Stacking buffs with Jass not possible? - The Helper Forums This thread Refback 09-22-2009 04:37 PM
Scaling Summons? - Wc3C.net This thread Refback 09-03-2009 08:18 PM
Scaling Summons? - Wc3C.net This thread Refback 09-03-2009 04:57 PM
[Snippet] Unit States - Page 2 - The Helper Forums This thread Refback 09-02-2009 04:45 PM
ADamage - a damage detection and prevention engine - Wc3C.net This thread Refback 09-02-2009 02:40 AM
[Snippet] Unit States - Page 2 - The Helper Forums This thread Refback 08-31-2009 05:32 PM
Wc3C.net - View Profile: Litany This thread Refback 08-30-2009 04:53 AM
Best way to do this? - Page 2 - Wc3C.net This thread Refback 08-29-2009 11:26 PM
Tides of Blood: Blood Meter - Wc3C.net This thread Refback 08-29-2009 06:35 PM
Best way to do this? - Page 2 - Wc3C.net This thread Refback 08-29-2009 11:49 AM
Wc3C.net - View Profile: Litany This thread Refback 08-29-2009 06:56 AM
Best way to do this? - Wc3C.net This thread Refback 08-29-2009 06:16 AM

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unit Properties Bowzerbro Requests 2 12-22-2008 12:23 AM
[vJASS] CG's Transmission System Captain Griffen JASS Functions 6 04-05-2008 05:14 PM
[Trigger] Setting Unit's Properties to a formula NoobMapmaker Triggers & Scripts 16 04-02-2008 02:28 PM
[Question] Can i get the properties of unit mazong Triggers & Scripts 3 09-24-2004 07:49 PM

All times are GMT. The time now is 10:01 PM.






Hosting by SliceHost 
Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.1
Copyright©Ralle