NKHook / NKHook5

A new repo for the new NKHook5
GNU General Public License v3.0
7 stars 3 forks source link

If tower #1

Closed EpicGamer200245 closed 4 years ago

EpicGamer200245 commented 4 years ago

I want if tower thing so something like this: if(tower == "DartMonkey") { //do stuff here } Where it says DartMonkey can be replaced with a name or hotkey like: Dart Monkey is "DartMonkey" or "Q" Tack Shooter is "TackTower" or "W" Sniper Monkey is "SniperMonkey" or "E" Boomerang Thrower is "BoomerangThrower" or "R" Ninja Monkey is "NinjaMonkey" or "T" Bomb Tower is "BombTower" or "Y" Ice Tower is "IceTower" or "A" Glue Gunner is "GlueGunner" or "S" Monkey Buccaneer is "MonkeyBuccaneer" or "D" Monkey Ace is "AcePlane" or "F" Super Monkey is "SuperMonkey" or "G" Monkey Apprentice is "MonkeyApprentice" or "H" Monkey Village is "MonkeyVillage" or "C" Banana Farm is "BananaFarm" or "V" Mortar Tower is "MortarTower" or "B" Dartling Gun is "DartlingGun" or "N" Spike Factory is "SpikeFactory" or "M" Heli Pilot is "HeliPilotAircraft" or "J" Monkey Engineer is "MonkeyEngineer" or "L" Bloonchipper is "Bloonchipper" or ";" Monkey Sub is "MonkeySub" or "K"

DisabledMallis commented 4 years ago

you can determine the tower's type by checking its flag. for example, if you wanted to know if the tower was a dart monkey you can do this:

if(tower.getTypeFlag()==2){
//do stuff
}

the dart monkey's id/flag is 2.

im going to have a complete list of vanilla tower ids at some point but you get the idea