I am trying to make a tower defence game like no other the MAY be called kirby splash, instead of some weird monster guy defending the tower it will be kirby or another little cute character, he will be defending something like a cookie and instead of guns he will have water guns! I think it will be a great and successful game if i pull it off! But i will need you help! So if you have any scripting advice for a tower defence game please help!
Last edited by momosproductions (2012-05-03 16:12:53)
Offline
Have a set of sprites for each position, each one a duplicate of eachother, make each one contain a script that says:
when tower1 clicked// this needs a limiter if (money) > (cost) change [towerlevel v] by [1] //this would be for future use change (costume#) by [1] end when gf clicked forever if (distancetoenemy1) < [30] //this would need to be duplicated for every enemy if (towerlevel) = [1] broadcast [shooting v] wait (reloadtime) secs point towards [enemy1 v] end end when I receive [shooting v] //bullet scripts, again needs loads duplication show go to x:([xposition v] of (tower1)) y:([yposition] of (tower1)) point in direction ((direction) of (tower1)) when gf clicked hide forever if touching [enemy1 v] if (towerlevel) = [1] broadcast [enemy1dam1 v] when gf clicked //enemy scripts forever if (level) = [1] set [speed v] to [3] repeat [x] //this needs tweaking depending on the level shape move (speed) steps rotate [x] degrees end when I receive [enemy1dam1 v] //MOAR DUPING! change [health v] by [-1]I just gave you the outline scripts, this would use LOADS of sprites, ie.10+ enemies, towers, tower bullets
Offline
zammer990 wrote:
Have a set of sprites for each position, each one a duplicate of eachother, make each one contain a script that says:
when tower1 clicked // this needs a limiter if <(money) > (cost)> change [towerlevel v] by [1] //this would be for future use change (costume#) by [1] end when gf clicked forever if <(distance to [enemy1 v]) < [30]> //this would need to be duplicated for every enemy if <(towerlevel) = [1]> broadcast [shooting v] wait (reloadtime) secs point towards [enemy1 v] end end when I receive [shooting v] //bullet scripts, again needs loads duplication show go to x:([xposition v] of [tower1 v]) y:([yposition v] of [tower1 v]) point in direction ([direction v] of [tower1 v]) when gf clicked hide forever if <touching [enemy1 v]?> if <(towerlevel) = [1]> broadcast [enemy1dam1 v] when gf clicked //enemy scripts forever if <(level) = [1]> set [speed v] to [3] repeat [x] //this needs tweaking depending on the level shape move (speed) steps turn cw [x] degrees end when I receive [enemy1dam1 v] //MOAR DUPING! change [health v] by [-1]I just gave you the outline scripts, this would use LOADS of sprites, ie.10+ enemies, towers, tower bullets
this is a framework, if you can figure out how it works you should be fine, if not, make pong...
I HAVE NO IDEA IF THIS WORKS!!! I just came up with it on the spot
Offline
Ok thanks, when it comes i will try it out soon!
Offline