Need help with triger

D

DarkKronos

Guest
I want to be able to type -buy (item) then give the person the item.
 

Monovertex

Formerly Smith_S9
Reaction score
1,461
You cannot. That's because you cannot create the item that the player writes. I mean, you cannot 'transform' that string into an item. Got it? :D
 
D

DarkKronos

Guest
-.- dude ever played sheep tag reborn that has -buy, so it does got it?
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
Maybe lots of separate triggers or conditions what checks the entered string and creates the right item.
 

BlackDiamond

New Member
Reaction score
15
Code:
Events:
Player 1 types...-buy X item as an exact match
Conditions:
Actions:
Custom Script: set bj_want destroy group equal to true
Pick all heroes in playable map area and do actions
Loop Actions:
Give X item to picked unit
 

Monovertex

Formerly Smith_S9
Reaction score
1,461
@Black Diamond, You cannot simply transform the entered string 'X' in an item.

I think the solution would be a separate trigger for each item. Lot's of ifs i don't think it would work, cuz the event would be 'enters "-buy"' and I don't think you are able to check if the player wrote something else after the -buy.

Anyway, afterall, why don't you follow Mini-Me's device? Ask the map creators themselves.

BTW, can you give me a link to this map?
 
D

DarkKronos

Guest
i ment a differnt trigger for each item. all i wont is to type -buy golem and u get a stone tokin (item) in your iventry like on sheep tag reborn (str)

and if u have msn i can send u the map
 

Monovertex

Formerly Smith_S9
Reaction score
1,461
If you wanted this, then here's a trigger:

Code:
Stone Token
    Events
        Player - Player 1 (Red) types a chat message containing -buy golem as An exact match
    Conditions
    Actions
        Hero - Create Stone Token and give it to (your hero here)
 
P

PIFbg

Guest
I think what they used in SHEEP TAG is this:

1. You have to create some variables:
HeroRED - Unit
HeroBlue - Unit
etc
2. You have to set the variables:

Set HeroRED equal to (Some Unit)
3.
Code:
    Events
        Player - Player 1 (Red) types a chat message containing -buy Invisible Sheep as An exact match
    Conditions
    Actions
        Hero - Create Invisible Sheep and give it to (HeroRED)
 

N2o)

Retired.
Reaction score
51
smith_s9 said:
@Black Diamond, You cannot simply transform the entered string 'X' in an item.

I think the solution would be a separate trigger for each item. Lot's of ifs i don't think it would work, cuz the event would be 'enters "-buy"' and I don't think you are able to check if the player wrote something else after the -buy.

Substrings?
 
D

DarkKronos

Guest
how do i do it if hero is made by trigger :confused:
(i cant select a unit on map)
 

N2o)

Retired.
Reaction score
51
Make a unit variable and do:
Code:
set *your unit variable* = last created unit
 

Drakens

New Member
Reaction score
7
you can make some Array system, like setting all the items and strings in arrays...
Set ItemString[1]= "potion"
...
Set Item[1]= the potion item
...
And then a trigger like this:
Code:
Events:
      Player1 (Red) enters a chat message containing "-buy " as a substring // Repeat for each player
Conditions:
Actions:
      if (entered chat string (6 - lenght of (entered chat string)) = ItemString[1]
      then do give Item[1] to player
      else do nothing
I'm not sure if you can do this, or if there is an easier way :eek: (maybe using interger A or something...)

DarkKronos said:
how do i do it if hero is made by trigger :confused:
(i cant select a unit on map)
Set Hero[Player number of (Owner of Entering unit)]= Last created unit
/\ this only works if you select heros by entering on a region, if you are using another method change the "Player number of (Owner of Entering Unit)" To something that works :p
 
D

DarkKronos

Guest
aarrrrrrrrrrrrrrrrrrrrrr maybe im not cut out for all this i dun know how to do it grrrr




(entered chat string (6 - lenght of (entered chat string)) cant figure that shit out and how u do this Set Item[1]= the potion item



Events:
Player1 (Red) enters a chat message containing "-buy " as a substring // Repeat for each player
Conditions:
Actions:
if (entered chat string (6 - lenght of (entered chat string)) = ItemString[1]
then do give Item[1] to player
else do nothing :banghead: :banghead: :banghead: :banghead:
 

N2o)

Retired.
Reaction score
51
what he has done is a substring and for that item[1] you need a variable.
when in trigger editor press ctrl+b and create an item-type variable.
 
D

DarkKronos

Guest
how will the trigger know wat item i want if it just has a name :confused:
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • 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 Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top