Tower Defense Script
Page 1 of 1
Tower Defense Script
*Note* Before you copy and paste the script, please understand that this is for the traditional 'one enemy type per level' type of Tower Defense.
When I attempted my first tower defense, I used the 'unprofessional' way of using instance_nearest() for everything. I've come up with a script for the more 'professional' way of locking onto a target until it is either destroyed or is out of range. You don't even have to understand how it works! I've set it up to be easy to use by only setting 4 arguments:
-Range
-Enemy being targetted (there can only be one, but remember that 'if' statements are your friend)
-Bullet being created
-Interval at which the bullets are created
This is also stated in the script, along with exactly how everything is working.
Since the code BB function is a bit messed up, I've put all codes within a .gmk file along with an example. This file can be found here. And yes, the CheatEngine icon was used as an enemy.
When I attempted my first tower defense, I used the 'unprofessional' way of using instance_nearest() for everything. I've come up with a script for the more 'professional' way of locking onto a target until it is either destroyed or is out of range. You don't even have to understand how it works! I've set it up to be easy to use by only setting 4 arguments:
-Range
-Enemy being targetted (there can only be one, but remember that 'if' statements are your friend)
-Bullet being created
-Interval at which the bullets are created
This is also stated in the script, along with exactly how everything is working.
Since the code BB function is a bit messed up, I've put all codes within a .gmk file along with an example. This file can be found here. And yes, the CheatEngine icon was used as an enemy.
Gamerz- Newbie
- Number of posts : 38
Warning :
Reputation :
Registration date : 2008-11-05
Similar topics
» What computer script goes good along with html?
» How do I generate html script by using a form?
» How do I translate home videos to HTML script to embed in my website?
» Rolling physics r simple, here is a simple 2 line script that is guranteed 2 work
» How do I generate html script by using a form?
» How do I translate home videos to HTML script to embed in my website?
» Rolling physics r simple, here is a simple 2 line script that is guranteed 2 work
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|