A: 2)
You can use the SpawProjectile command. It need a position to spawn the projectile and an other postion to the shooting direction.
Here is a little script:
Code: Select all
public void Shooting(TriggerArgs args){
IObject obj = Game.GetSingleObjectByCustomId("shootingposition");
IObject objDir = Game.GetSingleObjectByCustomId("shootingdirection");
Vector2 pos = obj.GetWorldPosition();
Vector2 dir = objDir.GetWorldPosition();
Game.SpawnProjectile(ProjectileItem.SILENCEDPISTOL, pos, dir - pos);
Game.PlaySound("SILENCEDPISTOL", pos, 1f);
}
Be sure that you have an object, for example invisible block with no collison, set to "shootingposition" by its custom ID, and another to "shootingdirection". You can change the names whatever you want, just make sure that you match the names.
This example uses silenced pistol, but you can change it to for example SILENZEDUZI or ASSAULT.
So i suppose that you can do it with this answer, but i can't answer the other q:s.
I hope that even someone reads this...