Ship/Cannon Help

Sefiraat

New Member
Reaction score
15
Ok, I am making just a basic ship/trading/pirate game. I have come to the point when I need to make the ship only be able to fire form the sides. To do this I am making a dummy unit to fire when a unit enters a movable region placed at either side of the attacking ship.





When I got to the point of actually moving these region every few ticks, I got totally lost. I know it needs to find the point [some distance] away from [some degrees away] from the facing point but im lost ^^. I could use any help with this, or if you know of an easier way to do what I am trying to do. That would be great to.
 
Reaction score
54
Move left rect to Position of Unit offset by 300? Towards Facing of unit - 90
Move right rect to Position of Unit offset by 300? towards facing of unit + 90
 

PrisonLove

Hard Realist
Reaction score
78
With using regions though you'll run into problems if the ships rests on a diagonal. You'd be better off using unit groups and just picking the units on one of the boat.
 

Sefiraat

New Member
Reaction score
15
they are perfect squares, the ship can target units with an extra 78 range when diagonal, but this doesn't matter as the cannonballs are locust units with a perfectly timed expiration. The squares are just to stop the unit casting if the target is infront/behind. Thanks for trying to help, and I get what you mean, But i am happy now :)
 

Rainther

I guess I should write something of value here...
Reaction score
61
I'm actually making a little battleship map myself :D I do my cannons in vJass though.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top