Search Unity

TowerDefense ToolKit 4

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

  1. nasa8

    nasa8

    Joined:
    May 14, 2013
    Posts:
    1
    unfortunately the v.3 documentation is much worse then v.2 had
     
  2. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    I'm very sorry to hear that. Perhaps you can provide some feedback as to why it's worse and how can I do better?
     
  3. Trevinburgh

    Trevinburgh

    Joined:
    Jan 26, 2015
    Posts:
    29
    I've been having a minor problem with Abilities: sometimes the game wrongly says I don't have enough energy to use an Ability or that the Ability is on cooldown. It still lets me use the Ability, so it's confusing but doesn't affect gameplay.

    It turns out that it's checking not just the Ability I'm trying to use but *also* the first Ability button. So if I have 50 energy and try to use an Ability with cost 30 it will complain if Ability button one has a cost of more than 50 or is on cooldown.

    By putting in Debug statements it seems that SelectAbility is always being called for the first button as well as for the button clicked. I haven't been able to track down why, I guess it's because at runtime all the Ability buttons have their OnClick target set to Button1.

    For anyone else having this problem there is a simple workround: make sure the first Ability button has the lowest cost, zero cooldown and no other limitations.
     
  4. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Thanks for bringing this to my attention, I'll check with the code when I have the chance. In the mean time, You can check the button's OnClick callback. For some reason, some time the cloned button doesn't do a deep copy the callback. Reassign the object would solve the problem as far as I know.
     
  5. huxley

    huxley

    Joined:
    Apr 27, 2009
    Posts:
    334
  6. Earthsnake

    Earthsnake

    Joined:
    Feb 25, 2014
    Posts:
    30
    Hi Songtan! nice tower defense asset, I must say its quite comprehensive in terms of mechanics. I want to ask about level changing, so far in the demo scenes I only saw the level selection feature, how can we connect scenes?

    for example I want to build 5 levels, and player can continue playing from level 1 to level 5 (not select levels independently), you know, like in your turn-based tool kit (TBTK) asset, and of course we can carry perks, and stuff like tower upgrades too on the next level.

    Thank you.
     
  7. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Thanks for your compliment and sorry for the slow respond.

    For your information, there's an option to specify the next scene to load in each TDTK scene. Upon game over, the player can choose to go the specified level, restart or go back to main menu. So you can effectively goes from level1 to level2 to level3 and so on without going back to the level select. You can also easily setup something like the TBTK demo where you get an interval scene before you go back to the gameplay after each level.

    Unfortunately, the perk systems and upgrades in TDTK are set to work within a single scene. They reset after every scene and they dont get carried over to the next level. You will have to do some slight modification to do that. I'll see if I can make that into the next update but please don't hold your breath. :)
     
  8. Earthsnake

    Earthsnake

    Joined:
    Feb 25, 2014
    Posts:
    30
    Is it on GameControl on "NextScene" section?

    Sure. I am not holding my breath. I do have big expectations that it will be there, since TBTK already has it. I have full confidence that you can do it :)

    cheers.
     
    Last edited: Mar 1, 2015
  9. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Precisely.
     
  10. arnpriorhick

    arnpriorhick

    Joined:
    Feb 17, 2015
    Posts:
    2
    When I try to add new creeps in the creep manager and new towers in the tower manager the game won't let me. Your videos are for the version two toolkit so I was wondering if you could walk me through how to do it in 3.0. When I select the "Add new tower" option in the tower editor nothing shows up, not even the tower prefabs that come with the toolkit. Any help is appreciated. Screen Shot 2015-03-02 at 1.13.35 PM.png
     
  11. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    It's pretty much the same as older version. You drag the tower/creep prefab into the new tower/creep slot.
     
  12. arnpriorhick

    arnpriorhick

    Joined:
    Feb 17, 2015
    Posts:
    2
    I figured it out. It just didn't work when the tab was free-floating, I had to fix it as a fixed tab in my layout before I could drag and drop towers to add them, otherwise the tab disappears when you click the tower.
     
  13. Earthsnake

    Earthsnake

    Joined:
    Feb 25, 2014
    Posts:
    30
    Hi Song. Just want to give inputs regarding your future update. First is about the ability to choose which features that we can bring to the next scene (for example perks, resources, etc). Imo this is important because the player will get a sense of achievement from what they did on previous scene.

    The second one is about the ability to create bosses on each level. Just like creep editor, but its for bosses. It's good for us to add challenge to players by adding few bosses on certain intervals/waves.

    Thanks

    :)
     
  14. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    @arnpriorhick, I'm afraid that is just the inherent problem if you are using mac. The floating window wouldn't stay on top of the editor window.

    @Earthsnake, I'll see what I can do regarding persistant progress. As for the boss creep, it depends on what kind of boss you are refering to. Boss are typically encounter that are tougher during average gameplay. The way I see it, you can create boss wave with the tool at your disposal.
     
    Earthsnake likes this.
  15. Trevinburgh

    Trevinburgh

    Joined:
    Jan 26, 2015
    Posts:
    29
    Upgraded to Unity 5 today. Relatively painless but I found some of my TDTK indicators and tower effects couldn't be seen (range, path, etc). For anyone else having this problem the fix seems to be to go to the material (RangeIndicator, PathTrail, etc) and move the "SoftParticles Factor" slider to the far right.
     
  16. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Indeed. Apart from some visual change due to the new shader, the rest of TDTK should run just fine on Unity5. I'm currently working on an update for Unity5 with visual tweak that work right out of the box.
     
  17. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Woot, just added support to Unity5!

    If you want a version that works right out of the box for Unity5, there's one now.
     
  18. Earthsnake

    Earthsnake

    Joined:
    Feb 25, 2014
    Posts:
    30
    Hi Song, another suggestion for future update :D

    How about placing units that can walk around and attack incoming enemies on certain areas like on this video (on 00:04 - 00:06) :



    Best regards :)
     
  19. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Well this is not the first time some one suggest the idea. However this will bring an entirely new layer of complexity for the toolkit. Couple with the fact that it needs to be customizable like the rest of the toolkit, it's going to be a very tough nut to crack. So either it's going to be extremely demanding for me or it's going to be extremely rigid with not much room for customization. My honest opinion, this is something that best done in a specific manner to fit a specific game design.

    I might experiment with the idea when I have time on my hand. But honestly, I dont see it happen anytime soon. Hope you understand.
     
    Earthsnake likes this.
  20. Warlord4

    Warlord4

    Joined:
    Nov 26, 2012
    Posts:
    14
    Hello! Can not understant how can i build the tower!? I don`t have any button to set the tower! May be i am doing something wrong? Aaah and Android platform is switched. And i am using - unity remote!
     

    Attached Files:

    Last edited: Mar 9, 2015
  21. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    I'm sorry but I dont really understand your problem. The image you attached seems to be ok. Are you saying you cant build a tower on Android platform?
     
  22. Warlord4

    Warlord4

    Joined:
    Nov 26, 2012
    Posts:
    14
    I am sorry for having disturbed you! I have already solved my problem! But now i have another question - how can i upgrade the tower(where i must put prfebs for upgrading them to level two and tree)? And for some reason my towers do not shoot. (i have such error in console) Безымянныйydtc.png
    P.S. sorry for my english
     
  23. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    For upgrading tower, I suggest you to read the documentation. There's a rather detail explaination in it. Look for section Upgrading System for Tower. if you are still struggling after that, please let me know.

    From your error, it seems like you have assign certain gameObject which is not a creep with the layer intended for creep. Or you are having some unessacery collider on your creep prefab. Please make sure each of your prefab has only 1 collider and there are no collider on gameObject that is not a creep, tower or platform.

    Also, it seems like you are not using the latest version of TDTK.
     
  24. eajones

    eajones

    Joined:
    Aug 1, 2013
    Posts:
    45
    Song, or others:

    I am trying to make use different shoot objects--trying a variety of particle effects. I am not able to use these as a shootojbect however. Can anyone give a list on how to make a shoot object, what is needed, etc? for example, create an object, attach a particle effect, or how to do this?

    Thanks!
     
  25. TTGxINSTINCT

    TTGxINSTINCT

    Joined:
    Oct 31, 2014
    Posts:
    9
    Any help please! I have made a test tower and is all working properly, but no matter how may times I try the tower does not damage any creeps. I have followed Song's videos on tower read the doc but still it does not damage any creep.
     
  26. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    @eajones, it depends on the effects. You may want to change the shootObject type to instant or beam in some case. There's a general guide in the documentation telling you how to make a shootObject and what are their functioning criteria. I would suggest you to take a look at that.

    @TTGxINSTINCT, check the stats of the tower, particularly damage and hit-chance. If the damage is zero, obviously it won't damage the creep. If the hit-chance is zero, the attack will always be considered a miss and no damage will be applied.
     
  27. TTGxINSTINCT

    TTGxINSTINCT

    Joined:
    Oct 31, 2014
    Posts:
    9
    @songtan I have checked all of that I even have made all stats equal to all stats of the machine gun turret provided, but still my tower still does not damage anything.
     
  28. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    I'm not really sure why in that case. Do you have any error message pops up in the log? What version of Unity are you using? Unfortunately I'm currently away for the weekend. I'll take a look at this as soon as I can.
     
  29. TTGxINSTINCT

    TTGxINSTINCT

    Joined:
    Oct 31, 2014
    Posts:
    9
    @songtan I do not get any error messages in the console of unity or launching the game externally I'm using Unity 5 and TDTK 3.0 I don't understand either, I have went over the documentation and watched your video about adding towers, but it was for version 2.0 TDTK. It may be because of that?
     
  30. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    I dont think so. As far as I remember, so long as the tower shoots, then it's working. The rest is simply down to stats and configuration. I would suggest you to check the creep dodge-chance and the damage table.
     
  31. TTGxINSTINCT

    TTGxINSTINCT

    Joined:
    Oct 31, 2014
    Posts:
    9
    Ok I will check again but all stats are the same as the machinegun turret that is provided
     
  32. Trevinburgh

    Trevinburgh

    Joined:
    Jan 26, 2015
    Posts:
    29
    @TTGxINSTINCT: Have you checked the 'ShootPoint' for the new tower? I seem to remember I had a similar problem because the ShootPoint was inside the tower rather than at the end of the gun.
     
  33. TTGxINSTINCT

    TTGxINSTINCT

    Joined:
    Oct 31, 2014
    Posts:
    9
    I still cant get it to work... I checked the ShootPoint and it is clear enough from the tower, checked stats over again and again and rebuilt tower 5 times with two different prefabs and and just with an empty game object still not working. :/ I will keep trying, this is the only thing that is holding me back.
     
  34. TTGxINSTINCT

    TTGxINSTINCT

    Joined:
    Oct 31, 2014
    Posts:
    9
    I still can not resolve my issue, @songtan can you possibly make a quick video or set of videos for TDTK 3 cause the towers video for TDTK 2 shows you putting a TurretScript on the turret on the prefab, i know this is not in TDTK3 anymore but maybe thats whats causing the confusion?
     
  35. TTGxINSTINCT

    TTGxINSTINCT

    Joined:
    Oct 31, 2014
    Posts:
    9
    @songtan I have found a solution to my problem, I have not found out why I was having trouble adding my own towers but alternatively I put each type of TDTK towers in the hierarchy and put my towers then switched out TDTK prefab parts with my own and it seems to be working now. :) Thanks for the support everyone and great toolkit other than the minor hiccup.
     
  36. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    That's one way to do it. As I said I'm away for the weekend so there's really not much I can do for now. I'll try find out what was the problem when I'm back.

    Sorry for the trouble.
     
    TTGxINSTINCT likes this.
  37. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    I have just done a quick test. It seems pretty error proof to me. What I did is:
    • create a prefab with UnitTower.cs attached on it
    • add it to TowerEditor
    • assign a shootObject (any of the default example)
    • change the value of hit-chance to >1
    And that's it. The tower fires at target and damages them. The shoot-Point is optional, you get a warning if you haven't assign any. Also if the hit-chance is left at the default value of zero, you will get a warning everytime the tower fires. The tower prefab works regardless of it is with or without any child object, with or without any collider for in game tower select.

    As far as I can see, if you tower fire and it doesnt damage the target, then it's either:
    • the damage value is zero
    • the hitChance is zero
    • the damage multiplier in DamageTable is set to zero
    • other error, at which case you would see the error message in the log.
    If you dont mind, you can send your tower prefab to me so I can have a look. Perhaps I'm so used to the system that I missed out something.
     
  38. eajones

    eajones

    Joined:
    Aug 1, 2013
    Posts:
    45
    Song et al:

    Trying to make a support tower--and despite trying to make it work like the towersupport prefab, I can't get it to allow an existing tower to: do more damage, have more range. I looked through the documentation but didn't find anything specifically about the different settings for such a tower. Also, when I took the Towersupport and placed it right next to my tower (place on scene before starting), that also failed to buff the pre-existing tower. It doesn't look like you need to specify any target for the towersupport.

    Anyplace I should look to learn about this? Or what specific settings needed (for example, the Towersupport has type of tower sublcass listed as "creep"??

    Thank you!
     
  39. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    You dont need any special setting for support tower to work, simply just change the tower type in TowerEditor to 'Support' will do. Of course you will need to specify an effective range, and the buff value for the stats you wish to buff. You need not concern with anything that is not shown in TowerEditor. SubClasss specifically is self configured variable for reference during runtime.

    My guess is either your effective range is too small or your buff stat is too low for your support tower to make any difference. You should be able to see your support tower range during runtime when you select the tower so make sure it's adequate. And to make sure the tower works when there are other towers in range, give it a sufficient buff value. For instance, set everything to 1 so that everything is increase by 100%. Range buff is a particularly good visual indication.

    If all else fail, well, you can send your prefab to me if you dont mind and I can have a look.
     
  40. Beremans

    Beremans

    Joined:
    Feb 18, 2015
    Posts:
    2
    Hey guys,

    I have been posting some questions on this forum, and there is news!! I released the game on Android! iOS and Windows Phone will follow either this week or monday. Special thanks to songtan for his support(and the toolkit). A preview of the game can be seen here:



    Thanks again(and don't forget to download ;) )

    Berend
     
  41. Trevinburgh

    Trevinburgh

    Joined:
    Jan 26, 2015
    Posts:
    29
    @Beremans: Congrats on getting you game finished, good luck with it.
     
  42. Lorzor

    Lorzor

    Joined:
    Mar 23, 2015
    Posts:
    5
    Hello Mr songtan,

    I am experiencing a problem with the spawning of the creeps.

    A nominal move speed is set for the entire wave, however, randomly one or two creeps decide to go extremely slow exactly from the spawning area for no reason at all.
    We found out that the problem occurs when we place towers that are shooting with slowing projectiles on the map, however they are nowhere near the spawning point nor is the range of the tower reaching anywhere near them.

    It is totally random, we cannot pin down a pattern of this happening.
    Also I found out that the AOE tower slow works fine, but on the projectile based ones we encounter this bug.
     

    Attached Files:

    • bug.jpg
      bug.jpg
      File size:
      346.6 KB
      Views:
      683
  43. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    Thanks for pointing this out. I'll find out what's wrong and get it fixed in the next update. Please email me if you want the fix in advance.
     
  44. Trevinburgh

    Trevinburgh

    Joined:
    Jan 26, 2015
    Posts:
    29
    @Lorzor: I had problems where if a creep left the map slowed it came back on slowed when the creep object was reused from the pool. I wasn't sure if it ws a bug or something I'd done wrong so as a workround I set up a collider at the spawn point which called a script on the newly spawned creep. That script then checked the creep's slowMultiplier and set it to 1.0f if necessary.
     
  45. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    @Trevinburgh, it's definitely a bug. I've already got it fixed. It should be in the next update.
     
    Lorzor likes this.
  46. eajones

    eajones

    Joined:
    Aug 1, 2013
    Posts:
    45
    I am trying to make and object appear to bounce as it moves along a path in a tower defense game. I have considered several options, all of which have so far failed. I am using TDTK, which is awesome, but have limitations that do not allow me to get this effect. The main issue is that whatever I try does not allow the moving game object to enter the mazing field during game play--it hangs just outside the tower-guild grid area. Here is what I have tried, which has failed:
    1. A simple bounce using a new "bouncy" material with gravity. Putting a rigidbody material on any item does not allow it to enter the grid playfield: it appears to somehow be blocked by the terrain grid.
    2. Different Megafiers things tried, notably "ball bounce". The Mega-fiers stuff, although aweome, can't be saved in entirity on an object. Although some wave affect may be attempted with warp zones, the simple ball-bounce cannot be done.
    3. "move between" using spline points. The onjects spawn at a point near the game grid (which is normal), but then don't move at all
    4. Trying "pingpong" which I thought was the most promising. This however also caused the "creep" to hang at the spawn point at the beginning of the game level. I can't tell if the problem is that the XYZ coordinates are only changing in the y axis, and although the "creep" will go up & down, it doesn't move from the spawn point at all.
    5. Seems that anything that uses Rigidbody causes failure of the "creep" item to enter the game grid.

    Of course, trying to do a simple animation for all the creeps is possible, although for some model types it is hard to get in a 3D program.

    Is there a simple animation editor to allow for me to do this within unity that will work the TDTK?

    Is there such a thing as a moving spline, to allow it to be, umm, "carried" by the object to allow it to go up & down in the Y-axis while moving along an AI determined path?

    Thank you!
     
  47. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    I take it you meant to have the creep bounce like how it's with the example creep (there's one animated cube which sort of jump as it moves along the path). There are two ways to do that on top of my head (There might be more). But I should state upfront that using rigidbody and physics are terrible idea. It's very expensive and TDTK is not designed with physic in mind. Feature will downright break if you do that, which I'm sure you have find out.

    The most obvious way would be to use animation. You can either export it or you can create the animation in Unity if it's something simple. The example animated cube has it's animation created in within Unity editor. Please refer to this - http://unity3d.com/learn/tutorials/modules/beginner/animation/animation-view

    You can also try to animate it via code since it's a simple bounce animation. You can simulate it by directly applying a fluctuating pattern of a sine wave or other custom calculation. But that of course would involve coding.
     
  48. eajones

    eajones

    Joined:
    Aug 1, 2013
    Posts:
    45
    Song,

    Where do I find the example creep referred to? I don't see it in the creep prefabs. Please let me know where I can find it.

    Also, I checked a simple animation, and can get it to move along the y axis, but the x & Z axis remain unchanged relative to the world. I have read that I may need to "parent the object with the animation" but no clue how to do that (yet).
     
  49. eajones

    eajones

    Joined:
    Aug 1, 2013
    Posts:
    45
    Found a thread stating:

    "you just have to add an extra level to the hierarchy and do your animation via Animation component on an object with zeroed transforms"

    If anyone can point me to any info on how to do this that would be great...
     
  50. Song_Tan

    Song_Tan

    Joined:
    Apr 9, 2011
    Posts:
    2,993
    You can find the example creep in "Animation/Creep/ExamplePrefab". I just realized that it doesn't quite work with Unity5 (you have to enable "ApplyRootMotion" in the Animator).

    I would strongly recommend you to go through this tutorial to familiar yourself with the concept of transform hierarchy, parenting and what not. Basically what you need to do in TDTK is set the object with UnitCreep component as parent and the object with animation component as child. In runtime, the child would animate itself along y-axis but the parent would move along the path, carrying the child along.