Search Unity

TowerDefense ToolKit 4

Discussion in 'Assets and Asset Store' started by Song_Tan, Apr 18, 2012.

  1. Morlok

    Morlok

    Joined:
    Sep 9, 2012
    Posts:
    5
    Personally I prefer TDTK, but it really depend on how you imagine your TD game to be setup.
    I would recommend taking a pen and paper and make a rough outline of what you TD need.

    As Song, mention there is a few minor differences on how things work, you should use these when considering what TD package to use.
    If you know some C# it should be possible to mod both packages, so chose the one that need the least modding.

    That said... take a look at the perk system in TDTK... its nice... :p
     
  2. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    @Morlok, thanks for the clarification.
     
  3. Tsurugi

    Tsurugi

    Joined:
    Sep 21, 2012
    Posts:
    97
    songtan after i deleted the whole tdtk folder and importing a new one in and unpacked the tdtk_NGUI_full, i came across an error

    Assets/NGUI/Examples/Scripts/InventorySystem/Game/EquipRandomItem.cs(16,16): error CS0246: The type or namespace name `InvEquipment' could not be found. Are you missing a using directive or an assembly reference?

    Assets/NGUI/Examples/Scripts/InventorySystem/Game/UIItemSlot.cs(26,9): error CS0246: The type or namespace name `InvGameItem' could not be found. Are you missing a using directive or an assembly reference?

    Assets/NGUI/Examples/Scripts/InventorySystem/Game/UIEquipmentSlot.cs(15,16): error CS0246: The type or namespace name `InvEquipment' could not be found. Are you missing a using directive or an assembly reference?

    Assets/NGUI/Examples/Scripts/InventorySystem/Game/UIItemStorage.cs(64,21): error CS0246: The type or namespace name `InvGameItem' could not be found. Are you missing a using directive or an assembly reference?
     
  4. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    These are NGUI example scripts, should have nothing to do with TDTK's one. Please make sure you got NGUI import correctly. I would suggest you to remove everything about NGUI and re-import a fresh copy.

    Please note that NGUI free and full are mutually exclusive. You cant have both at the same time. This applies to the NGUI package of TDTK too. So if you are using TDTK_NGUI_Full, You shouldnt import content in TDTK_NGUI_Free and vice versa. Also the scripts in TDTK_NGUI_Full rely on the latest NGUI, so make sure the one in your project is of the later version (NGUI3+).
     
  5. unitynewb

    unitynewb

    Joined:
    Feb 22, 2009
    Posts:
    243
    Is it possible to place a tower on a hill with this? Can you only place towers on flat surfaces?
     
  6. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Short answer yes.

    Long answer, depends on what exactly do you mean by place a tower on a hill. If you mean placing a tower standing up-right on a hill surface? Definitely yes. See the requirement is that you can only build tower on a pre-placed build platform, like what you see in the demo. The tower will take the position and orientation of the platform where it's built on. Now the platform can be positioned at any where so you can place them on a hill/slope, no problem. If you want the tower to be tilt according to the slope of the hill, then you need to tilt the platform. Then the towers build on it will be tilted as well. However there's some limitation to tilting the tower. Thing is I havent tested this myself thoroughly. But it should be fine as long as the slope is reasonable (not overly steep).

    Hope this answer your question.
     
  7. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    A quick anouncement: I'll be away and traveling for the next two weeks starting tomorrow. Obviously I wont be as readily available as I currently am. So my apologize in advance for the slow respond to any potential question/issue.
     
  8. SirTobi

    SirTobi

    Joined:
    Jan 27, 2014
    Posts:
    1
    Hello everybody,

    although songtan is not available in the moment maybe you guys are able to answer a really basic question for which i did not find a satisfying solution yet.

    Whenever you start to build a TD with the Dev Kit there is no problem with the "size" of the models and other UI elements.

    In my case I am using a terrain and I am kind of bound to the size of it which is 1000 x 1000. Therefore of course all the models and UI elements are too small. When i am increasing the size of them, of course, their movement is to slow in comparison to their size. So i speed them up but then i need to speed up the shooting frequency and the range of the towers as well and so on and so on. Until now i altered several settings and i am still not getting a good solution.

    so simple questions ahead:

    Is it possible to "resize" the entire package to fit a larger environment as the one which is given by default? Is the TDTK scaleable?

    Thanks in advance for any answer!

    Best regards,

    Tobi
     
  9. Morlok

    Morlok

    Joined:
    Sep 9, 2012
    Posts:
    5
    Its possible to scale the grid, but I can see how this may cause some other issues...
    From what I know range etc. is made in Unity units 1 unit = 1 meter.
    So a unit with a range of 10, will have a range of 10 meters.
    if you use a grid size of 2, it will be 5 squares.

    If you scale up the package bu letting a square = 100 meters, all other values need to be scaled up too.

    Now that said, I'm not exactly sure how this is related to the UI elements (GUI)...
    Unless its due to scaling of the various range indicators etc. in that case they should be replaced with objects with a higher resolution.

    To be honest I think the best choice would be to scale down the terrain and assets.
    It should be possible to do so in the terrain editor, by changing the terrain length, hight etc. and teh resolution.

    Not sure if this help or I misunderstood the original question, in that case just say so :)
     
  10. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    @Morlok, Many thanks for the detail clarification, you are absolutely right there.

    @SirTobi, I'm afraid there's no magic variable that can alter the scale of the whole project. It's best to try scale down the size of the terrain, a single element, instead of changing everything else. Is there a reason why the terrain's size is fixed? Like you said it yourself, there are simply too many things that need to be taken into consideration. It's a bit unpractical to tie all of them to just one adjustable scaling factor. It may create more restriction/issue rather than solve the problem.

    Btw just to clarify, I dont think this scaling has anything to do with UI (those that comes default with TDTK), except the range indicator and HP-overlay. For the range-indicator, the scale will be auto adjusted so it's a non issue. For the HP-overlay, they are tie to the scale of the tower/creep prefab so you can adjust it rather easily by doing from the root of the prefab while you are adjusting the scale of the mesh. The rest of the UI elements are independent of the in game objects scale. Rather, they are dependent on the screen resolution.
     
  11. pako

    pako

    Joined:
    Nov 21, 2012
    Posts:
    111
    Hi,

    I think I've discovered a few bugs, all relative to NGUI:

    1. I imported NGUI 3.0.8 f7, since the last NGUI version published (3.0.9 f7) has bugs out of the box... Then I imported TDTK 2.2.5 f2 and TBTK_NGUI_Full. A Null Reference exception is thrown pointing to UISprite.cs line 578 (see attached screenshot). This error does not show if NGUI is imported in an empty project, and the error goes away when I import NGUI 3.06 f6, which is the earliest v3 NGUI version that I have. So, it seems that even though the error points to an NGUI script, it has to do with the coexistence of the 3.0.8 version with TDTK. It would be good if this is resolved so that I can work with the latest NGUI version.

    2. So, now I work with NGUI 3.0.6 f6. If I add in the scene a UI NGUI, a null reference is thrown again. Only this is more like a typo that I mention here, so that it gets corrected in the next version of TDTK: In the MenuExtensionUI script line 12 there is a command to instantiate a prefab "ScenePrefab/UI NGUI". However, in the ScenePrefab folder the prefab's name is UI_NGUI, i.e. with an underscore between UI and NGUI (see attached screenshots). Between having to correct either the name of the actual prefab or its name in line 12 of the script, I decided to do the latter, and of course the error went away. Please correct it, it's a small thing, but its a nuisance.

    3. In the TDTK (NGUI Full)/ExampleScenes the two maze scenes (ExMazeMultiPathNGUI and ExMazeTerrainNGUI) don't work properly. Whenever you select a tower and click on a platform to build, you get a message "building cancelled". I didn't look too deep to find why it does that, but the error goes away when you set in UINGUI the Build Mode to PointNBuild. It would be nice to have this fixed as the examples are learning tools, and when you're learning something new it's not so easy to recognize a bug when there is one.

    On another note: I am considering the possibility of using TDTK with sprites, in conjunction with -for example- 2D Toolkit. I've seen some references in this forum that this could be possible. However, I'm not quite sure how to implement several animations for move e.g. MoveRight, TurnFromRightUp, TurnFromRightDown, Turn From UpLeft etc. In UnitCreep I could set AnimationMove size to -say- 12, and have 12 animation clips, each corresponding to a specific maneuver/motion. But how would TDTK know when to use each animation, so for instance if my creep is moving towards the right and then needs to go up, it would play the TurnFromRightUp animation clip.

    Thanks in Advance.
     

    Attached Files:

  12. pako

    pako

    Joined:
    Nov 21, 2012
    Posts:
    111
    The documentation for ObjectPoolManager.Spawn reads"

    "called to spawn and return an instance of the gameObject, similar to default Instantiate(). The
    function will attempt to return an inactive object in the pool. If there isn’t any object available,
    the function will then create a new object using Instantiate instead. The newly instantiated
    object will be added to the pool."

    I'm referring to the last two sentences in conjunction with the ObjectPoolManager.cs lines 127-129. I might be wrong about this, but it seems to me from the code, that if a gameObject is not already in the pool it will be instantiated but NOT added to the pool as the documentation points out. Is the newly created gameObject added to the pool somewhere else in code that I can't figure out, or is the documentation wrong?
     
  13. pako

    pako

    Joined:
    Nov 21, 2012
    Posts:
    111
    The AudioManager component is supposed to be optional. However, if there isn't one in the scene, GameControl will automatically create one. So, in fact, this isn't really optional, but the thing is, I want it to be optional because I have my own AudioManager to use, and it is very inconvenient if the GameController keeps adding one that I don't need. Of course, I could comment out lines 101-103 in GameControl.cs, but then every time there's an update in TDTK I'd have to remember to go back and comment out those lines again.

    I'd really appreciate if you made AudioManager "more optional". :)

    Hey Song, sorry for "hitting you" with 3 posts today, but all these issues were kind of piling up on me in the past few days, as I'm getting familiar with TDTK.
     
  14. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Hi Pako,

    First, I really appreaciate the detailed feedback. :)

    As you probably aware I'm not in office for this few days so there might be some delay. I'll try to get it done asap when I'm back to work.

    Starting with NGUI. Not sure why's that but from the error you show me it seems like it's from NGUI itself. I'll also check with the two not working scene as soon as I can. You are absolutely right about the ObjectPoolManager. The documentation is wrong it seems. I'll try to fix the ObjectPoolManager or at least change the documentation to match. Finally I see your point about AudioManager, I'll expose the option to make it mandatory or not in the next update.

    As for the direction detection of movement sprite, I'm sorry to say that is not supported by default. You will have to write our own code to detect the direction and play the corresponding animation. It's not too difficult, I can probably help if you need it. The code you'll need to look into is all in UnitCreep.cs
     
  15. pako

    pako

    Joined:
    Nov 21, 2012
    Posts:
    111
    Hi Songtan,

    Thanks for the quick response.

    Regarding NGUI: By looking at the error, my first reaction too was that its from NGUI itself, but I tested and tested, and this error comes up only when this particularly version of NGUI coexists with TDTK. So, yes, it's very odd to say the least, and I'd really appreciate some feedback from anyone on this issue, i.e. is it just my setup or can the error be reproduced on other machines too: I'm running Unity 4.2.2f1, TDTK 2.2.5f2 and NGUI 3.0.8 f7 and I get a null reference exception pointing to UISprite line 578 (per the image in my previous post). Notably, NGUI 3.0.8 f7 in a project/scene just by itself does not produce this error. Any volunteers to check this out ? :p

    Thanks for directing me to UnitCreep.cs for direction detection of sprite movement. I'll take a look and might get back to you on this one if necessary.

    EDIT: I repeated the testing and apparently the NGUI error went away! The only thing that changed since testing last night, is that I switched off/on my PC. During my testing last night I restarted Unity more than once, and could reproduce the error. Now, there's no way that I can reproduce the error, and all projects that had the error were "magically" fixed! So, I guess this was just one of those things... Sorry for taking your time on this.
     
    Last edited: Jan 30, 2014
  16. pako

    pako

    Joined:
    Nov 21, 2012
    Posts:
    111
    Hi Song,

    Some more testing revealed that the referenced NGUI example scenes produce the undesirable behaviour only after I switched the platform to Android. I built for Android because I wanted to test it out and see how it works. BTW, after some attempts I made it work with Point and Build, and the scene worked fine at about 30FPS on a 1Ghz Android 2.3 phone. Nevertheless, the example scenes are there for a specific purpose and need not work on Android. So, I thought I'd follow up my original post just in case someone else might find the info useful.
     
  17. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    I guess the UISprite error with NGUI is due to some runtime data. You got rid of it as soon as you reboot the PC, or in some case just by restarting Unity. So you should be fine for this point on.

    The Android/PC setting conflict for the PointNBuild buiding scheme is probably working as intended. Note that when setting the target to a specific platform, there are certain section of code that get switched in/out, render certain input on the non-selected platform not working. In your case, setting the target platform to Android stop PointNBuild scheme working on desktop.
     
  18. UltraTM

    UltraTM

    Joined:
    Dec 8, 2013
    Posts:
    221
    have also a Question.
    how can i make the first click shows the tooltip on mobile for point and click.
    want to make an Android game.

    And tooltip mouse hover is not possible on mobile devices ^^

    Thx :)
     
  19. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    That will pretty much depends on what GUI are you using. Assume you are using NGUI3, you will need to look into UINGUIBuildPanel.cs. What you need to do is when the build button click function is called (OnTowerButton()), you record the ID of the button being clicked and show the appropriate tooltip. When the next click happen, you compare the new ID against the last click ID. If they are the same, build the tower. If not, show the tooltip for the new button. The same concept can be applied to other UI scripts.

    Hope this helps.
     
  20. SporeLab

    SporeLab

    Joined:
    Jan 16, 2014
    Posts:
    6
    Song. I am having a problem with selectable grids on platforms. I currently have 8 platforms with grids on my scene. All work fine until I sell a tower, then some of the grids on some of the platforms are no longer highlight and are no longer selectable. Which ones is always pretty random, and it is not necessarily the grid or platform the tower was on. Have you seen this? Any ideas on how to solve?
     
  21. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Have to say I've never come across this, or notice it. Unfortunately I'm currently out of office until next week. Please give me a few days. I'll look into it as soon as I get back to work. Thanks for your patient.
     
  22. SporeLab

    SporeLab

    Joined:
    Jan 16, 2014
    Posts:
    6
    No hurry.
     
  23. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Found the bug and fixed it. It's very simple, open UI.cs and enable line883. Basically you need to change it from:

    //else towerUIRect=new Rect(0, 0, 0, 0);

    to

    else towerUIRect=new Rect(0, 0, 0, 0);
     
  24. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    Hey! Iam thinking about to buy your kit but just have one question before i start:
    is it possibile to make the turrets and so on "free-placeable" so define a placeable area and then place it wherever you want to. instead of a grid system you know?
     
  25. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Thanks for your interest. I'm afraid what you are asking is not supported by default. However it can be done with a bit of modification. Shouldnt be too difficult I imagine.
     
  26. Pinguin101

    Pinguin101

    Joined:
    May 10, 2013
    Posts:
    3
    I have bought this package, but for some odd reason when I use the resource manager, it either clears or resets. I'm trying to just add a few more resources, any ideas why this won't work for me?

    I was getting can't find filepath, so I changed line: 113 in ResourceEditorWindow.cs

    Code (csharp):
    1. xmlDoc.Save(Application.dataPath  + "\\TDTK\\TDTK (Base)\\Resources\\Resource.txt");

    My other question is, which version of Unity is this currently supported for? I've tried with the latest (4.3.4) and I've tried 3.5.6
     
    Last edited: Feb 14, 2014
  27. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Thanks for your support Pinguin101. What you have come across has nothing to do with the version of Unity. It's probably a known bug. I've the fix but I havent yet upload the new update to AssetStore. To fix the bug, simply change line110 of ResourceEditorWindow.cs to following:

    Code (csharp):
    1. xmlDoc.Save(Application.dataPath  + "/TDTK/TDTK (Base)/Resources/PrefabList/Resource.txt");
    If this doesnt fix the problem, please let me know the error message in your console and I'll look into it.
     
  28. Pinguin101

    Pinguin101

    Joined:
    May 10, 2013
    Posts:
    3
    Haha thank you, this fixed it. :)
     
  29. Zbigniew Wiadro

    Zbigniew Wiadro

    Joined:
    Aug 20, 2013
    Posts:
    6
    Hi, Song. I encounter the following bug:

    My TDTK version is 2.2.4f1.
    In Tower Editor -> AOE tower -> section DamageOverTime -> field Modifier:
    when I edit that field in "Level1" column, then modifier changes automatically in Level2 and Level3 columns (is it a bug?).
    What is more, when I set the "modifier" to 0 (or any other value), then TotalDamage is calculated properly for Level1, but in Level2 and Level3 the initial value of modifier=1 is taken.
    It seems that the 'modifier' field from the first column is bound to all columns (level1, level2, level3).

    Please provide some code to correct that small bug.
    Thanks!
     
    Last edited: Feb 19, 2014
  30. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Thanks a bunch for letting me know. I've just pm you the fix. Sorry for the trouble.
     
  31. MadMark

    MadMark

    Joined:
    Jan 18, 2014
    Posts:
    1
    Hello songtan,

    I am spawning a creep with a spawn animation, but they are moving forward before the animation has finished. Is this an easy fix? Or am I doing something wrong.

    Thanks.
     
  32. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    There's a stopForSpawnAnimation flag which you need to set to true. The flag is not exposed in CreepEditor but you should be able to find it in the Inspector when you select a creep prefab. It's the very last variable in the Inspector. Hope this help.
     
  33. cameron3200

    cameron3200

    Joined:
    Feb 26, 2014
    Posts:
    2
    Hello everyone,
    I have been using TDTK Free to build a little TD game but recently purchased the full version. Since switching I have had a few bugs I can't seem to figure out. It might just be extra configuration needed, I'm not sure. The symptoms occur whenever "Auto Generate Wave" is selected.

    Issue1: When using finite spawning I get the following type of error upon spawning a creep:

    Issue2: When using infinite spawning I get the following error if a creep scores past the first wave:
    I've also only experienced issue 2 with new scenes and not the example scenes so I wonder if further configuration that I'm unaware of might be needed. Thanks in advance for any help you can provide.
     
    Last edited: Feb 26, 2014
  34. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Hi cameron3200, thanks for your support purchasing the full version and thanks for letting me know. The first issue is harmless and the second one seems to be a bug. Thing is it works fine with the example scenes but even I cant figure out what am I missing in the configuration. At any rate, please bear with me. I'll find out why and let you know.
     
  35. cameron3200

    cameron3200

    Joined:
    Feb 26, 2014
    Posts:
    2
    Hi Songtan,
    While the first issue does appear to be harmless I have found whenever it appears the resourcegain bonus for completing a wave doesn't work. Thanks for confirming the issues with me. I've been going nuts looking for what I may have done wrong.
     
  36. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Thanks so much for letting me know about the bug. I've found out where the errors comes from and fixed it. Please send me an email if you want me to send you the fix right away. Alternatively, you can wait a bit until I update the package altogther, probably at this weekend.
     
  37. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Hello all,

    Just a quick notice that a new update has been uploaded to AssetStore. Nothing new though, just a bunch of bug fixes and very minor changes for previous release based on user feedback. They are as follow (please note the minor changes has been left out of this list):
    • made some changes to ObjectPoolManager, unrecognised/new object requested to be spawned without initiation will be added to the pools
    • fix a bug with default UI where certain screen area become non-responsive to cursor input after a tower has been selected
    • fix bug on resource editor where the data wont load/save properly
    • fix bug on tower editor where damage over time setting doesn't work
    • fix bug and improves menu extension regarding adding UI or NGUI to a scene
    • fix bug on SpawnManager where it throws up error in some case when set to auto-generate wave
     
  38. tunner

    tunner

    Joined:
    Mar 4, 2014
    Posts:
    3
    sorry i am asia

    I asked
    About the support tower

    TowerMg

    Status dmg Lv1= 1 Lv2 = 2

    i build TowerMg Lv1 dmg=1 >>>> build tower support +1 >>>dmg towerMg = 2 >>>> Upgarde TowerMg Lv2 >>>Why dmg = 2 ?????????

    Why do not the= 4 dmg !!!! >>>>>> 1+1=2 >>>>2+[lv2=2] = 4
     
  39. tunner

    tunner

    Joined:
    Mar 4, 2014
    Posts:
    3
    Please give me the answer...
     
  40. tunner

    tunner

    Joined:
    Mar 4, 2014
    Posts:
    3





    sorry i am asia

    I asked
    About the support tower

    TowerMg

    Status dmg Lv1= 1 Lv2 = 2

    i build TowerMg Lv1 dmg=1 >>>> build tower support +1 >>>dmg towerMg = 2 >>>> Upgarde TowerMg Lv2 >>>Why dmg = 2 ?????????

    Why do not the= 4 dmg !!!! >>>>>> 1+1=2 >>>>2+[lv2=2] = 4



    Please give me the answer...
     
  41. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Sorry I was away. While I try my best to respond as soon as I can please note that I do not sit in front of the computer all the time checking on post and email. So please be patient dont spam the thread if I dont answer your post within minutes.

    What you are encountering is bug. Thanks for letting me know. Please ignore it for the time being. I'll fix it and put it in the next update. If you are in a hurry please send me an email so I can send you an advance copy.
     
  42. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    @tunner, I've just sent a package to your email. Please check it out.
     
  43. ChunkoGames

    ChunkoGames

    Joined:
    Jul 15, 2013
    Posts:
    20
    Hi,

    I'm currently working on doing a project with your toolkit. My teacher has asked me to redesign the UI so that it is more user friendly. One of the big changes he's asked for is changing the way AP is displayed. He'd like to see the information displayed as an int counter next to the unit. Are there any alternate UIs I can download for your toolkit? How would I go about getting started on making these changes? Where are the UI scripts located?
     
  44. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Can I ask what do you mean when you say AP? Do you mean HP?

    I'm afraid there isnt any alternate UI other than those that comes within the package (default Unity UI, NGUI free, NGUI3). The UI script are all obvious naming convention, they either start with UI (for default Unity UI) or UINGUI (for NGUI). Just type that in the project tab search bar and you will see. As for how to change them, that will depends on which UI you are using and want exactly do you want to do. If to show the HP value on each unit, basically you need to get all the units in the scene, use worldToScreenPoint on each unit's transform to obtain their relative screen position, then display the information you want.
     
  45. ChunkoGames

    ChunkoGames

    Joined:
    Jul 15, 2013
    Posts:
    20
    Thanks for the quick response. This is embarrassing, but I actually meant to post this on your turn based toolkit page. What would be the process for displaying the int value of the HP and AP of units in the turn based toolkit.
     
  46. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    The value of unit's HP has already been display along side the unit on screen. The relevant code are placed in UIOverlay.cs (for default UI) and UINGUIOverlay.cs (for NGUI). You refer use the similar code for AP.

    Since this is a post about TBTK, please make any further post in TBTK thread...
     
  47. detomato

    detomato

    Joined:
    Aug 16, 2013
    Posts:
    54
    hi songtan,

    Just wondering if TDTK can be modified to be like Plants vs Zombies game? Where the enemy can attack the tower on its path.
    And does it work well with Vuforia augmented plugin?

    Thanks.
     
  48. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Yes you can set up something like Plants vs Zombies. Mind you it's not going to be exactly the same. But with certain configuration combination between the creep, path and build-platform placement it can be done.

    I'm not familiar with Vuforia at all so I'm not sure to be honest. But as far as I know, TDTK uses only Unity native feature without any external dependencies. So as long as any plugin you plan to use to compatible with vanilla Unity to start with, my guess is it should be fine. That said, it's designed to be a support common tower defense game only. Any extra integration, I'm afraid it's not supported.
     
  49. Morlok

    Morlok

    Joined:
    Sep 9, 2012
    Posts:
    5
    This should be fairly "easy", just remove the towers ability to block the path of the creeps. Set up creeps to attack any tower in front of them.

    To fix so towers do not block the path of creeps, go to PlatformTD.cs line 393.
    In this line it should be shown the rutine for the mine "tower", if you are lazy you can just use this for all towers.
     
  50. detomato

    detomato

    Joined:
    Aug 16, 2013
    Posts:
    54
    Hi songtan, just to follow up.
    Can the enemies be set up to attack the tower?