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: 166
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/
  • The Helper The Helper:
    Decided to put up a healthier type recipe to mix it up - Honey Garlic Shrimp Stir-Fry https://www.thehelper.net/threads/recipe-honey-garlic-shrimp-stir-fry.193595/
  • The Helper The Helper:
    Here is another comfort food favorite - Million Dollar Casserole - https://www.thehelper.net/threads/recipe-million-dollar-casserole.193614/

      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