Problems with items

Kildare

New Member
Reaction score
7
Hey guys, i'm having a little problem with Item usage here. I've managed to get everything done(item Containers, classes, etc) but i can't seem to get the item to use its ability.

Basically what i want to do here is that when the player clicks on the item, it will make the item's holder use an ability. Can someone help me with this? Thanks.
 

Kildare

New Member
Reaction score
7
Actually, to be honest i'm not entirely sure whether i did the right thing. How exactly does one attach an ability to an item anyway? I can only see Effects and Behaviours in the Item data but nothing about actors or abilities.
 

XxMayhemxX

New Member
Reaction score
6
How are you wanting it to work..
use the ability when you click on the item in the inventory?
or
when the item is in the inventory, then add a command button for its ability?

if you use the command card, then you could maybe make an ability for it, and a command button, then have a trigger so when you have item in inventory, then it shows up on your command card? idk .. just brainstormin
 

Kildare

New Member
Reaction score
7
No i just want it to like cast a spell when i click/use the item in the inventory.

EDIT: Think Warcraft III Spell Items.

EDIT2: To be precise, what i actually want to do is to detect the ability cast from the item via triggers.(Example: Unit starts the effects of an Ability - (Item Ability), then Do Actions) The problem now is no matter what i do the ability won't trigger. I'm not sure where the ability is supposed to be "placed" in the item data.
 

Dave312

Censored for your safe viewing
Reaction score
269
Under behaviors there is a type called 'Click Response'. I reckon you will need to attach that behavior type to the item and then attach the ability's effect to the behavior. I was trying to test whether I was right however I seem to be stuck in creating an item that I can actually place.
 

Kildare

New Member
Reaction score
7
OK, but how would triggers DETECT that behaviour/effect? As far as i can see there's no Event that detects whether a behaviour or effect is triggered.
 

Dave312

Censored for your safe viewing
Reaction score
269
Why do you need to use triggers? The whole idea behind this Data Editor is so you don't need to use triggers.
 

XxMayhemxX

New Member
Reaction score
6
ummm probably because he wants to set up a trigger so something else happens when ability is used

you realize how trigs work right? they are powerful ways to make stuff happen...
stuff that couldnt possibly otherwise happen on their own...

Could you make a powerful, multiple, if then else statement in data editor? no...

you can set up all the correct data fields for the item and the ability all you want...

...but your not gonna get the effect he want thru any data field...
you cant script in the data editor tho

of course he hasnt told us exactly what he wants to do other then detect WHEN its being used... that has trigger written all over it...
 

XxMayhemxX

New Member
Reaction score
6
i made a new item.. with equip behavior of cloak...

now i made a trigger...

Untitled Trigger 001
Events
Unit - (Item carried by (Triggering unit) in slot 3) uses Ghost - Cloak (Ghost) at Generic1 - Any stage (Ignore shared abilities)
Local Variables
Conditions
Actions
Transmission - Send transmission to (All players) from (Unit with Flash (Do Not override portrait) playing Talk) playing No Sound Link with name Name and message "Ahh the item works perfectly" using (Cinematic portrait (Center Left)) playing Talk (Add 0.0 seconds, Don't Wait until it finishes)


what this will do is whenever the item in item slot 3 uses toggle Cloak(which i can toggle by clicking on the item) i'll get the transmission "Ahh, the item works perfectly..."

I placed the Event in bold and in Events, it's called Unit Uses Ability, then you double click on Any Unit, and select Item Carried In Slot



You can set up what the item does thru Data.. but to do what he wants to do, which is an action when the item does what it does, he's gonna need a trigger...
 

Kildare

New Member
Reaction score
7
So, correct me if i'm wrong, i"ll need to put a separate event(within the same trigger of course) to detect the item from each available slot? hmm...


Well, actually the original problem i had is that the item won't trigger the ability it contains, no matter what i did with the data values. So the problem here isn't so much the triggers, but getting the item to cast the spell i want it to. That's why i asked how you put abilities into an item, because i don't know how to exactly. So how did put the ability into the item?(Let's say a spell/ability that targets self, meaning it won't require you to choose a target and casts instantly)

I know this may be slightly confusing but please bear with me. =/

EDIT: Ok to avoid further confusion i should just tell you a general idea of what i want to do. Basically i want a trigger to detect whenever a certain item is being "used" so that i can give certain attributes or perform a certain action. Think of it as something like when a player chooses what equipment he wants to equip, and i give the "effects" via triggers instead of through item data.
 

XxMayhemxX

New Member
Reaction score
6
yeah i get it.. like say your wearing a robe of invisibility.. and whenever you have the item.. your always cloaked.. like an aura...

Except you want it to work when you click on it, instead of just having it..
 
Reaction score
54
So, correct me if i'm wrong, i"ll need to put a separate event(within the same trigger of course) to detect the item from each available slot? hmm...


Well, actually the original problem i had is that the item won't trigger the ability it contains, no matter what i did with the data values. So the problem here isn't so much the triggers, but getting the item to cast the spell i want it to. That's why i asked how you put abilities into an item, because i don't know how to exactly. So how did put the ability into the item?(Let's say a spell/ability that targets self, meaning it won't require you to choose a target and casts instantly)

I know this may be slightly confusing but please bear with me. =/

EDIT: Ok to avoid further confusion i should just tell you a general idea of what i want to do. Basically i want a trigger to detect whenever a certain item is being "used" so that i can give certain attributes or perform a certain action. Think of it as something like when a player chooses what equipment he wants to equip, and i give the "effects" via triggers instead of through item data.

If you are going use these events a lot, you may want to create a new event definition.

What do you want the item to do? Basically, you just have to put the desired effect under the effect field of the item. (You did base the item on Default Effect Item, right?)

Abilities cause effects. Items cause effects. Items do not cause abilities.
 

Kildare

New Member
Reaction score
7
Well, basically for me the item itself doesn't actually do anything(effects-wise). I just want the trigger to detect if a certain item is used, then it will trigger a certain action. Basically this has something to do with "equipping". For instance, i have an item titled "Machine Guns". When i "use"(or equip) that item, my unit will now have equipped a "Machine Gun".

The problem here is that the item data values only registers Effects, and not abilities. And the triggers don't detect effects, but abilities. So you must understand my confusion here. ><
 

Kildare

New Member
Reaction score
7
No! I don't want weapons! Don't misunderstand me about the "equipping" part. That was just an example. Basically this is what i want to do in simple trigger format:

Event: Unit uses an ability/item
Condition: If item/ability used == Machine Guns
Action:
Set WeaponEquipped = "Machine Guns"

I'm not actually giving the unit a Machine Gun attack. i just want to set it so that a variable keeps track of the unit as a unit armed with a machine gun. This will obviously lead on to other triggers that make use of that.
 
Reaction score
54
Kildy,

you can give your units a dummy Machine Guns weapon and later check if they have it with Unit Weapon condition check.

All this is doing is moving your data from your global variables to the actual units, please don't get mad.

Edit: You could also apply a Buff, Machine Guns Enabled, if the idea of adding more weapons to the unit irritates you.
 

XxMayhemxX

New Member
Reaction score
6
i made a new item.. with equip behavior of cloak...

now i made a trigger...

Untitled Trigger 001
Events
Unit - (Item carried by (Triggering unit) in slot 3) uses Ghost - Cloak (Ghost) at Generic1 - Any stage (Ignore shared abilities)
Local Variables
Conditions
Actions
Transmission - Send transmission to (All players) from (Unit with Flash (Do Not override portrait) playing Talk) playing No Sound Link with name Name and message "Ahh the item works perfectly" using (Cinematic portrait (Center Left)) playing Talk (Add 0.0 seconds, Don't Wait until it finishes)


what this will do is whenever the item in item slot 3 uses toggle Cloak(which i can toggle by clicking on the item) i'll get the transmission "Ahh, the item works perfectly..."

I placed the Event in bold and in Events, it's called Unit Uses Ability, then you double click on Any Unit, and select Item Carried In Slot



You can set up what the item does thru Data.. but to do what he wants to do, which is an action when the item does what it does, he's gonna need a trigger...

I still would use this trigger and add another action in it which sets a global(not local)variable... Gun equipped
you can make another trigger which changes the variable -1 or whatever when you toggle the item off(unequip gun) so depending on what the variable is, other triggers will be able to look at the variable Gun Equipped and see if its 0 or 1 (equiped or unequiped)
 

Kildare

New Member
Reaction score
7
Ancanus: I'm not mad lol, just slightly flustered. ><

Well, i did thought of that after you told me about the solution but it still doesn't solve the problem that i can't use triggers to detect when an item is used(if i'm not doing it for an "equip" detect trigger).

Mayhem: I'll play around with your solution and i'll see what i can get out of it.

Thanks for the help guys. ><
 
Reaction score
54
I'll try to elaborate.

You give your item Machine Guns, an Apply Buff effect. This will apply a buff called Machine Guns Enabled.

When an unit uses your item, you can detect this with the event: Unit Attribute Points Change, with the condition Triggering Behaviour == Machine Guns Enabled.

Edit: Just a sec, producing a test map.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top