Equipment System Failure Question

Sneakster

Active Member
Reaction score
24
I am testing out quite a few systems on a test map to see which ones I like and which ones I don't. For some reason my item equipment system has a major bug. I need to know why my abilities fail to work when I reach a certain area in the map. Here are the triggers, then I'll explain:

Trigger:
  • Equip
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Equip Item
    • Actions
      • -------- Weapons --------
      • -------- Staffs --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Target item of ability being cast)) Equal to |cff8B8378Charred Walking Staff|r
          • EquipWeaponCheck[(Player number of (Owner of (Casting unit)))] Not equal to True
        • Then - Actions
          • Set PlyrGrpTmp = (Player group((Owner of (Casting unit))))
          • Set EquipWeaponItem[(Player number of (Owner of (Casting unit)))] = (Item-type of (Target item of ability being cast))
          • Hero - Drop (Target item of ability being cast) from (Casting unit)
          • Game - Display to PlyrGrpTmp the text: (|cff00ff00System|r: + ((Name of (Last dropped item)) + has been equipped!))
          • Item - Remove (Last dropped item)
          • Set EquipWeaponCheck[(Player number of (Owner of (Casting unit)))] = True
          • Unit - Add Item Damage Bonus (+1) to (Casting unit)
          • Custom script: call DestroyForce (udg_PlyrGrpTmp)
        • Else - Actions
      • -------- Blades --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Target item of ability being cast)) Equal to |c00c0c0c0Short Dagger|r
          • EquipWeaponCheck[(Player number of (Owner of (Casting unit)))] Not equal to True
          • (Unit-type of (Casting unit)) Equal to Sneakster
        • Then - Actions
          • Set PlyrGrpTmp = (Player group((Owner of (Casting unit))))
          • Set EquipWeaponItem[(Player number of (Owner of (Casting unit)))] = (Item-type of (Target item of ability being cast))
          • Hero - Drop (Target item of ability being cast) from (Casting unit)
          • Game - Display to PlyrGrpTmp the text: (|cff00ff00System|r: + ((Name of (Last dropped item)) + has been equipped!))
          • Item - Remove (Last dropped item)
          • Set EquipWeaponCheck[(Player number of (Owner of (Casting unit)))] = True
          • Unit - Add Item Damage Bonus (+2) to (Casting unit)
          • Custom script: call DestroyForce (udg_PlyrGrpTmp)
        • Else - Actions


This trigger uses a channel ability called "Equip Item" in order to Equip items depending on what they are. There is a part in the map where when you enter a cave, it moves the entering unit instantly to a different point in the map:
Trigger:
  • Tele to Reynold
    • Events
      • Unit - A unit enters Enter Cave <gen>
    • Conditions
    • Actions
      • Set StartLocTemp = (Random point in Tele From StartCave <gen>)
      • Unit - Move (Entering unit) instantly to StartLocTemp
      • Camera - Pan camera as necessary for (Owner of (Entering unit)) to StartLocTemp over 1.00 seconds
      • Custom script: call RemoveLocation(udg_StartLocTemp)


After teleporting to this location, the ability "Equip Item" no longer works. My other abilities do function. If you equip an item before entering the cave, the item will unequip after with the unequip ability:
Trigger:
  • UnequipWeapons
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Unequip Weapon
      • EquipWeaponCheck[(Player number of (Owner of (Casting unit)))] Equal to True
    • Actions
      • -------- Staff --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • EquipWeaponItem[(Player number of (Owner of (Casting unit)))] Equal to |cff8B8378Charred Walking Staff|r
        • Then - Actions
          • Set PlyrGrpTmp = (Player group((Owner of (Casting unit))))
          • Unit - Remove Item Damage Bonus (+1) from (Casting unit)
          • Set EquipWeaponCheck[(Player number of (Owner of (Casting unit)))] = False
          • Hero - Create EquipWeaponItem[(Player number of (Owner of (Casting unit)))] and give it to (Casting unit)
          • Game - Display to PlyrGrpTmp the text: (|cff00ff00System|r: + ((Name of (Last created item)) + has been unequipped!))
          • Custom script: call DestroyForce (udg_PlyrGrpTmp)
        • Else - Actions
      • -------- Blade --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • EquipWeaponItem[(Player number of (Owner of (Casting unit)))] Equal to |c00c0c0c0Short Dagger|r
        • Then - Actions
          • Set PlyrGrpTmp = (Player group((Owner of (Casting unit))))
          • Unit - Remove Item Damage Bonus (+2) from (Casting unit)
          • Set EquipWeaponCheck[(Player number of (Owner of (Casting unit)))] = False
          • Hero - Create EquipWeaponItem[(Player number of (Owner of (Casting unit)))] and give it to (Casting unit)
          • Game - Display to PlyrGrpTmp the text: (|cff00ff00System|r: + ((Name of (Last created item)) + has been unequipped!))
          • Custom script: call DestroyForce (udg_PlyrGrpTmp)
        • Else - Actions


Since I figured my crappy GUI was messing up, I spawned my hero way far away from the teleport location and tried equipping. It worked. When I made my hero walk to the spot where the cave teleports you, the abilities no longer worked, no matter how far away I got afterwords.

This problem is very weird and I've never had this problem with any other map.
 
First thing I would do is remove (Entering Unit). It's glitchy and causes bugs.
 
Hm..... so once you enter the cave, using teleportation, your abbility is unequipe... hm... maybe instead of using the trigger.... maybe... try a waygate, cause if you do that, and it still doesnt work.. you can limit down what is working and what is not working.... im not sure if you know what im talking about.. but.. try using something different than

Trigger:
  • Actions
    • Unit - Move (Entering unit) instantly to StartLocTemp


And also...
Set StartLocTemp = (Random point in Tele From StartCave <gen>)

So once your guy enters the cave, it spawns at a random point in the cave?
 
He's created a very large region called "Tele From StartCave". He wants to teleport to a random place in it.
 
>So once your guy enters the cave, it spawns at a random point in the cave?

Isnt that the same thing as i said? Heehee

I think.... i dunno what you think i said
 
Haha not a random point in the cave. tele FROM cave. From cave to somewhere else.
 
OH from cave to somewhere else... oh... :p

Edit: So once he leaves the cave, then the abbility doesnt work?
 
When I enter the region that moves me to another region, my spells cease to have any effect. I tried putting items by the region where i teleport to, and the items work with the spells, but the items I had before teleporting do not work with my spells.
 
Hm.... try the waygate thingy, might work i dunno if it will though...

Edit: Oh yeah i wanted you to see this, you might find it interesting, even if it doesnt really apply to your map.
http://www.thehelper.net/forums/showthread.php?t=124914&highlight=inventory
I think its freaking cool and might be nice in your map, but... if your equiping things, then you wont really need it.

Oh yeah i also found this, i think you already found it, but i dunno....
http://www.thehelper.net/forums/showthread.php?t=88230&highlight=equiping+items

Check it, i think you already have though
 
The tutorial you posted is what I based my system off of. I modified it and optimized it because the guy doesn't have a good grasp of efficient triggering...
 
How did i know :p
Hm...... well... im not sure whats going on...
Ill keep trying to find things that might help you...
Sorry for not exactly helping D=
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good

      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