Absolutely Baffling Problem (+Rep, please help)

Denegoth

New Member
Reaction score
18
In my map I have a hero selection area with many taverns. There has never been a single problem with it until now. I recently added another hero (With nothing strange that should have caused a bug). Now in a 5v5 game, whenever I select the hero, it appears to not be getting stored in the Hero variable, meaning it cannot be manipulated using that variable. This causes problems as I use the variable a lot. +rep to whoever can tell me the problem.

PS: The code probably leaks, but I don't particularly give a damn.

Trigger:
  • Hero Sale
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • ((Sold unit) is A Hero) Equal to True
    • Actions
      • Wait 0.10 seconds
      • Unit Group - Pick every unit in (Units owned by (Owner of (Sold unit)) of type Hero Selection) and do (Actions)
        • Loop - Actions
          • Unit - Remove (Picked unit) from the game
      • Unit - Move (Sold unit) instantly to ((Owner of (Sold unit)) start location)
      • Camera - Pan camera for (Owner of (Sold unit)) to ((Owner of (Sold unit)) start location) over 0.00 seconds
      • Selection - Select (Sold unit) for (Owner of (Sold unit))
      • Set Hero[(Player number of (Owner of (Sold unit)))] = (Sold unit)
      • Special Effect - Create a special effect attached to the origin of (Sold unit) using GeneralHeroGlow.mdx
      • Unit - Change color of (Sold unit) to (Color of (Owner of (Sold unit)))
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Make (Unit-type of Hero[(Player number of (Owner of (Sold unit)))]) Unavailable for training/construction by (Picked player)
 

Squirel

New Member
Reaction score
13
Few questions:

Did you make sure the new unit is a hero?

Have you considered reworking your event so that the hero is stored at a different time, like say the first time the hero leaves the town or when the hero enters an area?

Can you upload some sort of map for me to look at and see if there is a different problem outside the trigger you have there?

Also, you might try isolating that trigger and seeing if it is buggy on its own. The problem could be a trigger for one of that hero's spells or something.
 

Denegoth

New Member
Reaction score
18
Few questions:

Did you make sure the new unit is a hero?

Have you considered reworking your event so that the hero is stored at a different time, like say the first time the hero leaves the town or when the hero enters an area?

Can you upload some sort of map for me to look at and see if there is a different problem outside the trigger you have there?

Also, you might try isolating that trigger and seeing if it is buggy on its own. The problem could be a trigger for one of that hero's spells or something.

1) Definately is a hero. I played a whole 2 games with it.

2) The baffling thing is about the trigger, all other heroes work, so I can't see if it would be this.

3) Perhaps. It is quite big and my internet sucks though.

4) If I play the map single player, it works fine, and as I said the trigger worked fine previously.
 

Squirel

New Member
Reaction score
13
Disable every other trigger in the map completely, make a trigger that will tell you what the variable is when you type something, then test to see if the trigger works.
 

Denegoth

New Member
Reaction score
18
Trigger:
  • Comet
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Comet
    • Actions
      • Wait 0.75 seconds
      • Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing (Random real number between 100.00 and ((Real((Level of (Casting unit)))) x 50.00)) damage of attack type Chaos and damage type Normal


The only related trigger
 

Tom Jones

N/A
Reaction score
437
So let's start by determing how far the trigger executes:

Does the hero selector get removed?
Is the unit and camera moved/panned?
Is the unit selected?
Is the special effect created?
And lastly, is the unit disabled for further training?

To test the last use this:
Trigger:
  • Test
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • (Unit-type of (Sold unit)) Equal to Footman
    • Actions
      • Custom script: call IssueNeutralImmediateOrderById(Player(0),GetTriggerUnit(),GetUnitTypeId(GetSoldUnit()))
Copy/paste the custom script, and make sure that Player Red can afford buying the hero twice; give him double gold, double lumber, and double hero tickets.
 

Denegoth

New Member
Reaction score
18
So let's start by determing how far the trigger executes:

Does the hero selector get removed?
Is the unit and camera moved/panned?
Is the unit selected?
Is the special effect created?
And lastly, is the unit disabled for further training?

Yes
Yes
Yes
Yes
Yes

The baffling part is everything works except that specific hero.

Edit: Could it have anything to do with the length of the name? The hero's name is Lenna Charlotte Tycoon, and its hero type is Time Mage.
 

Igor_Z

You can change this now in User CP.
Reaction score
61
I don't get what this trigger is for but...
Leak: Unit Group - Pick every unit in (Units owned by (Owner of (Sold unit)) of type Hero Selection) and do (Actions)
Don't leave leaks behind they'll make lags in the game. I don't say this cuz I've read about it, I say this cuz i had leaks and they made the game lag as hell
About the trigger: The trigger worked fine and all of a sudden you added a new hero and it didn't? Very strange
 

Tom Jones

N/A
Reaction score
437
So let's start by determing how far the trigger executes:

Does the hero selector get removed?
Is the unit and camera moved/panned?
Is the unit selected?
Is the special effect created?
And lastly, is the unit disabled for further training?

Yes
Yes
Yes
Yes
Yes

Trigger:
  • Player Group - Pick every player in (All players) and do (Actions)
    • Loop - Actions
      • Player - Make (Unit-type of Hero[(Player number of (Owner of (Sold unit)))]) Unavailable for training/construction by (Picked player)
This means that your variable works.
 

Denegoth

New Member
Reaction score
18
This means that your variable works.

I decided to work around it with a trigger, and make a trigger to test it.

Trigger:
  • Hero Var
    • Events
      • Unit - A unit enters Region 013 Copy <gen>
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set Hero[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)



And the checking trigger..

Trigger:
  • Check
    • Events
      • Player - Player 1 (Red) types a chat message containing -herocheck as An exact match
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Heroes:
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Game - Display to (All players) the text: ((Name of (Player((Integer A)))) + <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /> + (Proper name of Hero[(Integer A)])))


Thanks to everyone who helped. +repping you all now
 
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

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top