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.
 
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.
 
if i add locust then i cant use "pick units within range" to find other missiles.
 
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.
 
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 :/
 
@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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
>_>
Now that just made me feel insulted. There's nothing complicated about the object editor.
 
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.
 
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.
 
My multiboards and terrain have no relation to the Object Editor.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top