Annoying bug

baaabuuu

New Member
Reaction score
2
My partner and I are having some problems with some triggers actually quite a lot and it is making my partener soo annoyed that he wants to quit the project :(.
iknow i usually lurks around the forums not saying anything but could someone please help me?
this is how the bug goes: Whenever the unit aquires a item which changes the class of the hero it goes f*** here is trigger of that system
Trigger:
  • ArmorSet2 Wear
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to |c00006FDDBeast Master's Leather Armor|r
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item carried by (Triggering unit) in slot 1)) Equal to |c00006FDDBeast Master's Leather Armor|r
              • Or - Any (Conditions) are true
                • Conditions
                  • (Item-type of (Item carried by (Triggering unit) in slot 2)) Equal to |c00006FDDBeast Master's Leather Armor|r
                  • (Item-type of (Item carried by (Triggering unit) in slot 3)) Equal to |c00006FDDBeast Master's Leather Armor|r
                  • (Item-type of (Item carried by (Triggering unit) in slot 4)) Equal to |c00006FDDBeast Master's Leather Armor|r
                  • (Item-type of (Item carried by (Triggering unit) in slot 5)) Equal to |c00006FDDBeast Master's Leather Armor|r
                  • (Item-type of (Item carried by (Triggering unit) in slot 6)) Equal to |c00006FDDBeast Master's Leather Armor|r
            • Then - Actions
              • Trigger - Turn off (This trigger)
            • Else - Actions
              • Unit - Add ArmorSet2 Wear to (Hero manipulating item)
              • Unit - Order (Hero manipulating item) to Night Elf Druid Of The Talon - Storm Crow Form
              • Wait 0.30 seconds
              • Unit - Remove ArmorSet2 Wear from (Hero manipulating item)
        • Else - Actions

and this is when the unit drops the item

Trigger:
  • ArmorSet1 Remove
    • Events
      • Unit - A unit Loses an item
      • Unit - A unit Pawns an item (to shop)
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to |c0000B300Grunt Armor|r
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item carried by (Triggering unit) in slot 1)) Equal to |c00006FDDBeast Master's Leather Armor|r
              • Or - Any (Conditions) are true
                • Conditions
                  • (Item-type of (Item carried by (Triggering unit) in slot 2)) Equal to |c00006FDDBeast Master's Leather Armor|r
                  • (Item-type of (Item carried by (Triggering unit) in slot 3)) Equal to |c00006FDDBeast Master's Leather Armor|r
                  • (Item-type of (Item carried by (Triggering unit) in slot 4)) Equal to |c00006FDDBeast Master's Leather Armor|r
                  • (Item-type of (Item carried by (Triggering unit) in slot 5)) Equal to |c00006FDDBeast Master's Leather Armor|r
                  • (Item-type of (Item carried by (Triggering unit) in slot 6)) Equal to |c00006FDDBeast Master's Leather Armor|r
            • Then - Actions
              • Trigger - Turn off (This trigger)
            • Else - Actions
              • Unit - Order (Hero manipulating item) to Night Elf Druid Of The Talon - Storm Crow Form
              • Unit - Add ArmorSet1 Wear to (Hero manipulating item)
              • Wait 0.30 seconds
              • Unit - Remove ArmorSet1 Wear from (Hero manipulating item)
        • Else - Actions

here comes the movement system(only forward and camlock)
Trigger:
  • Set Camera
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
    • Conditions
      • (Owner of (Triggering unit)) Equal to (Triggering player)
    • Actions
      • Set ZUnit[(Player number of (Triggering player))] = (Triggering unit)

this is the base movement moving and setting which way the unit will move.

Trigger:
  • Movement
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • Set Pan_Position[(Player number of (Owner of ZUnit[(Integer A)]))] = (Position of ZUnit[(Integer A)])
          • Custom script: set udg_LocZ_Camera[GetForLoopIndexA()]=GetLocationZ(udg_Pan_Position[GetForLoopIndexA()])
          • Custom script: call SetCameraZ(GetOwningPlayer(udg_ZUnit[GetForLoopIndexA()]), udg_LocZ_Camera[GetForLoopIndexA()]+100)
          • Camera - Lock camera target for (Owner of ZUnit[(Integer A)]) to ZUnit[(Integer A)], offset by (0.00, 0.00) using Default rotation
          • Camera - Set (Owner of ZUnit[(Integer A)])'s camera Distance to target to 1050.00 over 0.10 seconds
          • Camera - Set (Owner of ZUnit[(Integer A)])'s camera Angle of attack to 320.00 over 0.10 seconds
          • Camera - Set (Owner of ZUnit[(Integer A)])'s camera Rotation to (Facing of ZUnit[(Integer A)]) over 0.30 seconds
          • Custom script: call RemoveLocation(udg_Pan_Position[bj_forLoopAIndex])
          • -------- Forward --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Z_Forward[(Integer A)] Equal to True
              • Z_Left[(Integer A)] Equal to False
              • Z_Right[(Integer A)] Equal to False
            • Then - Actions
              • Set ZPoint[(Integer A)] = (Position of ZUnit[(Integer A)])
              • Set ZPoint2[(Integer A)] = ((Position of ZUnit[(Integer A)]) offset by 20.00 towards (Facing of ZUnit[(Integer A)]) degrees)
              • Unit - Order ZUnit[(Integer A)] to Move To ZPoint2[(Integer A)]
              • Custom script: call RemoveLocation(udg_ZPoint[bj_forLoopAIndex])
              • Custom script: call RemoveLocation(udg_ZPoint2[bj_forLoopAIndex])
            • Else - Actions
          • -------- Forward and Left --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Z_Forward[(Integer A)] Equal to True
              • Z_Left[(Integer A)] Equal to True
              • Z_Right[(Integer A)] Equal to False
            • Then - Actions
              • Set ZPoint[(Integer A)] = (Position of ZUnit[(Integer A)])
              • -------- Set the speed of turning point. Default is 15 --------
              • Set ZPoint2[(Integer A)] = ((Position of ZUnit[(Integer A)]) offset by 20.00 towards ((Facing of ZUnit[(Integer A)]) + 15.00) degrees)
              • Unit - Order ZUnit[(Integer A)] to Move To ZPoint2[(Integer A)]
              • Custom script: call RemoveLocation(udg_ZPoint[bj_forLoopAIndex])
              • Custom script: call RemoveLocation(udg_ZPoint2[bj_forLoopAIndex])
            • Else - Actions
          • -------- Forward and Right --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Z_Forward[(Integer A)] Equal to True
              • Z_Left[(Integer A)] Equal to False
              • Z_Right[(Integer A)] Equal to True
            • Then - Actions
              • Set ZPoint[(Integer A)] = (Position of ZUnit[(Integer A)])
              • -------- Set the speed of turning point. Default is 15 --------
              • Set ZPoint2[(Integer A)] = ((Position of ZUnit[(Integer A)]) offset by 20.00 towards ((Facing of ZUnit[(Integer A)]) - 15.00) degrees)
              • Unit - Order ZUnit[(Integer A)] to Move To ZPoint2[(Integer A)]
              • Custom script: call RemoveLocation(udg_ZPoint[bj_forLoopAIndex])
              • Custom script: call RemoveLocation(udg_ZPoint2[bj_forLoopAIndex])
            • Else - Actions
          • -------- Left --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Z_Forward[(Integer A)] Equal to False
              • Z_Left[(Integer A)] Equal to True
              • Z_Right[(Integer A)] Equal to False
            • Then - Actions
              • -------- Set the speed of turning point. Default is 15 --------
              • Set ZAngle[(Integer A)] = ((Facing of ZUnit[(Integer A)]) + 15.00)
              • Unit - Make ZUnit[(Integer A)] face ZAngle[(Integer A)] over 0.00 seconds
            • Else - Actions
          • -------- Right --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Z_Forward[(Integer A)] Equal to False
              • Z_Left[(Integer A)] Equal to False
              • Z_Right[(Integer A)] Equal to True
            • Then - Actions
              • -------- Set the speed of turning point. Default is 15 --------
              • Set ZAngle[(Integer A)] = ((Facing of ZUnit[(Integer A)]) - 15.00)
              • Unit - Make ZUnit[(Integer A)] face ZAngle[(Integer A)] over 0.00 seconds
            • Else - Actions

and this is the move forward button click
Trigger:
  • Forward Press
    • Events
      • Player - Player 1 (Red) Presses the Up Arrow key
      • Player - Player 2 (Blue) Presses the Up Arrow key
      • Player - Player 3 (Teal) Presses the Up Arrow key
    • Conditions
    • Actions
      • Set Z_Forward[(Player number of (Triggering player))] = True

and this is when the button is release
Trigger:
  • Forward Release
    • Events
      • Player - Player 1 (Red) Releases the Up Arrow key
      • Player - Player 2 (Blue) Releases the Up Arrow key
      • Player - Player 3 (Teal) Releases the Up Arrow key
    • Conditions
    • Actions
      • Set Z_Forward[(Player number of (Triggering player))] = False
      • Set ZPoint[(Player number of (Triggering player))] = (Position of ZUnit[(Player number of (Triggering player))])
      • Unit - Move ZUnit[(Player number of (Triggering player))] instantly to ZPoint[(Player number of (Triggering player))]
      • Custom script: call RemoveLocation(udg_ZPoint[GetPlayerId(GetTriggerPlayer())+1])

Could someone please help me?
And i know it is a lot of triggers.
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
From top triggers towards bottom...

Trigger: ArmorSet2 Wear
1. You have an empty if-then-else with a if-then-else within it...
Code:
if
   empty
then
    if 
    then 
    else
else
  empty
Remove the outer if-then-else.

2. Change "Hero Manipulating Item" to "Triggering Unit"

3. Why do you use an "Or" condition five times, one for each slot?
I'm not really sure what you are trying to do with the conditions in your first trigger. If you want to check if triggering unit has the "Beast Master Leather Armor", you should do it like this:
Code:
((Triggering unit) has an item of type Orb of Frost) Equal to True
This returns true if the triggering unit has at least 1 orb of frost.

If you want to count how many leather armors the triggering unit has? You do it like this:
Code:
Actions
    Set count = 0
    For each (Integer A) from 1 to 6, do (Actions)
        Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                    (Item-type of (Item carried by (Triggering unit) in slot (Integer A))) Equal to Orb of Frost
                Then - Actions
                    Set count = (count + 1)
                Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        If - Conditions
            count Equal to 3
        Then - Actions
            Game - Display to (All players) the text: HERO HAS 3 ORBS!
        Else - Actions
This counts the orbs of frost for the triggering unit. If it has exact 3, it displays the message.

If you want to order the hero to use storm crow form if a hero picks up a "Beast Master Leather Armor", it is enough with the condition:
Code:
Event:
A unit acquires an item
Condition:
(Item-type of (Item being manipulated)) Equal to |c00006FDDBeast Master's Leather Armor|r
If a unit picks up the beast master item, then you know the unit has it, no need to do further checking, not for what the item-checking goes.

Trigger 2:Armor set1 remove
1. Same thing here, you have an empty if-then-else, then within the "then"-statement, you put another if-then-else... Remove the outer which does nothing anyways.

2. Use triggering unit, not "hero manipulating item".

3. Same as the "3" in the first trigger...

Else:
Should you not turn the ArmorSet2 wear on again, if a player drops/loses the item?

>>>Whenever the unit aquires a item which changes the class of the hero it goes f***
What do you mean by that? What happens? It only works for one unit, one player, or only the very first time, doesn't matter if it is player 1, 2 or 3?
 

WCGMapMaker

New Member
Reaction score
3
+ rep for many, dunno if u remember me, you pretty much put in all the custom skin and art into one of my maps for me a couple years ago.
 

baaabuuu

New Member
Reaction score
2
The ''f***'' is a bit hard to explain but it works like the unit only raises it foot very very farst places it down and suddenly the foot is on the ground and the other foot is up in the air.
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
>>>the unit only raises its foot very very farst places it down and suddenly the foot is on the ground and the other foot is up in the air.

What? Either explain a bit more in detail, show a picture of what happens or upload a map which shows your bug... :)
 

Radu_Udar

New Member
Reaction score
0
Ok,hello guys!
I am the one who is making this map.
SO,if you want to see some videos of what map I'm asking help for,then here they are:

http://www.youtube.com/watch?v=0EhDj...eature=related
http://www.youtube.com/watch?v=HaGSD6MQeR0
http://www.youtube.com/watch?v=qr46PQ_8-Vo

I made a light version of the map so you guys can test the bug Baaabuuu is atalking about and can open it in WE and try fix it (if possible).Models have been removed,so now it uses different models,but same triggers.

HERE A LINK TO THE DIRECT DOWNLOAD oF THE BUG TEST MAP VERSION:
http://filebeam.com/41bc10ed8d2293f7af4e2210ce62fe85


To test the bug correctly do these steps:

1.Start the map
2.Select your hero (goblin robot)
3.press any arrow key to test it and see that it works fine
4.take "grunt armor"
5.model changes into sea monster.
6.test arrow key movement works alright still.
7take other item without removing the one already equipped.
8.model changes into the new one,old item drops,movement system gets fu***d up!
9.take the item that dropped.
10.now even the model change gets bugged.
11.You can do other tests,and drop items again and see.

Is there a way to make the item restriction trigger so you have to drop your old chast armo to take a new one?

I really hope you guys have a solution for this.
Thanks in advance,Have a nice day!:thup:


EDIT:Also I am looking for an Expert/advanced triggerer,to help me with this.Anyone who want to be my triggerer (There is not much work,just i want triggers to be reviewed) will get huge credits,and a custom character in the map.Also Messanger would be awsome ,so comunication is easyer.
 

Attachments

  • BUG TEST VERSION.w3x
    160.6 KB · Views: 180

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
Here it goes...

First of all, setting the point variable "ZPoint2" to "offset by 20", when the units have 32 collision size, is not a good choice. It clicks on itself kind of, increase it to... say 100? (100 is melee range, so...).

Else what is really "bugging" isn't really a bug, it is you guys who do it wrong.
Your morphing goes like this:
Morph
Demorph
When adding one item and dropping it.

If I am to pick up one item, while the other still remains in my inventory it goes like this:
Morph (One of the village people)
Morph (I picked up my other item and morphed into Sea King)
Demorph (Now I try to demorph from the villager back to Goblin)

Solution?
Code:
Morph Villager
    Events
        Unit - A unit Acquires an item
    Conditions
        (Item-type of (Item being manipulated)) Equal to |c0000B300Grunt Armor|r
    Actions
        [COLOR="RoyalBlue"]-------- Make sure the morph is back to its normal state --------[/COLOR]
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                [COLOR="Red"]item Not equal to No item[/COLOR]
            Then - Actions
                [COLOR="Red"]Hero - Drop (Item carried by (Triggering unit) of type (Item-type of item)) from (Triggering unit)[/COLOR]
            Else - Actions
      [COLOR="RoyalBlue"]  -------- MORPH --------[/COLOR]
        Set item = (Item being manipulated)
        Wait 0.03 seconds
        Unit - Add Foot  to (Hero manipulating item)
        Unit - Order (Hero manipulating item) to Night Elf Demon Hunter - Metamorphosis
        Wait 0.01 seconds
        Unit - Remove Foot  from (Hero manipulating item)
Code:
Demoporh Vilalger
    Events
        Unit - A unit Loses an item
        Unit - A unit Pawns an item (to shop)
    Conditions
        (Item-type of (Item being manipulated)) Equal to |c0000B300Grunt Armor|r
    Actions
        [COLOR="Red"]Set item = No item[/COLOR]
        Unit - Add FootBack  to (Hero manipulating item)
        Unit - Order (Hero manipulating item) to Night Elf Demon Hunter - Metamorphosis
        Wait 0.01 seconds
        Unit - Remove FootBack  from (Hero manipulating item)
This results in a morphing like this, when I pick up a "wear" item when I am already "wearing" a "wear" item:
Morph
Demorph
Morph

About the red lines: Item variable is used to keep track on which item the unit is wearing and then I can only check if it is "null" or not as long as I set it back to null when an item is dropped, works for one player only, make it an array if...

I am using Metamorphosis here, works with crow form too, no problem.

Last, but not least, waits are required, cause morphing isn't that instant, nothing really is. My advice: Hide the morphing unit and create some fancy effects? Well... up to you guys.
 

Radu_Udar

New Member
Reaction score
0
Thank you very much for the reply!
So,as Baaabuuu is busy,would you mind fix it for me and upload the map?I would be really thankfull for that.I would realy appreciate that.
I suck at triggering and my warcraft is in italian so triggers are named totally different.If you do this for me I will add you in the credits list.
Thanks you in advance!:)<3:thup:
Also could you take a look at other triggers?Just to see if they are good or not.If you find something that could be changed,please feel free to change it.
Thank you
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
>>would you mind fix it
Nope.

>>Also could you take a look at other triggers?
Create a new thread then with the "other triggers" or the map, or whatever, and we will see...
 

Attachments

  • BUG TEST VERSION.w3x
    164.2 KB · Views: 173

Radu_Udar

New Member
Reaction score
0
Thank you very much.

Just one more question:
Is there a way to remove the morph sound (that annoying scream) and the animation of it?

Couse.....it looks wierd that when an armor changes,the hero acts like that lol.

Oh,just found out myself,thanks anyway!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top