|
 |   |  |  |
JASS Functions Approved JASS functions will be located here.
Remember to submit your own resources to the submission forum. |
 |
03-28-2008, 10:06 PM
|
#1 (permalink)
|
******
Join Date: Nov 2005
Posts: 747
|
[vJASS] CG Building Costs + Insta Build
Ever made a TD, and wanted to have a sell tower option, but wanted it to be low maintainance? Wanted to have an easy way to get the cost of the tower? Now you can, with this system.
GetUpgradeGoldCost returns the cost of the last upgrade, GetPreviousGoldCost is that of all previous expenditure APART from the last one, and GetTotalGoldCost is all gold spent. It only works for buildings that have been built at least once in game - not those that are created by triggers.
Does NOT work with lumber costing towers. As in, it might break. If you want me to change it to work with lumber as well, then drop me a PM.
Includes insta-build. If you don't want that, then just set the constant to false.
Anyway, it's easy to use, and requires NO setup - just plug and play! No need for any more laborious working. The only exception is if you are using food in your map for towers. If you are, then add into the IncrementFood function a create unit which creates a dummy unit that provides more food than any tower uses. You can then remove it in the DecrementFood function. Since they take place instantaneously, you can use a global to carry the unit across (or just imbed it straight into the code, if you know JASS; that would be more efficient).
NB: If you are using another gamecache, then you may as well merge them. If it is called gc, then great, simple remove the global for it from this library, and also the init call for it at the bottom. If not, remove the global and init call, and then do a fine and replay for gc with whatever your game cache variable is.
If you feel this is beyond you, then adding 'private' to the line 'gamecache gc', to give 'private gamecache gc', will solve the problem, but won't be quite so memory efficient.
NB2: You may encounter problems with some pathing problems, I'm not sure. You SHOULDN'T with this version, but then again, WC3 can work in strange and wonderful ways.
Updated. Now fully supports lumber and food, includes functions to get them. Fixed possible bugs in the original release, some that could cause critical errors due to Blizzard bugs (I've run into so many of them on this script it is rediculous).
library BuildingCost initializer Init globals // This is the only code you should touch. Touch anything else and it's at your own risk. private constant boolean INSTA_BUILD = true //if you want it to instabuild private constant string GAME_CACHE_STRING = "cgbuildingblargh" // just make sure this doesn't collide with anything private constant real DUMMY_X = 0. // doesn't really matter what this, it'll work anywhere, BUT private constant real DUMMY_Y = 0. // There will be a flicker of a shadow here every first instance of a building; suggest you put it in some trees. private constant real DISTANCE_CHECK_RANGE = 100. // max distance a worker might be able to move and start building in 0.05 seconds. // Designed to stop unnecessary pausing (which can interrupt UI stuff) while maintaining safety. 100 should be fine. private gamecache gc = null // don't touch this.endglobals// These can be used to get the values. NB: ONLY use on buildings that have been built in game.function GetUpgradeGoldCost takes integer id returns integer // returns the cost of the last upgrade, OR the cost of building (if not upgraded) return GetStoredInteger (gc, "CGupgradeGold", I2S (id ))endfunctionfunction GetTotalGoldCost takes integer id returns integer // Cost of last and all previous return GetStoredInteger (gc, "CGtotalGold", I2S (id ))endfunctionfunction GetPreviousGoldCost takes integer id returns integer // Cost of gold/lumber/food spent not counting the last one (bit misleading name) return GetStoredInteger (gc, "CGpreviousGold", I2S (id ))endfunctionfunction GetUpgradeLumberCost takes integer id returns integer // returns the cost of the last upgrade, OR the cost of building (if not upgraded) return GetStoredInteger (gc, "CGupgradeLumber", I2S (id ))endfunctionfunction GetTotalLumberCost takes integer id returns integer // Cost of last and all previous return GetStoredInteger (gc, "CGtotalLumber", I2S (id ))endfunctionfunction GetPreviousLumberCost takes integer id returns integer // Cost of gold/lumber/food spent not counting the last one (bit misleading name) return GetStoredInteger (gc, "CGpreviousLumber", I2S (id ))endfunctionfunction GetUpgradeFoodCost takes integer id returns integer // returns the cost of the last upgrade, OR the cost of building (if not upgraded) return GetStoredInteger (gc, "CGupgradeFood", I2S (id ))endfunctionfunction GetTotalFoodCost takes integer id returns integer // Cost of last and all previous return GetFoodUsed (id )endfunctionfunction GetPreviousFoodCost takes integer id returns integer // Cost of gold/lumber/food spent not counting the last one (bit misleading name) return GetStoredInteger (gc, "CGpreviousFood", I2S (id ))endfunction// Don't mess with this stuff unless you want to spend hours painstakingly debugging. WC3 is full of bugs.private function TimerAttach takes timer t, real dur, real val, code func returns nothing call TimerStart (t, val, false, null) call PauseTimer (t ) call TimerStart (t, dur, false, func )endfunctionglobals private unit array built private unit array ordered private integer array orderedID private real array orderedX private real array orderedY private integer c = 1 private integer o = 1 private trigger trg_order private trigger trg_upgrade private integer q = 1 private unit array qUnit private integer array qId private real array qX private real array qY private group g private real distanceCheck private integer loopInt private unit array listU private boolean array listSelected endglobalsprivate function UpgradeEx takes nothing returns nothing local unit u = GetTriggerUnit () local player p = GetOwningPlayer (u ) local integer id = GetUnitTypeId (u ) local integer gold = GetPlayerState (p, PLAYER_STATE_RESOURCE_GOLD ) local integer lumber = GetPlayerState (p, PLAYER_STATE_RESOURCE_LUMBER ) local integer iG local integer iL local integer iF local integer costPrevious local string s = I2S (id ) local integer idOld call DisableTrigger (trg_upgrade ) call IssueImmediateOrderById (u, 851976 ) call SetPlayerState (p, PLAYER_STATE_RESOURCE_GOLD, 99999999 ) call SetPlayerState (p, PLAYER_STATE_RESOURCE_LUMBER, 99999999 ) set iG = GetPlayerState (p, PLAYER_STATE_RESOURCE_GOLD ) // incase a limit exists set iL = GetPlayerState (p, PLAYER_STATE_RESOURCE_LUMBER ) set idOld = GetUnitTypeId (u ) call IssueImmediateOrderById (u, id ) set iG = iG - GetPlayerState (p, PLAYER_STATE_RESOURCE_GOLD ) set iL = iL - GetPlayerState (p, PLAYER_STATE_RESOURCE_LUMBER ) call StoreInteger (gc, "CGupgradeGold", s, iG ) set costPrevious = GetTotalGoldCost (idOld ) call StoreInteger (gc, "CGpreviousGold", s, costPrevious ) call StoreInteger (gc, "CGtotalGold", s, iG+costPrevious ) call StoreInteger (gc, "CGupgradeLumber", s, iL ) set costPrevious = GetTotalLumberCost (idOld ) call StoreInteger (gc, "CGpreviousLumber", s, costPrevious ) call StoreInteger (gc, "CGtotalLumber", s, iL+costPrevious ) set iF = GetFoodUsed (id ) set costPrevious = GetFoodUsed (idOld ) call StoreInteger (gc, "CGpreviousFood", s, costPrevious ) call StoreInteger (gc, "CGupgradeFood", s, iF-costPrevious ) call SetPlayerState (p, PLAYER_STATE_RESOURCE_GOLD, gold ) call SetPlayerState (p, PLAYER_STATE_RESOURCE_LUMBER, lumber ) call EnableTrigger (trg_upgrade ) set u = nullendfunctionprivate function Upgrade takes nothing returns boolean if not(HaveStoredInteger (gc, "CGtotalGold", I2S (GetUnitTypeId (GetTriggerUnit ())))) then call UpgradeEx () endif if INSTA_BUILD then call UnitSetUpgradeProgress (GetTriggerUnit (), 100 ) endif return falseendfunctionprivate function BuildEx2 takes nothing returns nothing local unit u = built [R2I (TimerGetRemaining (GetExpiredTimer ())+0.9 )] local integer i = GetPlayerState (GetOwningPlayer (u ), PLAYER_STATE_RESOURCE_FOOD_CAP ) call UnitSetConstructionProgress (u, 100 ) call SetPlayerState (GetOwningPlayer (u ), PLAYER_STATE_RESOURCE_FOOD_CAP, i + GetUnitFoodMade (u )) //did I mention WC3 sucks? Bug with double food sometimes. set u = null call DestroyTimer (GetExpiredTimer ())endfunctionprivate function Build takes nothing returns boolean //if INSTA_BUILD then // this isn't needed, but I left it as a reminder this code ONLY runs if INSTA_BUILD is set to true. set built [c ] = GetConstructingStructure () call TimerAttach (CreateTimer (), 0.1, c, function BuildEx2 ) if c >= 254 then set c = 1 else set c = c + 1 endif //endif return falseendfunctionprivate function OrderEx4 takes nothing returns nothing call RemoveUnit (ordered [R2I (TimerGetRemaining (GetExpiredTimer ())+0.9 )]) call DestroyTimer (GetExpiredTimer ())endfunctionprivate function OrderEx3 takes nothing returns nothing local integer i = R2I (TimerGetRemaining (GetExpiredTimer ())+0.9 ) local player p = GetOwningPlayer (ordered [i ]) local integer gold = GetPlayerState (p, PLAYER_STATE_RESOURCE_GOLD ) local integer lumber = GetPlayerState (p, PLAYER_STATE_RESOURCE_LUMBER ) call DisableTrigger (trg_order ) call PauseUnit (ordered [i ], true) call IssueImmediateOrder (ordered [i ], "stop") call PauseUnit (ordered [i ], false) call SetPlayerState (p, PLAYER_STATE_RESOURCE_GOLD, gold ) call SetPlayerState (p, PLAYER_STATE_RESOURCE_LUMBER, lumber ) call TimerAttach (GetExpiredTimer (), 0.1, i, function OrderEx4 ) call EnableTrigger (trg_order )endfunctionprivate function EnumEx takes nothing returns boolean local unit u = GetFilterUnit () set listU [loopInt ] = u set listSelected [loopInt ] = IsUnitSelected (u, GetLocalPlayer ()) call ShowUnit (u, false) set loopInt = loopInt + 1 set u = null return falseendfunctionprivate function OrderEx2 takes unit t, integer id, real x, real y returns nothing local player p = GetOwningPlayer (t ) local integer uid = GetUnitTypeId (t ) local unit u local string s = I2S (id ) local integer gold = GetPlayerState (p, PLAYER_STATE_RESOURCE_GOLD ) local integer lumber = GetPlayerState (p, PLAYER_STATE_RESOURCE_LUMBER ) local integer cap = GetPlayerState (p, PLAYER_STATE_RESOURCE_FOOD_CAP ) local integer ceiling = GetPlayerState (p, PLAYER_STATE_FOOD_CAP_CEILING ) local integer food = GetFoodUsed (id ) local integer iG local integer iL local integer max call DisableTrigger (trg_order ) call SetPlayerState (p, PLAYER_STATE_RESOURCE_GOLD, 99999999 ) call SetPlayerState (p, PLAYER_STATE_RESOURCE_LUMBER, 99999999 ) call SetPlayerState (p, PLAYER_STATE_RESOURCE_FOOD_CAP, 10000 ) call SetPlayerState (p, PLAYER_STATE_FOOD_CAP_CEILING, 10000 ) set iG = GetPlayerState (p, PLAYER_STATE_RESOURCE_GOLD ) // incase a limit exists set iL = GetPlayerState (p, PLAYER_STATE_RESOURCE_LUMBER ) set u = CreateUnit (p, uid, DUMMY_X, DUMMY_Y, 0. ) call SetUnitVertexColor (u, 0, 0, 0, 0 ) call UnitAddAbility (u, 'Aloc') call IssueBuildOrderById (u, id, x, y ) set iG = iG - GetPlayerState (p, PLAYER_STATE_RESOURCE_GOLD ) set iL = iL - GetPlayerState (p, PLAYER_STATE_RESOURCE_LUMBER ) call SetPlayerState (p, PLAYER_STATE_RESOURCE_FOOD_CAP, cap ) call SetPlayerState (p, PLAYER_STATE_FOOD_CAP_CEILING, ceiling ) call StoreInteger (gc, "CGupgradeFood", s, food ) call StoreInteger (gc, "CGtotalGold", s, iG ) call StoreInteger (gc, "CGupgradeGold", s, iG ) call SetPlayerState (p, PLAYER_STATE_RESOURCE_GOLD, gold ) call StoreInteger (gc, "CGtotalLumber", s, iL ) call StoreInteger (gc, "CGupgradeLumber", s, iL ) call SetPlayerState (p, PLAYER_STATE_RESOURCE_LUMBER, lumber ) set ordered [o ] = u call TimerAttach (CreateTimer (), 0.05, o, function OrderEx3 ) if o >= 254 then set o = 1 else set o = o + 1 endif call PauseUnit (u, true) call PauseUnit (t, false) call EnableTrigger (trg_order ) set u = nullendfunctionprivate function OrderEx takes nothing returns nothing local integer i = R2I (TimerGetRemaining (GetExpiredTimer ())+0.9 ) call OrderEx2 (ordered [i ],orderedID [i ], orderedX [i ], orderedY [i ]) call DestroyTimer (GetExpiredTimer ())endfunctionprivate function DistanceShort takes real x1, real x2, real y1, real y2 returns boolean local real dx = x1 - x2 local real dy = y1 - y2 return dx*dx + dy * dy < distanceCheck endfunctionprivate function Order takes nothing returns boolean local integer id = GetIssuedOrderId () if IsUnitIdType (id, UNIT_TYPE_STRUCTURE ) == true and not(HaveStoredInteger (gc, "CGtotalGold", I2S (id ))) then set ordered [o ] = GetTriggerUnit () set orderedID [o ] = id set orderedX [o ] = GetOrderPointX () set orderedY [o ] = GetOrderPointY () if DistanceShort (GetOrderPointX (), GetUnitX (GetTriggerUnit ()), GetOrderPointY (), GetUnitY (GetTriggerUnit ())) then call PauseUnit (GetTriggerUnit (), true) endif call TimerAttach (CreateTimer (), 0.01, o, function OrderEx ) if o >= 254 then set o = 1 else set o = o + 1 endif endif return falseendfunctionprivate function Init takes nothing returns nothing local trigger t1 = CreateTrigger () local trigger t2 = CreateTrigger () local trigger t3 = CreateTrigger () local boolexpr bx1 = Condition (function Upgrade ) local boolexpr bx2 = Condition (function Build ) local boolexpr bx3 = Condition (function Order ) local integer i = 0 loop exitwhen i >= 12 call TriggerRegisterPlayerUnitEvent (t1, Player (i ), EVENT_PLAYER_UNIT_UPGRADE_START, null) if INSTA_BUILD then call TriggerRegisterPlayerUnitEvent (t2, Player (i ), EVENT_PLAYER_UNIT_CONSTRUCT_START, null) endif call TriggerRegisterPlayerUnitEvent (t3, Player (i ), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER, null) set i = i + 1 endloop call TriggerAddCondition (t1, bx1 ) if INSTA_BUILD then call TriggerAddCondition (t2, bx2 ) endif call TriggerAddCondition (t3, bx3 ) set trg_order = t3 set trg_upgrade = t1 set t1 = null set t2 = null set t3 = null set g = CreateGroup () set distanceCheck = DISTANCE_CHECK_RANGE * DISTANCE_CHECK_RANGE call FlushGameCache (InitGameCache (GAME_CACHE_STRING )) set gc = InitGameCache (GAME_CACHE_STRING )endfunctionendlibrary
__________________
 | Quote: [20-00-13] MasterHaosis: Because I am retarded douchebag [20-15-23] MasterHaosis: I am faggot, retard and such.. [20-21-22] MasterHaosis: because I am chat moderator. And you dont have right to speak against me ~Void~: Knock it off, for fuck's sake. Get that bullshit out of your signature and stop being so immature. Let it die out. | |
Last edited by Captain Griffen; 08-01-2008 at 12:46 PM..
|
|
|
03-29-2008, 09:05 AM
|
#2 (permalink)
|
******
Join Date: Nov 2005
Posts: 747
|
Okay, proof positive one should not code late at night. A few handle index leaks, and also some dumb methodoloy. Will fix now.
EDIT: All fixed up, I think.
__________________
 | Quote: [20-00-13] MasterHaosis: Because I am retarded douchebag [20-15-23] MasterHaosis: I am faggot, retard and such.. [20-21-22] MasterHaosis: because I am chat moderator. And you dont have right to speak against me ~Void~: Knock it off, for fuck's sake. Get that bullshit out of your signature and stop being so immature. Let it die out. | |
Last edited by Captain Griffen; 03-29-2008 at 10:40 AM..
|
|
|
03-30-2008, 02:54 PM
|
#3 (permalink)
|
iRawr
Join Date: Dec 2005
Posts: 8,349
|
Quote:
|
Does NOT work with lumber costing towers. As in, it might break.
|
I tried it out with a Farm and a Scout Tower, just out of curiosity, and it worked fine, so unless you mean it has a chance to break, then it seems okay. (I see the theory as to why it may cause problems, but in practice it doesn't seem causable, as the order even has a delay before construction if the tower is placed directly on top of the builder)
Quote:
|
Includes insta-build. If you don't want that, then just set the constant to false.
|
I would suggest leaving it as false then allowing them to set it to true - I wouldn't be surprised if more people who use this won't want it than will.
Quote:
|
If you feel this is beyond you, then adding 'private' to the line 'gamecache gc', to give 'private gamecache gc', will solve the problem, but won't be quite so memory efficient.
|
To be honest, I doubt GUI users will be worrying too much about memory efficiency :P
About the code -
Nothing major, just some minor tweaks that you could do if you care...
In Init, you shouldn't need to null t1/t2/t2 (as they are never destroyed anyways) (For the same reason, using boolexprs seems tedious, and it defeats the purpose of doing so (to my knowledge) if you are not destroying the trigger anyways...)
In Order, I'm pretty sure the rule for buginess with IsUnitType only occurs if the function in question is the last term of the boolean, and only if it is used directly in a boolexpr.
As for "CGtotalcost", is there actually a need of storing that seperately from "CGupgradecost"? It is a tiny bit more efficient, I guess, but so marginal (since I doubt they will be reading the gold cost very rapidly, and if they are, they should store it anyways, even assuming that 2 gamecache calls instead of 1 would tip their code over the edge...) that it seems like a waste of time to store.
Just out of curiosity, what is 851976 (as it has no orderstring) - Cancel (It seems so in the code)?
Also, I was wondering, what is the theory between TimerAttach? When the non-looping timer expires, does it revert to its "old" duration?
Anyways, approved.
|
|
|
03-30-2008, 04:53 PM
|
#4 (permalink)
|
******
Join Date: Nov 2005
Posts: 747
|
Quote:
Originally Posted by PurplePoot
I tried it out with a Farm and a Scout Tower, just out of curiosity, and it worked fine, so unless you mean it has a chance to break, then it seems okay. (I see the theory as to why it may cause problems, but in practice it doesn't seem causable, as the order even has a delay before construction if the tower is placed directly on top of the builder)
|
If you don't have enough lumber to make another one, then the system will break, I think. I will, however, make it work with lumber at some point, and I think I have an idea on how to avoid needing to increment/decrement food, as well, but blizzard have a tendancy to throw up random suprises.
Quote:
|
I would suggest leaving it as false then allowing them to set it to true - I wouldn't be surprised if more people who use this won't want it than will.
|
Blargh, up to them. I suspect this will mainly be used in TDs, and most TDs should have insta build imo.
Quote:
|
To be honest, I doubt GUI users will be worrying too much about memory efficiency :P
|
True.
Quote:
Nothing major, just some minor tweaks that you could do if you care...
In Init, you shouldn't need to null t1/t2/t2 (as they are never destroyed anyways) (For the same reason, using boolexprs seems tedious, and it defeats the purpose of doing so (to my knowledge) if you are not destroying the trigger anyways...)
|
True, nulling isn't necessary, but meh. Boolexprs are, however, faster.
Quote:
|
In Order, I'm pretty sure the rule for buginess with IsUnitType only occurs if the function in question is the last term of the boolean, and only if it is used directly in a boolexpr.
|
Better safe than sorry.
Quote:
|
As for "CGtotalcost", is there actually a need of storing that seperately from "CGupgradecost"? It is a tiny bit more efficient, I guess, but so marginal (since I doubt they will be reading the gold cost very rapidly, and if they are, they should store it anyways, even assuming that 2 gamecache calls instead of 1 would tip their code over the edge...) that it seems like a waste of time to store.
|
The storing takes place once. The reading can take place a hundred times.
Quote:
|
Just out of curiosity, what is 851976 (as it has no orderstring) - Cancel (It seems so in the code)?
|
It's cancel, correct.
Quote:
|
Also, I was wondering, what is the theory between TimerAttach? When the non-looping timer expires, does it revert to its "old" duration?
|
I don't really know, I need to investigate it now, since it seems to be displaying some odd behaviour at low values (different to normal). It seems to be 100% reliable behaviour, but not entirely consistent. In some way, though, it doesn't fully update stuff if started when paused if in the same moment as it was initially started.
I've been meaning to properly document it since I discovered it, but I'm busy atm. Will do eventually.
Thank you.
__________________
 | Quote: [20-00-13] MasterHaosis: Because I am retarded douchebag [20-15-23] MasterHaosis: I am faggot, retard and such.. [20-21-22] MasterHaosis: because I am chat moderator. And you dont have right to speak against me ~Void~: Knock it off, for fuck's sake. Get that bullshit out of your signature and stop being so immature. Let it die out. | |
|
|
|
03-31-2008, 12:59 AM
|
#5 (permalink)
|
iRawr
Join Date: Dec 2005
Posts: 8,349
|
Quote:
|
If you don't have enough lumber to make another one, then the system will break, I think. I will, however, make it work with lumber at some point, and I think I have an idea on how to avoid needing to increment/decrement food, as well, but blizzard have a tendancy to throw up random suprises.
|
Worked fine for me with exactly enough gold/lumber to afford one farm.
Quote:
|
True, nulling isn't necessary, but meh. Boolexprs are, however, faster.
|
Kewl.
Quote:
|
The storing takes place once. The reading can take place a hundred times.
|
I didn't meant storing speed, so much as memory (Though both ways are insignificant) - I was more wondering why you had coded it that way than suggesting a change.
|
|
|
04-01-2008, 11:51 AM
|
#6 (permalink)
|
******
Join Date: Nov 2005
Posts: 747
|
Fixed a bug where I forgot to unpause units held in the queue (which would have been used only if two buildings were ordered made for the first time within 0.01 seconds).
Quote:
Originally Posted by PurplePoot
Worked fine for me with exactly enough gold/lumber to afford one farm.
|
Possibly, didn't actually test it. I will at some point make it work fully with lumber costs as well.
Quote:
|
I didn't meant storing speed, so much as memory (Though both ways are insignificant) - I was more wondering why you had coded it that way than suggesting a change.
|
Memory is very cheap, and it's very little memory, while GC calls are relatively expensive.
__________________
 | Quote: [20-00-13] MasterHaosis: Because I am retarded douchebag [20-15-23] MasterHaosis: I am faggot, retard and such.. [20-21-22] MasterHaosis: because I am chat moderator. And you dont have right to speak against me ~Void~: Knock it off, for fuck's sake. Get that bullshit out of your signature and stop being so immature. Let it die out. | |
|
|
|
07-21-2008, 09:49 PM
|
#7 (permalink)
|
******
Join Date: Nov 2005
Posts: 747
|
Anyway, critical update. Fixes bugs, including possible (but rare) critical error bugs. Now fully supports queued orders, lumber, and food, and appears to be completely safe.
(Resolved several irrirating blizzard bugs that had plagued the original.)
__________________
 | Quote: [20-00-13] MasterHaosis: Because I am retarded douchebag [20-15-23] MasterHaosis: I am faggot, retard and such.. [20-21-22] MasterHaosis: because I am chat moderator. And you dont have right to speak against me ~Void~: Knock it off, for fuck's sake. Get that bullshit out of your signature and stop being so immature. Let it die out. | |
|
|
|
08-08-2008, 11:55 AM
|
#8 (permalink)
|
User
Join Date: Jun 2008
Posts: 6
|
Um I cant seem to get this to work? It says so many errors? I plugged it in and try to test it and it has like 200 errors? Any suggestions?
|
|
|
08-08-2008, 11:57 AM
|
#9 (permalink)
|
ɹǝsn
Join Date: Feb 2006
Posts: 3,470
|
Use JASS New Gen Pack. This is, afterall, a vJASS spell.
--donut3.5--
|
|
|
08-09-2008, 12:53 PM
|
#10 (permalink)
|
User
Join Date: Jul 2008
Posts: 157
|
Is this like an ability then? I dont really understand how I shall add the code, I just need to add it then it all works?
|
|
|
08-09-2008, 03:10 PM
|
#11 (permalink)
|
******
Join Date: Nov 2005
Posts: 747
|
Quote:
Originally Posted by Rikardo
Is this like an ability then? I dont really understand how I shall add the code, I just need to add it then it all works?
|
Yes. Then you can use those functions on any building. Hmm... I should probably update this to the code that works for all units.
| |
|
|