• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Turning ship

Status
Not open for further replies.
Level 3
Joined
Sep 4, 2010
Messages
68
I want to make a ship unit that must turn to attack, i mean, like the real cannon ships. I was trying but i didn't find the way to do so; can you help me please?
 
Level 11
Joined
Sep 9, 2010
Messages
368
If you want your ships attack from their sides, should you put up a casting dummy that will do the attacks for your ships.

I've not access to WE at the moment, but I'll do a try to make a trigger for you anyhow.

  • Spell attack:
    • Events
      • Unit starts casting an ability.
      • Condictions
        • Casting spell is equal to YOUR CANNON SPELL
          • Actions
        • Create a CANNON DUMMY for Owner of casting unit at position of casting unit with angle of casting unit + 90 degrees.
        • Add 1 second generic timer for Last Created Unit.
        • Issue Last Created unit to attack ground at Position of Casting unit with 90 degrees offset and 500 range.

Okey, this trigger looks horrible, but I hope you can understand it and can make something out of it. :ogre_hurrhurr:
 
Last edited:
Level 33
Joined
Mar 27, 2008
Messages
8,035
Well, sorry for that Garfield
But SERIOUSLY, I forgot whose map was that so I just posted it in here, waiting for the original creator to come in and that is you
I NEVER said that map was mine and my intention was just to help him, not more than that
Please don't misunderstand this
 
Level 3
Joined
Sep 4, 2010
Messages
68
I think this is necropost, but....
If anyone reads, i see the side attack map doesnt make it work with recently made ships, can you help me?
 
@Davesanz, it's because Trig4 is not correct. It uses picked unit, when it should be triggering unit. Change it to this:
  • Trig 4
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Ship
    • Actions
      • Unit Group - Add (Triggering unit) to Ships
      • Set Loc[0] = (Position of (Triggering unit))
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Loc[0] facing Default building facing degrees
      • Hashtable - Save Handle Of(Last created unit) as 0 of (Key (Triggering unit)) in ShipHash
      • Hashtable - Save Handle Of(Triggering unit) as 0 of (Key (Last created unit)) in ShipHash
      • Custom script: call RemoveLocation(udg_Loc[0])
 
Level 3
Joined
Sep 4, 2010
Messages
68
Thank u, ill try it.
EDIT: It worked, but units created later dont need to be at 90 degrees to shoot, help a lazy man again please!
 
Last edited:
Status
Not open for further replies.
Top