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. Dismiss Notice
  5. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    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.

Random kickbacks

Discussion in 'StarCraft II Modding' started by Arhowk, Jul 12, 2010.

  1. Arhowk

    Arhowk

    Joined:
    Aug 8, 2007
    Messages:
    2,752
    Resources:
    0
    Resources:
    0
    Error starting sc2

    Uh.. im getting an error (see image) thats happening since i switched my array values to triggering player... does anyone else get this error?... Im guessing it doesnt like the constant use of triggering player :)

    [​IMG]
     

    Attached Files:

    Last edited: Jul 12, 2010
  2. redmarine

    redmarine

    Joined:
    Sep 4, 2007
    Messages:
    2,781
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Post the code... It's not like we're being paid to do this.
     
  3. Arhowk

    Arhowk

    Joined:
    Aug 8, 2007
    Messages:
    2,752
    Resources:
    0
    Resources:
    0
    I never understood how to copy and paste triggers lol... when i try to copy it just copies the trigger name + i cant handwrite it.
     
  4. redmarine

    redmarine

    Joined:
    Sep 4, 2007
    Messages:
    2,781
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Right click the top part of a trigger which is the title.

    Then copy and paste.
     
  5. Arhowk

    Arhowk

    Joined:
    Aug 8, 2007
    Messages:
    2,752
    Resources:
    0
    Resources:
    0
    W

    is what appears.
     
  6. splashy5

    splashy5

    Joined:
    Jul 22, 2007
    Messages:
    259
    Resources:
    0
    Resources:
    0
    select the whole trigger(EVERYTHING) then right click and select copy as text then paste here
     
  7. Arhowk

    Arhowk

    Joined:
    Aug 8, 2007
    Messages:
    2,752
    Resources:
    0
    Resources:
    0
    Damnit

    Trig
    • W
      • Events
        • Timer - Every 0.03 seconds of Real Time
      • Local Variables
        • loc = No Point <Point[4]>
        • loc2 = No Point <Point[4]>
      • Conditions
      • Actions
        • General - If (Conditions) then do (Actions) else do (Actions)
          • If
            • WDn[(Triggering player)] == true
          • Then
            • Unit - Make RedHero face 90.0 over 0.0 seconds
            • Variable - Set loc[(Triggering player)] = (Position of RedHero)
            • Variable - Set loc2[(Triggering player)] = (loc[(Triggering player)] offset by 0.18 towards (Facing of RedHero) degrees)
            • General - If (Conditions) then do (Actions) else do (Actions)
              • If
                • (loc2[(Triggering player)] is passable) == true
              • Then
                • General - If (Conditions) then do (Actions) else do (Actions)
                  • If
                    • Atf[(Triggering player)] == false
                  • Then
                    • Animation - Play Walk animation for (Actor for RedHero) as Default, using Play Forever options and Default Time blend time
                    • Variable - Set Atf[(Triggering player)] = true
                  • Else
                • Unit - Move RedHero instantly to loc2[(Triggering player)] (Blend)
              • Else
                • Variable - Set loc2[(Triggering player)] = (loc[(Triggering player)] offset by -0.12 towards (Facing of RedHero) degrees)
                • General - If (Conditions) then do (Actions) else do (Actions)
                  • If
                    • (loc2[(Triggering player)] is passable) == true
                  • Then
                    • Unit - Move RedHero instantly to loc2[(Triggering player)] (Blend)
                  • Else
          • Else
            • General - If (Conditions) then do (Actions) else do (Actions)
              • If
                • Adn[(Triggering player)] == true
              • Then
                • Unit - Make RedHero face 180.0 over 0.0 seconds
                • Variable - Set loc[(Triggering player)] = (Position of RedHero)
                • Variable - Set loc2[(Triggering player)] = (loc[(Triggering player)] offset by 0.18 towards (Facing of RedHero) degrees)
                • General - If (Conditions) then do (Actions) else do (Actions)
                  • If
                    • (loc2[(Triggering player)] is passable) == true
                  • Then
                    • General - If (Conditions) then do (Actions) else do (Actions)
                      • If
                        • Atf[(Triggering player)] == false
                      • Then
                        • Animation - Play Walk animation for (Actor for RedHero) as Default, using Play Forever options and Default Time blend time
                        • Variable - Set Atf[(Triggering player)] = true
                      • Else
                    • Unit - Move RedHero instantly to loc2[(Triggering player)] (Blend)
                  • Else
                    • Variable - Set loc2[(Triggering player)] = (loc[(Triggering player)] offset by -0.12 towards (Facing of RedHero) degrees)
                    • General - If (Conditions) then do (Actions) else do (Actions)
                      • If
                        • (loc2[(Triggering player)] is passable) == true
                      • Then
                        • Unit - Move RedHero instantly to loc2[(Triggering player)] (Blend)
                      • Else
              • Else
                • General - If (Conditions) then do (Actions) else do (Actions)
                  • If
                    • Sdn[(Triggering player)] == true
                  • Then
                    • Unit - Make RedHero face 270.0 over 0.0 seconds
                    • Variable - Set loc[(Triggering player)] = (Position of RedHero)
                    • Variable - Set loc2[(Triggering player)] = (loc[(Triggering player)] offset by 0.18 towards (Facing of RedHero) degrees)
                    • General - If (Conditions) then do (Actions) else do (Actions)
                      • If
                        • (loc2[(Triggering player)] is passable) == true
                      • Then
                        • General - If (Conditions) then do (Actions) else do (Actions)
                          • If
                            • Atf[(Triggering player)] == false
                          • Then
                            • Animation - Play Walk animation for (Actor for RedHero) as Default, using Play Forever options and Default Time blend time
                            • Variable - Set Atf[(Triggering player)] = true
                          • Else
                        • Unit - Move RedHero instantly to loc2[(Triggering player)] (Blend)
                      • Else
                        • Variable - Set loc2[(Triggering player)] = (loc[(Triggering player)] offset by -0.12 towards (Facing of RedHero) degrees)
                        • General - If (Conditions) then do (Actions) else do (Actions)
                          • If
                            • (loc2[(Triggering player)] is passable) == true
                          • Then
                            • Unit - Move RedHero instantly to loc2[(Triggering player)] (Blend)
                          • Else
                  • Else
                    • General - If (Conditions) then do (Actions) else do (Actions)
                      • If
                        • Ddn[(Triggering player)] == true
                      • Then
                        • Unit - Make RedHero face 0.0 over 0.0 seconds
                        • Variable - Set loc[(Triggering player)] = (Position of RedHero)
                        • Variable - Set loc2[(Triggering player)] = (loc[(Triggering player)] offset by 0.18 towards (Facing of RedHero) degrees)
                        • General - If (Conditions) then do (Actions) else do (Actions)
                          • If
                            • (loc2[(Triggering player)] is passable) == true
                          • Then
                            • General - If (Conditions) then do (Actions) else do (Actions)
                              • If
                                • Atf[(Triggering player)] == false
                              • Then
                                • Animation - Play Walk animation for (Actor for RedHero) as Default, using Play Forever options and Default Time blend time
                                • Variable - Set Atf[(Triggering player)] = true
                              • Else
                            • Unit - Move RedHero instantly to loc2[(Triggering player)] (Blend)
                          • Else
                            • Variable - Set loc2[(Triggering player)] = (loc[(Triggering player)] offset by -0.12 towards (Facing of RedHero) degrees)
                            • General - If (Conditions) then do (Actions) else do (Actions)
                              • If
                                • (loc2[(Triggering player)] is passable) == true
                              • Then
                                • Unit - Move RedHero instantly to loc2[(Triggering player)] (Blend)
                              • Else
                      • Else
                        • Animation - Clear the Default animation for (Actor for RedHero)
                        • Variable - Set Atf[(Triggering player)] = false
     
  8. redmarine

    redmarine

    Joined:
    Sep 4, 2007
    Messages:
    2,781
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Another possible issue is that your variable isn't large enough to handle all of them. Increase their array index. Will that solve the issue? No idea.
     
  9. Arhowk

    Arhowk

    Joined:
    Aug 8, 2007
    Messages:
    2,752
    Resources:
    0
    Resources:
    0
    no. i still get the error (see first post) and it doesnt work
     
  10. Illidan(Evil)X

    Illidan(Evil)X

    Joined:
    Oct 24, 2004
    Messages:
    646
    Resources:
    150
    Models:
    109
    Icons:
    27
    Skins:
    2
    Maps:
    12
    Resources:
    150
    You can't use Triggering Player with a timer event.
    Because there are no player triggering the trigger, Triggering Player most likely returns a value of -1 or something, hence the array underflow error.
     
  11. Arhowk

    Arhowk

    Joined:
    Aug 8, 2007
    Messages:
    2,752
    Resources:
    0
    Resources:
    0
    [stupid]duh..[/stupid]

    mite as well try doing it with a for each integer action..

    edit : -.-