turtle.attackDown
turtle.attackDown Function | |
---|---|
Syntax turtle.attackDown(
| |
Returns | bool didAttack |
API | turtle |
Source | CC:Tweaked (source) |
Attacks the entity under the turtle
The turtle can only attack when it has a tool and when a mob is in its range.
|
|||
See if it was able to hit the entity it targeted | |||
Code | <nowiki>
local didHit = turtle.attack()
print(didHit)
</nowiki>
|
||
Output | false
|
Functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Lua |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CC:Tweaked |
|
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.