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. Lead your forces to battle in the 15th Techtree Contest. The call is yours, commander!
    Dismiss Notice
  4. The reforging of the races is complete. Come see the 14th Techtree Contest Results.
    Dismiss Notice
  5. It's time to choose your horse in the race - the 32nd Modeling Contest Poll is up!
    Dismiss Notice
  6. 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.

[Trigger] Need a trigger for this!

Discussion in 'Triggers & Scripts' started by Jay-D, Dec 4, 2008.

  1. Jay-D

    Jay-D

    Joined:
    Jun 29, 2008
    Messages:
    50
    Resources:
    0
    Resources:
    0
    Ok what i need is a trigger for (dont know how to call it) a
    system in which you can enter a code like in that image below. if youre
    pressing the 'lock' button (an item)
    it should check if the code is correct (the numbers and arrows
    are spells. i already have triggers for changing the numbers i
    just need this check if code correct thing)
    Picture for better understanding
    [​IMG]


    pls help me

    ~Jay-D

    (for help you'll get [​IMG]) :cute::razz:

    (and yes ive used the search button but my problem is too specific i cant find help in using the search button sry)
     
  2. Emm-A-

    Emm-A-

    Joined:
    Jul 1, 2008
    Messages:
    1,312
    Resources:
    0
    Resources:
    0
    post your triggers, then we can say something.
     
  3. TheBlooddancer

    TheBlooddancer

    Joined:
    Jun 24, 2008
    Messages:
    2,908
    Resources:
    0
    Resources:
    0
    Just save the numbers into variables, (integers) And check if Integer[1] Equal to YourRealNumber.
     
  4. Jay-D

    Jay-D

    Joined:
    Jun 29, 2008
    Messages:
    50
    Resources:
    0
    Resources:
    0
    y thats what ive done but i dont know how to do this:
    • Example trigger
      • Events
        • Unit - A unit Uses an item
      • Conditions
        • (Item-class of (Item being manipulated)) Equal to Lock
      • Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Does (Triggering unit) hase 1)) Equal to True
          • Then - Actions
            • Set Code[1] = 1000
          • Else - Actions

    and my second trigger is running if the number of 'Code' is fitting the code number hope you understand that^^

    (the If unit hase 1 part isnt possible to do just an example)
     
  5. TheBlooddancer

    TheBlooddancer

    Joined:
    Jun 24, 2008
    Messages:
    2,908
    Resources:
    0
    Resources:
    0
    • (Does (Triggering unit) hase 1)) Equal to True

    Does that exist? :D

    And you cant do it like that.

    Number[] Is your variable. Inside the brackets ([]) Place Number. Like

    Number[1] Equal to 1
    Number[2] Equal to 3
    Number[3] Equal to 3
    Number[4] Equal to 7

    The code for this would be 1337. Then run a trigger that checks if 'Number[1] and so on' is the following, and if true, then add your actions.

    Ofc, when casting 'number up' skill, or what it is, you must set Number[1] = (Number[1]) + 1)

    (If its the first number you are working with.

    [1][2][3][4]

    This is the lock.
     
  6. Jay-D

    Jay-D

    Joined:
    Jun 29, 2008
    Messages:
    50
    Resources:
    0
    Resources:
    0
    but if you press the 'number down' button you must reset the
    to set it to another value like
    .
    ok i made an example trigger hope someone knows how to solve my problem

    • Example trigger
      • Events
        • Unit - A unit owned by Player 1 (Red) Begins casting an ability
      • Conditions
        • (Ability being cast) Equal to UP[1]
      • Actions
        • Set Player_column1[1] = (Player_column1[1] + 1)
        • For each (Integer A) from 1 to 4, do (Actions)
          • Loop - Actions
            • Unit - Remove code_column1[1] from Casting_Unit[1]
            • Unit - Remove code_column1[2] from Casting_Unit[1]
            • Unit - Remove code_column1[3] from Casting_Unit[1]
            • Unit - Remove code_column1[4] from Casting_Unit[1]
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Player_column1[1] Equal to 1
              • Then - Actions
                • Unit - Add code_column1[1] to Casting_Unit[1]
              • Else - Actions
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • Player_column1[2] Equal to 2
                  • Then - Actions
                    • Unit - Add code_column1[2] to Casting_Unit[1]
                  • Else - Actions
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • Player_column1[1] Equal to 3
                      • Then - Actions
                        • Unit - Add code_column1[3] to Casting_Unit[1]
                      • Else - Actions
                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          • If - Conditions
                            • Player_column1[1] Equal to 4
                          • Then - Actions
                            • Unit - Add code_column1[4] to Casting_Unit[1]
                          • Else - Actions
                            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                              • If - Conditions
                                • Player_column1[1] Greater than 4
                              • Then - Actions
                                • Set code_column1[1] = 1
                              • Else - Actions

    the trigger is only for the first column the other 3 triggers are similar to this one only the arrays are different. the problem is to set (reset) the integer variable to the right value
     
  7. Paladon

    Paladon

    Joined:
    Dec 6, 2007
    Messages:
    2,083
    Resources:
    42
    Icons:
    28
    Packs:
    2
    Spells:
    12
    Resources:
    42
    If you send me your map, i can surely create such a 'system' for you.
    But i neither have the time nor the requirements to check and correct your trigger online.
    Simply use the pastebin or whatever if you don´t want to post it here and i´ll handle this for you ;)
     
  8. Jay-D

    Jay-D

    Joined:
    Jun 29, 2008
    Messages:
    50
    Resources:
    0
    Resources:
    0
    problem finaly solved by paladon^^ thx +rep
     
  9. Paladon

    Paladon

    Joined:
    Dec 6, 2007
    Messages:
    2,083
    Resources:
    42
    Icons:
    28
    Packs:
    2
    Spells:
    12
    Resources:
    42
    And here you go!
    A little code system.
    Hf and good luck with your map.
     

    Attached Files:

  10. Jay-D

    Jay-D

    Joined:
    Jun 29, 2008
    Messages:
    50
    Resources:
    0
    Resources:
    0
    OMG it works!!!! youre definitly the best gui guy^^ ever
    (hmm cant rep you twice damn ;D )


    thread can be closed by an admin or so^^