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 havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Choose your ride to damnation in the 5th Special Effect Contest Poll.
    Dismiss Notice
  5. The winners of the 13th Techtree Contest have been announced!
    Dismiss Notice
  6. The 13th Music Contest Poll has begun! Vote for the best tracks in this symphony of frost and flame.
    Dismiss Notice
  7. 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.

Whats wrong with this trigger?

Discussion in 'World Editor Help Zone' started by Apeliotes, Sep 6, 2007.

  1. Apeliotes

    Apeliotes

    Joined:
    Aug 29, 2007
    Messages:
    12
    Resources:
    0
    Resources:
    0
    Ok so Im making a game with the basic style of footman, a base town hall structure and units that spawn around it. All players have a wisp in their starting location, which is replaced by the town hall structure of the race they pick in a dialog box, i do that using this trigger:

    • Human Settler
      • Events
        • Dialog - A dialog button is clicked for Firstdiag
      • Conditions
        • (Clicked dialog button) Equal to Diagbutton[1]
      • Actions
        • Set OwnedUnits = (Units owned by (Triggering player))
        • Unit - Replace (Random unit from OwnedUnits) with a Town Hall using The new unit's default life and mana


    A few times however, it seems this trigger doesnt even run, because the player still has the wisp, even though the dialog button was clicked. I was wondering if anyone could tell me how to fix this trigger, or give me a better suggestion without changing too much of the basic mechanics.

    Thank you in advance
     
  2. YoshiRyu

    YoshiRyu

    Joined:
    Jun 26, 2007
    Messages:
    686
    Resources:
    0
    Resources:
    0
    you've made only the first race trigger? or all race triggers?

    _
    HS: "create town hall at player's starting position" is faster
     
  3. Xsilver07

    Xsilver07

    Joined:
    Sep 11, 2004
    Messages:
    70
    Resources:
    4
    Maps:
    4
    Resources:
    4
    I can see one problem so far, when you do Set OwnedUnits = (Units owned by (triggering player)) a couple things are probably happening, that makes the next action not work.

    When you set this variable your setting all currently owned units within the playable map area into this unit group, Unit - Replace may be replacing a random unit somewhere else, instead of your wisp.

    My suggestion, because i'm still unsure about what i just said considering i dont' have enough info, is to just assign your wisp to its own unit variable.

    Set "Wisp 001" w/e, or Last Created unit, where the wisp is created if its done through triggers, to Wisp (unit variable)

    Then when you get to this trigger, you can remove the Set variable action, and replace "Wisp" with a town hall, and then the "Wisp" variable will become unused and may be deleted or w/e.

    This will be much simpler and most likey easier, and should make this trigger work properly.

    I hope i explained that well enough, if you have any questions i'll check back later. Enjoy :D
     
  4. YoshiRyu

    YoshiRyu

    Joined:
    Jun 26, 2007
    Messages:
    686
    Resources:
    0
    Resources:
    0
    "Wisp 001" doesn't work with random start location

    if player have random location, this wisp can be owned by any player
    so the trigger can perform a player choice from another one

    that's probably the reason he use something so complex
    "create town hall at player's starting position" is more simple and work with random starting location