[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 01-09-2010, 05:36 AM   #46 (permalink)
Registered User vercas
The last living Asgard...
 
vercas's Avatar
 
Join Date: Dec 2007
Posts: 2,569
vercas is a jewel in the rough (189)vercas is a jewel in the rough (189)
Oh my god... This is one step from being awesome!

Does it show like
"Min - Max + Bonus"
The damage?
It's all I care about.
(I can't test it here!)
__________________

ColorerUbuntu ROCKS!

vercas is offline   Reply With Quote
Old 02-01-2010, 05:08 AM   #47 (permalink)
Forum Moderator azlier
Made of explodium
JASS Moderator
 
Join Date: Oct 2008
Posts: 277
azlier is on a distinguished road (86)azlier is on a distinguished road (86)
This is excellent work. I'm going to approve this. It's deserved approval for quite a while.
azlier is offline   Reply With Quote
Old 03-19-2010, 01:42 AM   #48 (permalink)
Registered User enyeas
User
 
Join Date: Jan 2010
Posts: 47
enyeas has little to show at this moment (2)
What would be a list of steps to use this in a map? I have:

1. Saved the LUA file in map directory
2. Put the code in a blank text trigger
3. Uncommented object merger line
4. Saved successfully, including object merger
5. Commented out object merger line
6. Made a function to put a unit in the system:
Jass:
call CreateUnitProperties(hero)  //hero being a unit variable holding a hero
7. Tried modifying the units properties:
Jass:
call UnitModifyArmor(hero, 100)

But this does not work, perhaps I am missing something simple?
enyeas is offline   Reply With Quote
Old 03-19-2010, 07:18 PM   #49 (permalink)
Registered User Viikuna
User
 
Viikuna's Avatar
 
Join Date: Aug 2008
Posts: 433
Viikuna is on a distinguished road (75)Viikuna is on a distinguished road (75)
Remember to check that you have all those bonus abilities in object editor, that the lua script actually worked.

You can also add some temporary call BJDebugMsg( " word " ) -calls to the system code to find out where the code stops running, if it stops running.
__________________
No Marlo, no game.
Viikuna is offline   Reply With Quote
Old 03-19-2010, 08:42 PM   #50 (permalink)
Registered User enyeas
User
 
Join Date: Jan 2010
Posts: 47
enyeas has little to show at this moment (2)
Ah, I was unaware that it would actually put the abilities in the ability editor. Thought it just kinda put it in the map file. In that case, no, the LUA does not import abilities. This is also the case with the other system I tried. I am using newgen, but is there something else i need to enable for the LUA to work?

Thanks
enyeas is offline   Reply With Quote
Old 03-19-2010, 11:22 PM   #51 (permalink)
Registered User YourNameHere
pewpew lazer bunny
 
YourNameHere's Avatar
 
Join Date: Apr 2007
Posts: 732
YourNameHere is a jewel in the rough (156)
Uncomment the lines so you have to save, but don't save. Close the map and click yes to save, after that load it again and you should see the abilities in the OE.
__________________
--YourNameHere
YourNameHere is offline   Reply With Quote
Old 03-20-2010, 12:31 AM   #52 (permalink)
Registered User enyeas
User
 
Join Date: Jan 2010
Posts: 47
enyeas has little to show at this moment (2)
thanks, that worked :)
enyeas is offline   Reply With Quote
Old 03-22-2010, 06:47 PM   #53 (permalink)
Registered User Berb
User
 
Berb's Avatar
 
Join Date: Jan 2006
Posts: 1,932
Berb is just really nice (312)Berb is just really nice (312)
PayPal Donor: This user has donated to The Hive. 
There are a lot of systems now-a-days that use a function GetUnitId , perhaps it should be privatized?

Last edited by Berb; 03-22-2010 at 07:16 PM.
Berb is offline   Reply With Quote
Old 03-22-2010, 10:41 PM   #54 (permalink)
Forum Moderator azlier
Made of explodium
JASS Moderator
 
Join Date: Oct 2008
Posts: 277
azlier is on a distinguished road (86)azlier is on a distinguished road (86)
Quote:
Originally Posted by Berbanog View Post
There are a lot of systems now-a-days that use a function GetUnitId , perhaps it should be privatized?
This one is correct. Especially unit indexing systems use GetUnitId because some fool decided that it should be the standard over GetUnitIndex.
azlier is offline   Reply With Quote
Old 03-27-2010, 08:59 AM   #55 (permalink)
Registered User Viikuna
User
 
Viikuna's Avatar
 
Join Date: Aug 2008
Posts: 433
Viikuna is on a distinguished road (75)Viikuna is on a distinguished road (75)
If you read the comments, you see that its just a wrapper, which can be replaced with any unit indexing or data attachment system.

It should probably be made to require AutoIndex or something, but then again, its not a big job to edit UP code a bit and make it work so.





Also, since Cassiel posted this here just for those who already use the system to get the code from somewhere, I think it doesnt really need any updating, unless he releases that UP2 he mentioned in the first page of this thread.


So, currently its probably the best to just edit the system code by yourself and hope that this new UnitProperties will be realeased someday.
__________________
No Marlo, no game.
Viikuna is offline   Reply With Quote
Old 05-13-2010, 09:07 PM   #56 (permalink)
Registered User Fundo!
User
 
Join Date: Aug 2007
Posts: 147
Fundo! has little to show at this moment (4)
Could you make a template using your system that when a unit buys an item, +damage and +stats are added to that unit, and when the unit loses/does not have that item again restore his stats to the way they were before the item? Would greatly help :)
Fundo! is offline   Reply With Quote
Old 05-14-2010, 04:43 AM   #57 (permalink)
Registered User Berb
User
 
Berb's Avatar
 
Join Date: Jan 2006
Posts: 1,932
Berb is just really nice (312)Berb is just really nice (312)
PayPal Donor: This user has donated to The Hive. 
Knowing Cassiel I doubt that will happen.
Berb is offline   Reply With Quote
Old 05-14-2010, 06:26 AM   #58 (permalink)
Registered User HyperActive
Takin' it back!
 
HyperActive's Avatar
 
Join Date: Dec 2006
Posts: 305
HyperActive has little to show at this moment (32)HyperActive has little to show at this moment (32)HyperActive has little to show at this moment (32)HyperActive has little to show at this moment (32)
You just detect when a unit acquires an item and when a unit drops an item. Then you search for what that item is, and add (or remove) thee bonuses it gives. It's rather simple, maybe a little annoying using many if conditions while searching for the item id.


Example

private function onItemPicked takes nothing returns nothing
local integer it = GetItemTypeId(GetManipulatedItem())
local unit u = GetTriggerUnit()
if it==RING_OF_REGENERATION_ID then
call UnitModifyLifeRegen(u, 2.0)
elseif it==SOBY_MASK_ID then
...
...
...
endif
endfunction

private function onItemDroped takes nothing returns nothing
local integer it = GetItemTypeId(GetManipulatedItem())
local unit u = GetTriggerUnit()
if it==RING_OF_REGENERATION_ID then
call UnitModifyLifeRegen(u, -2.0)
elseif it==SOBY_MASK_ID then
...
...
...
endif
endfunction

private function Init takes nothing returns nothing
call TriggerRegisterAnyUnitEventBJ(Trigger1, EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddAction(Trigger1, function onItemPicked)
call TriggerRegisterAnyUnitEventBJ(Trigger2, EVENT_PLAYER_UNIT_DROP_ITEM)
call TriggerAddAction(Trigger2, function onItemDroped)
endfunction
__________________
HyperActive is offline   Reply With Quote
Old 05-14-2010, 07:09 AM   #59 (permalink)
Registered User Viikuna
User
 
Viikuna's Avatar
 
Join Date: Aug 2008
Posts: 433
Viikuna is on a distinguished road (75)Viikuna is on a distinguished road (75)
You should probably write some BonusMod like thingy that gives you a bonus parent type, that contaijns all of those properties. It could contain those if then else thingies for modifying the correct property, and so allow you to just attach this bonus instance to item, and make all items work with same onPickup and onDrop -triggers that just get the attached bonus struct and add bonuses from it to your unit.
__________________
No Marlo, no game.
Viikuna is offline   Reply With Quote
Old 05-24-2010, 06:11 AM   #60 (permalink)
Registered User yatyfornetreg
Oriental Shadow Priest
 
yatyfornetreg's Avatar
 
Join Date: Jun 2009
Posts: 9
yatyfornetreg is an unknown quantity at this point (0)
WICKED!!! yet i need some time to read it... thanks anyway.
yatyfornetreg 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 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 04:03 AM
Using Tomes of Damage to add natural damage to stuff - The Helper Forums This thread Refback 01-10-2010 11:19 AM
Max mana / hit point - The Helper Forums This thread Refback 12-10-2009 01:31 PM
A physical block (evasion) trigger? - Page 3 - The Helper Forums This thread Refback 12-08-2009 08:42 AM
Mini Problem - Ability that increase attack speed by value not % - The Helper Forums This thread Refback 11-23-2009 07:52 AM
Range Based Dynamic Evasion - The Helper Forums This thread Refback 11-19-2009 11:37 AM
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-23-2009 11:51 PM
How to use Grimext Object Merger - The Helper Forums This thread Refback 10-23-2009 11:34 AM
T32, how to use the This thread Refback 10-11-2009 10:41 AM
T32, how to use the This thread Refback 10-10-2009 06:43 PM
Changing Defense on the hero - The Helper Forums This thread Refback 10-10-2009 10:45 AM
T32, how to use the This thread Refback 10-06-2009 10:31 PM
Tides of Blood: Kudzu - Wc3C.net This thread Refback 10-01-2009 04:30 PM
Patch 1.24b Discussion - Wc3C.net This thread Refback 09-28-2009 04:09 PM
Increase a units HP, Damage, Defense via trigger - Wc3C.net This thread Refback 09-27-2009 01:43 PM
Increase a units HP, Damage, Defense via trigger - Wc3C.net This thread Refback 09-27-2009 01:28 PM
Increase a units HP, Damage, Defense via trigger - Wc3C.net This thread Refback 09-27-2009 01:27 PM
setting unit hp to above normal max - The Helper Forums This thread Refback 09-26-2009 06:43 PM
setting unit hp to above normal max - The Helper Forums This thread Refback 09-26-2009 05:30 PM
setting unit hp to above normal max - The Helper Forums This thread Refback 09-26-2009 01:39 PM
Stacking buffs with Jass not possible? - The Helper Forums This thread Refback 09-22-2009 03:53 PM
Stacking buffs with Jass not possible? - The Helper Forums This thread Refback 09-22-2009 03:37 PM
Scaling Summons? - Wc3C.net This thread Refback 09-03-2009 07:18 PM
Scaling Summons? - Wc3C.net This thread Refback 09-03-2009 03:57 PM
[Snippet] Unit States - Page 2 - The Helper Forums This thread Refback 09-02-2009 03:45 PM
ADamage - a damage detection and prevention engine - Wc3C.net This thread Refback 09-02-2009 01:40 AM
[Snippet] Unit States - Page 2 - The Helper Forums This thread Refback 08-31-2009 04:32 PM
Wc3C.net - View Profile: Litany This thread Refback 08-30-2009 03:53 AM
Best way to do this? - Page 2 - Wc3C.net This thread Refback 08-29-2009 10:26 PM
Tides of Blood: Blood Meter - Wc3C.net This thread Refback 08-29-2009 05:35 PM
Best way to do this? - Page 2 - Wc3C.net This thread Refback 08-29-2009 10:49 AM
Wc3C.net - View Profile: Litany This thread Refback 08-29-2009 05:56 AM
Best way to do this? - Wc3C.net This thread Refback 08-29-2009 05:16 AM

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

All times are GMT. The time now is 09:44 PM.





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