how to create a dispenser that throws arrows

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Yamz

how could I create a “static body”, the dispenser; Let me throw arrows.

:bust_in_silhouette: Reply From: hexaquo

Essentially, you’ll want to create a Dispenser scene and an Arrow scene. The Dispenser will get a script which instantiates arrows.

The functions preload, instance and add_child will definitely be required for this somewhere - preload the Arrow scene, and when one is thrown: Instance it, set parameters (such as velocity, I assume) and add it as a child of the Dispenser.

If you need help with a specific part of the implementation, let me know.