Dummy Missiles

keychup

Active Member
Reaction score
34
I am using dummy units as missiles so that in case another unit fires a missile it will be possible to deflect it.

Now I have an ability which fires 16 missiles at once.

On my current method I add all missiles to a unit group the moment they are created then i move them along their corresponding paths.

All was smooth until I had to implement deflection in the trigger. The deflection actions take place within the trigger that moves the missile.

For this action, I pick all units in the missile group to find each missile and make them move, but in order to find their distance from other missiles i have to find each missile again within the initial "Pick every unit in Missile group".

So you understand that this is making my game jerky whenever two enemy missiles collide.

Suggestions?

EDIT: Who knows how I can hide the missile dummy's HP bar without adding locust? If I find out how I can do this i can check for a deflection condition with only nearby missiles instead of the entire group of missiles.

EDIT: Solved. Set unit's Circle Height to 2048.00 and circle size to 0.00

EDIT: A new problem rose. The dummy units' HP bars appear on the sides of my camera bounds sometimes.

EDIT: I may have solved it. Selection Scale was set to -10. No HP bars so far, and still possible to use the pick every units within range with missiles.
 

keychup

Active Member
Reaction score
34
That actually made things worse. Perhaps it would be better if these missiles can be picked and damaged like a regular unit but i need to know how to completely hide the hp bar without adding locust.
 

keychup

Active Member
Reaction score
34
if i add locust then i cant use "pick units within range" to find other missiles.
 

BlackRose

Forum User
Reaction score
239
If you add Locust to a unit, you will have to resort to picking every unit owned by the player and then checking if they're in range. I would go with adding Locust and just enumerating this way.
 

Imp Midna

Active Member
Reaction score
52
Afaik you can add locust to a unit, hide it, remove locust and unhide it again, so that locust will be gone while no player info / HP bar is shown. Read it somewhere, never tested it though since my projectile systems always failed over bridges :/
 

keychup

Active Member
Reaction score
34
@BlackRose: we've already established that going through every unit wont work because that would increase the number of actions to be done exponentially. You can expect about 36 to 300 missiles to be on the screen at the same time. if i pick 300 missiles then go through each of those 300 missiles to check if they are enemy missiles, then i'd be causing the game to run 9000 times every 0.03 seconds.

@Imp Midna: I should try that.
 

keychup

Active Member
Reaction score
34
If you add Locust to a unit, you will have to resort to picking every unit owned by the player and then checking if they're in range. I would go with adding Locust and just enumerating this way.
Just tried it. Doesn't work.
 

keychup

Active Member
Reaction score
34
I may have solved it. Selection Scale was set to -10. No HP bars so far, and still possible to use the pick every units within range with missiles.
 

BlackRose

Forum User
Reaction score
239
It does work. This works:

Unit Group - Pick every unit in (Units of type Footman) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between (Position of Blood Mage 0013 <gen>) and (Position of (Picked unit))) Less than or equal to 600.00
Then - Actions
Game - Display to (All players) the text: footman
Else - Actions

But whatever works for you.
 

keychup

Active Member
Reaction score
34
that does not solve the problem of lags: i still have to go through 300 units 300 times. and you are using a preset variable. there shouldn't be any preset units in the finished map. To pick every unit of one type won't solve the problem either. The challenge is to check all sorts of missiles within range. Your suggestion only worsens the problem. But so far I've been getting good results from setting circle size to -10.00 so thanks anyway.
 

BlackRose

Forum User
Reaction score
239
That was merely an example to prove that enumerating in that fashion works. I assumed you had the same unit type for your missile, and that you simply attached the model as a special effect onto it. It simplifies things - having only one unit for all projectiles. This may be of some use to you. Although it might not since you're now content with your method. If so, you can probably disregard everything I've said so far.
 

Marvic June B. Corpuz

You can change this now in User CP.
Reaction score
1
I'm not an expert on the editor, you should use the JASS script for this and it is a little complicated. But the pro's can help you with this.
 

keychup

Active Member
Reaction score
34
>_>
Now that just made me feel insulted. There's nothing complicated about the object editor.
 

Imp Midna

Active Member
Reaction score
52
I could give the general tip to not use the square root when you compare distances, but speaking about 90.000 runs that wont really help you though i guess. Also, the trigger would be stopped quite quick, i'd bet after number 10.000 so it will not even work.
Btw, why dont you just pick every missile around your missile in the given distance and deflect em? I belive the native pick every unit is faster then manually comparing em.
 

keychup

Active Member
Reaction score
34
There
It's full of limitations. You of all people should know that.
The object editor IS the limitation. That's why there is nothing complicated about it. The object editor determines your Triggers. Without it there'd be nothing there.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
My multiboards and terrain have no relation to the Object Editor.
 
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