I have this enemy tank that shoots at the player, like normal. But I dont know how to make a moving turret on it that follows the player. it currently does but the entire body has to move, which i find unsettling. So, can i make a seperate turret that spawns together with the tank, and targets and follows the player?
Develop games in your browser. Powerful, performant & highly capable.
There's a cool template comming with C2: Real Time Strategie (RTS)
pretty much you need 2 sprites on the tank, one the base, and one the turret. You will need to add the pin and the turret behavior to the turret, and when created, or at the start of layout, call in for the turret to pin to object, in this case the base(position and angle) and add the proper events and actions to the turret to track the target and shoot
is it possible to make the turret spawn on the origin area of the tank, using imagepoints?
I can pin it but how do i make it spawn together with the tank at the same posistion?!
If both tank and turret have the origin coordinates in the point where you want them pinned, just Spawn the tank and the turret separately, and once both are spawned pick the turret and set Turret.X to Tank.X and Turret.Y to Tank.Y