Repick Trigger Needs More Functionality (was: Need trigger help)

Jeroen

New Member
Reaction score
0
Repick Trigger Needs More Functionality (was: Need trigger help) (Complete)

can some one help me get some specific triggers in this map?
i already have a repick trigger in it, but its so big, but it still works...

oké.
what does it normal do (like what the map is now, if i play it):
i pick a hero (can only pick 1 hero)
i can type: -repick
that works fine, but the Xp & items wil be removed, so have to start over again

What do i want:
I pick a hero, i make some xp (42xp...) buy some items
if i type: -repick
then save xp(42xp...) + items
pick a hero get that 42xp + items in my hero

thats all but i can't do it because i have Not enough Intelligence for this
 

Tyman2007

Ya Rly >.
Reaction score
74
What you want makes the people that play your map never learn. They will be showered with second chances and you shouldn't do that. If someone picks a unit, they stick with it. If they don't like it, they can shoot for another, but they shouldn't be givin back their XP and items. They pick the wrong one because of a cool name or something, and they learned about their mistake and now know what to go for and learned it for all maps of the type in general.
 

ShadowInTheD

Active Member
Reaction score
12
Tyman, not that it's a bad suggestion, but he asked how to fix it, not if it was a good or bad idea.

Edit: I'm thoroughly confused why you used 293052308 triggers to repick...
 

Tyman2007

Ya Rly >.
Reaction score
74
Just tryin to help hip not waste his time that's all.

But I'll take a look at the map. I've seen triggers well over 800 lines long...

UPDATE:
First look at the revive section, there is indeed a lot of triggers, so your task will be an easy, but long one. Nothing difficult¹, just need to store the items in a variable with an array and store the experience in a variable with an array.

You can create a new variable and call it PExperience and make it an array. then, set PExperience[1] = Hero - Experience of whatever or whatever option's similar to that.

As for storing items... Well that takes a long time to do.. You need to set an item type variable for every item you have and I don't know where to go on with that.. You need to have some knowledge of Save/Load systems and that's a little beyond me. I've never had the patience to fully learn how to make one.

You're better off just having a trigger drop the items, set the items in an array for items, not types, then have 1 variable for each player. Then do a loop, going from 1-6 for each item for each slot... Look up loops...

¹Note: That this is in fact extremely difficult and should not be attempted by the 10th time world editor user.
 

Jeroen

New Member
Reaction score
0
wel can some one help me on this like i say before i have Not enough Intelligence for this
 

Tyman2007

Ya Rly >.
Reaction score
74
I'll see what I can do

UPDATE:
Add this to the end of all the repicks and change the variables accordingly

Trigger:
  • Do Multiple ActionsFor each (Integer A) from 1 to 6, do (Actions)
    • Loop - Actions
      • Set PItems1[(Integer A)] = (Item carried by Player01 in slot (Integer A))
      • Hero - Drop the item from slot (Integer A) of Player01
      • Item - Hide (Last dropped item)


Look up loops.... please...

The part of giving the items back requires showing the items and moving the items..

This is your map and it has a million triggers... I don't know which leads to what.
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Save it in hashtables.

Trigger:
  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set HashtableVariable = (Last created hashtable)


Trigger:
  • Untitled Trigger 002
    • Events
      • Player - Player 1 (Red) types a chat message containing -repick as An exact match
    • Conditions
    • Actions
      • Set TempUnitGroup = (Units owned by (Triggering player))
      • Unit Group - Pick every unit in TempUnitGroup and do (Actions)
        • Loop - Actions
          • Hashtable - Save (Hero level of (Picked unit)) as 1 of (Key (Picked unit)) in (HashtableVariable)
          • For each (Integer A) from 1 to 6, do (Actions)
            • Loop - Actions
              • Hashtable - Save Handle Of(Item carried by (Picked unit) in slot (Integer A)) as (1 + (Integer A)) of (Key (Picked unit)) in (Last created hashtable)
          • Unit - Remove (Picked unit) from the game
        • Custom script: call DestroyGroup (udg_TempUnitGroup)


Trigger:
  • Untitled Trigger 003
    • Events
      • Unit - Unit is sold/bought/whatever you want here(But remember to change (triggering unit accordingly)
    • Conditions
    • Actions
      • Hero - Set (Triggering unit) Hero-level to (Load 1 of (Key (Triggering unit)) from (Last created hashtable)), Hide level-up graphics
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • Hero - Create (Item-type of (Load ((Integer A) + 1) of (Key (Triggering unit)) in (HashtableVariable))) and give it to (Triggering unit)


Trigger 1 is initialization. Trigger 2 is whenever you type -repick, saves the level and 6 items of the unit and removes it. Trigger 3, is whenver you pick a new unit, choose, dialog, whatever, depending on your map. Then adjust Triggering unit to the event and done. You get back level, and the 6 items.
 

Tyman2007

Ya Rly >.
Reaction score
74
Hashtables...
Hashtables...
Hashtables...

Man Newgen is awesome and all... but there are no hashtables.
 

Jeroen

New Member
Reaction score
0
there is a Hashtables

Naamloos.png
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
He's talking about Newgen. And do what I did in my triggers. It should work.
 

Jscooby

New Member
Reaction score
1
Did you make Super Summoner?

Why are you editing someone else's map..? They are active I believe in updating of Super Summoner.
 

Azeroc

New Member
Reaction score
1
Hashtables...
Hashtables...
Hashtables...

Man Newgen is awesome and all... but there are no hashtables.

There are hashtables in NewGen, main thing is, that they can be used with JASS, but not GUI, while in normal WE, you can use em in both GUI and JASS.
 

jomik

New Member
Reaction score
17
Easier way, if you repick with a wisp, or even if you don't just move the items to the wisp (dummy unit) and then save the hero's xp in the custom value, when a hero is picked, before the wips gets remove, make it drop the items and give them to the new hero, and get the custom value and give it to the hero in xp
 

Jeroen

New Member
Reaction score
0
uhm lol i can't get this triggers in there if i don't kown that this trigger is
like this:
Trigger:
  • Hashtable - Save (Hero level of (Picked unit)) as 1 of (Key (Picked unit)) in (HashtableVariable)

?? is it Hashtable - Save unit handle or Save group handle or Save player handle and then ... or something
plz say it like this:

Hashtable - Save unit handle
unit, variable: Player01...
as
value, 1
of
value, function: Hero - Hero level, (Triggering unit), variable: Player01...
in
(Last created hashtable), variable: HashtableVariable

this is what i don't kown how to make..
Trigger:
  • Hashtable - Save (Hero level of (Picked unit)) as 1 of (Key (Picked unit)) in (HashtableVariable)
    • .
    • Hashtable - Save Handle Of(Item carried by (Picked unit) in slot (Integer A)) as (1 + (Integer A)) of (Key (Picked unit)) in (Last created hashtable)
    • .
    • Hero - Set (Triggering unit) Hero-level to (Load 1 of (Key (Triggering unit)) from (Last created hashtable)), Hide level-up graphics
    • .
    • Hero - Create (Item-type of (Load ((Integer A) + 1) of (Key (Triggering unit)) in (HashtableVariable))) and give it to (Triggering unit)
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
It depends on what you're saving. Since hero level is an integer, then its save integer.
 

Jeroen

New Member
Reaction score
0
Found it :p
Hashtable - Save = Crap does not work good
it copy the items form the hero & paste it in a other hero
but if the hero that you saved the items is removed and make a new hero then
you don't get your items back hero 1 (Save items) must be in the game if u use the Hashtable
this map what i have created works good
Code:
Commands:
-repick
-repick Blue
-repick Teal
lol
 

Attachments

  • Random, Repick TesT Map4.w3x
    52.7 KB · Views: 169
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top