1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The reforging of the races is complete. Come see the 14th Techtree Contest Results.
    Dismiss Notice
  4. It's time to choose your horse in the race - the 32nd Modeling Contest Poll is up!
    Dismiss Notice
  5. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Turning ship

Discussion in 'World Editor Help Zone' started by Davesanz, Oct 11, 2010.

  1. Davesanz

    Davesanz

    Joined:
    Sep 4, 2010
    Messages:
    68
    Resources:
    0
    Resources:
    0
    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?
     
  2. Fjury

    Fjury

    Joined:
    Sep 9, 2010
    Messages:
    315
    Resources:
    8
    Icons:
    8
    Resources:
    8
    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: Oct 11, 2010
  3. defskull

    defskull

    Joined:
    Mar 27, 2008
    Messages:
    7,979
    Resources:
    17
    Spells:
    17
    Resources:
    17
    I've uploaded a test map
    Enjoy ;D
     

    Attached Files:

  4. Kala

    Kala

    Joined:
    Jun 20, 2009
    Messages:
    817
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Awesome triggering defskull :ogre_love:
     
  5. Davesanz

    Davesanz

    Joined:
    Sep 4, 2010
    Messages:
    68
    Resources:
    0
    Resources:
    0
    Thank you a lot!
     
  6. Garfield1337

    Garfield1337

    Joined:
    Jul 6, 2009
    Messages:
    1,806
    Resources:
    4
    Maps:
    1
    Spells:
    3
    Resources:
    4
  7. defskull

    defskull

    Joined:
    Mar 27, 2008
    Messages:
    7,979
    Resources:
    17
    Spells:
    17
    Resources:
    17
    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
     
  8. Garfield1337

    Garfield1337

    Joined:
    Jul 6, 2009
    Messages:
    1,806
    Resources:
    4
    Maps:
    1
    Spells:
    3
    Resources:
    4
    defskull,
    I ain't angry or anything,im just pointing it out ;D
     
  9. Davesanz

    Davesanz

    Joined:
    Sep 4, 2010
    Messages:
    68
    Resources:
    0
    Resources:
    0
    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?
     
  10. Pharaoh_

    Pharaoh_

    Joined:
    Nov 6, 2008
    Messages:
    8,128
    Resources:
    11
    Icons:
    3
    Skins:
    1
    Spells:
    6
    Tutorials:
    1
    Resources:
    11
    @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])
     
  11. Davesanz

    Davesanz

    Joined:
    Sep 4, 2010
    Messages:
    68
    Resources:
    0
    Resources:
    0
    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: Oct 27, 2010