switchAttack()
From Hack Wars Wiki
| Function information for switchAttack() | |
| Function | switchAttack() |
| API | Attacking |
| Cost | $1,000 |
| Level | 50 |
| CPU Usage | 10 |
| Description | Switches an attack from targeting the current port to targeting the next port in an array of secondary targets. |
Basic Attack Example
switchAttack();
If placed in the continue event of an attack script, this will switch over to the next of the Secondary ports you specified in the attack options. After the last port in the list of secondary ports switchAttack() will switch to the primary port back.
