Need help with triger

D

DarkKronos

Guest
I want to be able to type -buy (item) then give the person the item.
 
-.- dude ever played sheep tag reborn that has -buy, so it does got it?
 
Maybe lots of separate triggers or conditions what checks the entered string and creates the right item.
 
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
 
@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?
 
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
 
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)
 
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)
 
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?
 
how do i do it if hero is made by trigger :confused:
(i cant select a unit on map)
 
Make a unit variable and do:
Code:
set *your unit variable* = last created unit
 
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
 
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:
 
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.
 
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.
  • The Helper The Helper:
    It is weird seeing a way more realistic users online number
  • The Helper The Helper:
    Happy Tuesday Night!
    +1
  • 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 Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top