Cannot get the units to be replaced.

Zanderist

New Member
Reaction score
5
attachment.php


What I want to happen in this trigger is that a unit structure(s) will be replaced with a footman. This doesn't work. Though I am able to create footmen at the point where the structures stand.

I think I may have to kill the structure, and have 1 foot man spawn at the point of dying unit.
 

Zanderist

New Member
Reaction score
5
The range point is being set through out the map by a builder unit.


What the builder does is builds a scout tower (custom unit) which in turns gets added into a unit array variable. Which makes this trigger possible.

Pay no attention to The floating text, it is something I left over from before.

(btw Range is a tower in the middle of the map, that is invincible.)



Another question,

Can I also set a range distance condition. Meaning, only towers between ranges 100 and 3000 will get replaced?


"Replace unit if and only if within 100< x >3000 from range"
 

Bogrim

y hello thar
Reaction score
154
Your loop is the problem. Read this tutorial. Basically your loop should follow this structure:

Trigger:
  • Actions
    • Custom Script: local integer i
    • If (Increasing_Array Equal to 8192) then do (Set Increasing_Array = 0) else do (Set Increasing_Array = (Increasing_Array + 1))
    • Custom script: set i = udg_Increasing_Array
    • Custom script: set udg_Temp_Integer = i
    • For each (Integer C[Temp_Integer]) from 1 to 10, do (Actions)
      • Loop - Actions
        • Wait 0.00 seconds
        • Custom script: set udg_Temp_Integer = i
 

Zanderist

New Member
Reaction score
5
I've already stated that custom scripts will not function in any map I make.

Which pisses me off.

It's funny because I can get the loop to work with everything else, but replace units.

I can create, and destroy units, but not replace.
 

Bogrim

y hello thar
Reaction score
154
No, you didn't state you couldn't use custom scripts. I seriously recommend reinstalling WC3 and patching up to the latest version. It sounds more like your game is broken.
 

Zanderist

New Member
Reaction score
5
No, you didn't state you couldn't use custom scripts. I seriously recommend reinstalling WC3 and patching up to the latest version. It sounds more like your game is broken.

My game has been working and hasn't had any trouble, it's only when I try to use a custom script it disables the function because it doesn't understand it.

And my game is up to date.

I'd love to use a custom script to stream line everything.
 

Bogrim

y hello thar
Reaction score
154
Zanderist, nothing of what you're saying right now is making any sense. Custom scripts are just jass, and all actions in the GUI are also jass but in the form of templates. If you're suggesting that you can't use custom scripts, then your game is broken. If not, it's more likely that you're doing it wrong and you need to try harder to benefit from the help we offer.

That the loop began working the moment you removed the wait is also a clear indication that it was the integer variable you used for the loop that made your trigger break, just as I said earlier. Read the tutorial I linked, it explains thoroughly how and why your first loop didn't work.
 

Zanderist

New Member
Reaction score
5
okay, Custom script codes work, I just did your first part of your tutorial.

And I had no problems.

I just don't understand though, I had a priest heal a unit and I didn't see anything.

Never mind I see it now
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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 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

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top