Moron unit doesnt move just stands..

D

danhel

Guest
Code:
Shield of Necromancy
    Events
        Unit - A unit Is attacked
    Conditions
        ((Attacked unit) has an item of type Shield of Necromancy) Equal to True
    Actions
        Trigger - Turn off (This trigger)
        Set Shield_of_Necromancy_Attacked = (Position of (Attacked unit))
        Set Shield_of_Necromancy_Old = (Position of (Attacking unit))
        Set Shield_of_Necromancy_New = (Shield_of_Necromancy_Attacked offset by 500.00 towards (Angle from Shield_of_Necromancy_Attacked to Shield_of_Necromancy_Old) degrees)
        Player Group - Add (Owner of (Attacking unit)) to Shield_of_Necromancy_PG
        Cinematic - Disable user control for Shield_of_Necromancy_PG
        Unit - Order (Attacking unit) to Move To Shield_of_Necromancy_New
        Wait 1.50 seconds
        Cinematic - Enable user control for Shield_of_Necromancy_PG
        Player Group - Remove all players from Shield_of_Necromancy_PG
        Custom script: call RemoveLocation (udg_Shield_of_Necromancy_Attacked)
        Custom script: call RemoveLocation (udg_Shield_of_Necromancy_Old)
        Custom script: call RemoveLocation (udg_Shield_of_Necromancy_New)
        Trigger - Turn on (This trigger)

When a unit attacks the hero with the item (i didnt set integer chance stuff yet) it should disable the control of the owner of attacked hero, and order the attacking unit to move backwards.... But now it disables the control, and stop the unit attacking the target and nothing more :( the unit doesnt, move, whats the problem? thaanxa
 

Jo.O

Bored...
Reaction score
70
Well, you turn off 'this trigger' before you have all the actions. Not sure if thats the problem, but thats the only thing that I could think of
 
D

danhel

Guest
If you use trigger - turn off XYZ then it still executes it, but it cant be repeated untill i turn it on again. As you saw i did.
 

Rinpun

Ex TH Member
Reaction score
105
I don't think you want to disable the entire unit control for the player. I think what you will want to do is convert the unit to neutral passive, retain its color, and order it to its location, then change it back in like 1.50 seconds.

Still, I've always had problems with ordering units to do things. They're incredibly resilient and kind of stupid in their reluctance to do ANYTHING when ordered (except for ordering dummy units who, if done correctly, disobey every little rule of ordinary existence and thus can go anywhere easily).
 

0cossin77

Yes, I am awesome.
Reaction score
17
Why dont you try changing the owner of the attacking unit to neutral instead of disabling control?
 
D

danhel

Guest
Still stands... only stands...

Btw neutral passive is the correct, because all of the attacking unit's allies started attack it lol
 
D

deathtomato

Guest
Dunno if im right, but ur trigger seems unnessicarily complicated

Code:
 unit is attacked

Attacked unit has shield .... blah blah

change owner of attacking unit to netral passive (or hostile depending)
order attacking unit to move to position of attacking unit + (degrees) (angle)
wait ## seconds
Change owner of attacknig unit to ###

Ull need to put something in there so it remembers wat player it was owned by... i dunno what, im really tired =_=
 
D

danhel

Guest
:nuts: why is it complicated??

Cant you all fucking get off the neutral hostile? I dont want everything to attack it.

And i said, it still doesnt work, dont repeat the doods please.
 

Rabarber

You can change this now in User CP.
Reaction score
94
Danhel? Get some common sense. And grow up.

Why isn't the "Shield_of_Necromancy_PG" set anywhere?
 

AgentPaper

From the depths, I come.
Reaction score
107
Rabarber said:
Danhel? Get some common sense. And grow up.

Why isn't the "Shield_of_Necromancy_PG" set anywhere?
It is, the action adds the player right after it sets the other variables. And in setting the "new" variable, you should use the position of the attacking unit instead of the position of the attacked unit. This is especially important for if a ranged unit attacks. Also, make the trigger turn itself back on right before the wait, so it can happen more than 1 at a time. Also if you set the unit to neutral passive it won't get attacked.
 
D

danhel

Guest
You didn't read the tread just like others... I wrote the neutral passive already.

As for the position of the turn on function... Read it again! If i turn it on before the custom scripts, and it happens again... Memory leaks :rolleyes:

It still fraeking doesnt move.
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
danhel said:
As for the position of the turn on function... Read it again! If i turn it on before the custom scripts, and it happens again... Memory leaks :rolleyes:

This is not true... it's only true if you have any waits in-between turning on the trigger again, and removing the leak. Even if it happens at the same exact time, your computer still has to go through it using the trigger queue.
 

AgentPaper

From the depths, I come.
Reaction score
107
Try de-bugging it. Which means, add a lot of actions that show text, showing what's going on. For example, after you set a variable, have an action show that variable as a chat message. then you can look at the chat log and look for anything wrong. Other than that, I really have no clue. You're unit has the right item, right?
 
D

danhel

Guest
Everything is fine, it displayed everything.

Ofcourse it has the right item, it makes it neutral hostile. But doesnt move.
 
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

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top