tag:blogger.com,1999:blog-8967321114965538903.post1733057882438968409..comments2023-05-13T09:33:56.238+01:00Comments on Lane Defence: Tutorial 13 : Adding the Slow TowerFireFlyhttp://www.blogger.com/profile/08398015936723710602noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-8967321114965538903.post-20292660747427941752013-01-01T12:17:07.129+00:002013-01-01T12:17:07.129+00:00Hey FireFly,
I follow all of your tutos'. The...Hey FireFly,<br /><br />I follow all of your tutos'. They're awesome. I was looking for something like this. So a big thank you ;)<br /> <br />And why don't you implement the slowing effect with a Buff list ?<br />Well I did it with a buff list, and this is great ;p<br /><br />Do you think you'll have the time to make more tutos? I hope so. Especially on the network multiplayer system, or how to manage titlescreen, gamescreen, and others screen ( like victory screen, etc.. ).<br /><br />Hope you'll see this comment, you didn't post since a long time..<br /><br />J.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8967321114965538903.post-10921882334276670932011-09-13T16:38:12.191+01:002011-09-13T16:38:12.191+01:00I have a question about the slow tower you have th...I have a question about the slow tower you have the code:<br /><br />// Apply our speed modifier if it is better than<br />// the one currently affecting the target :<br />if (target.SpeedModifier <= speedModifier){<br /> target.SpeedModifier = speedModifier;<br />}<br /><br />Shouldn't this be the other way around, because the modifier is a factor, the smaller the better. I read this as a .6 modifier being replaced by a .9GameJNKYnoreply@blogger.comtag:blogger.com,1999:blog-8967321114965538903.post-7225081377210895322011-05-28T15:25:17.378+01:002011-05-28T15:25:17.378+01:00Hi Sean, you will need to override the GetClosestE...Hi Sean, you will need to override the GetClosestEnemy method in the SlowTower class, something like this would probably work :<br /><br /> public override void GetClosestEnemy(List enemies)<br /> {<br /> target = null;<br /><br /> float smallestRange = float.MaxValue;<br /><br /> foreach (Enemy enemy in enemies)<br /> {<br /> if (IsInRange(enemy.Center) == false)<br /> {<br /> continue;<br /> }<br /><br /> float distance = enemy.WaypointCount + (enemy.DistanceToDestination / 32.0f);<br /><br /> if (distance < smallestRange)<br /> {<br /> smallestRange = distance;<br /> target = enemy;<br /> }<br /> }<br /> }FireFlyhttps://www.blogger.com/profile/08398015936723710602noreply@blogger.comtag:blogger.com,1999:blog-8967321114965538903.post-72601996251710744962011-05-26T14:22:00.715+01:002011-05-26T14:22:00.715+01:00I was wondering, with the slow tower, you might ge...I was wondering, with the slow tower, you might get some enemies pass other enemies, or, if you eventually have enemies that are faster than others in the same wave.<br /><br />How can you set up the towers to target whichever enemy is closest to the end?Seanhttps://www.blogger.com/profile/01118140887632225602noreply@blogger.comtag:blogger.com,1999:blog-8967321114965538903.post-45116735376859182122011-02-06T17:17:21.081+00:002011-02-06T17:17:21.081+00:00You need to do a tutorial for the game ending. And...You need to do a tutorial for the game ending. And maybe a menu screen.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8967321114965538903.post-64800862061620695472011-01-31T14:07:51.542+00:002011-01-31T14:07:51.542+00:00Hey, I plan on writing a short tutorial soon on th...Hey, I plan on writing a short tutorial soon on this. This was something I overlooked when creating the player class... xDFireFlyhttps://www.blogger.com/profile/08398015936723710602noreply@blogger.comtag:blogger.com,1999:blog-8967321114965538903.post-35584531866543362452011-01-30T19:51:46.540+00:002011-01-30T19:51:46.540+00:00I can't seem to get it to add money and take l...I can't seem to get it to add money and take lives depending on you killing the enemy or the enemy running through the end... It won't let me create a reference of the Player class to use player.Lives or player.Money, I've created the set{} variables on each though :P<br /><br />Any ideas?<br /><br />VERY NICE TUTORIAL btwAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8967321114965538903.post-44429315654768884542011-01-22T22:36:18.238+00:002011-01-22T22:36:18.238+00:00Very nice tutorial again !
Thank you very much !Very nice tutorial again !<br /><br />Thank you very much !Leonardonoreply@blogger.com