Shoot
Jump to navigation
Jump to search
#shoot [direction] is a ZZT-OOP command to have an object shoot a bullet in a specified direction.
It differs from #put [dir] bullet
in that it creates a moving bullet. Attempting to have an object shoot by using #put will result in the bullet colliding itself the same tick it was spawned. Moreover #shoot respects the solidity of walls, whereas #put would put a hole through the wall.
#shoot ends an object's code execution for the current tick, meaning that the soonest it can #change the bullet is when it is two tiles away.
Bullets shot by objects can trigger other objects' :shot labels, but cannot hurt built-in creatures.
ZZT-OOP | |
---|---|
Prefixes |
|
Messages | |
Directions | |
Flags | |
Commands |