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.
 

Tyrulan

Ultra Cool Member
Reaction score
37
First thing I would do is remove (Entering Unit). It's glitchy and causes bugs.
 

Scary Nachos

Castro flashing Gang Signs!
Reaction score
45
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?
 

Tyrulan

Ultra Cool Member
Reaction score
37
He's created a very large region called "Tele From StartCave". He wants to teleport to a random place in it.
 

Scary Nachos

Castro flashing Gang Signs!
Reaction score
45
>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
 

Tyrulan

Ultra Cool Member
Reaction score
37
Haha not a random point in the cave. tele FROM cave. From cave to somewhere else.
 

Scary Nachos

Castro flashing Gang Signs!
Reaction score
45
OH from cave to somewhere else... oh... :p

Edit: So once he leaves the cave, then the abbility doesnt work?
 

Sneakster

Active Member
Reaction score
24
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.
 

Scary Nachos

Castro flashing Gang Signs!
Reaction score
45
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
 

Sneakster

Active Member
Reaction score
24
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...
 

Scary Nachos

Castro flashing Gang Signs!
Reaction score
45
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.

      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