Dummy Missiles

keychup

Active Member
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
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.
 

BlackRose

Forum User
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
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
@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
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
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
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
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
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.
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.
 

Imp Midna

Active Member
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.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • jonas jonas:
    cool! do you have a video?
  • tom_mai78101 tom_mai78101:
    I have a GIF though
  • tom_mai78101 tom_mai78101:
    In the GIF, I've configured it so the lower the "Main Value" is, the better. I had to compress it pretty far down though.
  • tom_mai78101 tom_mai78101:
    And this is the thread with the video that shows the wall clip. https://tasvideos.org/Forum/Topics/23453
    +2
  • tom_mai78101 tom_mai78101:
    Hmm, about the Headline News, I noticed threads are being moved into the subforum (Health News, Environmental News, etc.). When that happens, the TH Forum Home page loses the articles, and instead would show old articles posted 1 or 2 weeks ago.
  • tom_mai78101 tom_mai78101:
    What do we do with the Home page?
  • Ghan Ghan:
    I added those forums to the filter for that widget.
  • tom_mai78101 tom_mai78101:
    Oh nice. They're back. Thanks.
  • tom_mai78101 tom_mai78101:
    Now I think it makes more sense for me to put news in their own subforums, without worry.
  • The Helper The Helper:
    Awesome Ghan thanks! I was purposely not moving the first 15 news articles in Headline news to the different subforums but I guess I don't have to do that now?
  • tom_mai78101 tom_mai78101:
    Question: Is there a way to remove thread redirects? It creates a copy of the moved thread and takes up space, and I am leaning towards wanting to remove them in the Headline News. But if they have an expiration date, I guess I'm fine with it.
  • The Helper The Helper:
    If you move a thread please leave a permanent redirect. You can delete any redirects after 6 months. The redirects are left to help Search Engines find the moved content.
  • tom_mai78101 tom_mai78101:
    What if you move the permanent redirect, not the thread?
  • The Helper The Helper:
    I think that works but I have not messed with it. You can delete redirects though if you have to that will not delete the original thread
  • The Helper The Helper:
    if a redirect ends up in the same forum as the post it goes to though I think the redirect drops or fails or something but they are not bugged out and when you are working on an indirect the original post is safe.
  • The Helper The Helper:
    Happy Early Friday :)
    +1
  • V-SNES V-SNES:
    Happy Friday :)
  • tom_mai78101 tom_mai78101:
    Fun Friday for me
  • tom_mai78101 tom_mai78101:
    Happy Fun Friday to all.
    +2
  • The Helper The Helper:
    Happy Sunday everyone!!!
  • V-SNES V-SNES:
    Happy Sunday!!!
    +1
  • jonas jonas:
    Happy monday :p
  • jonas jonas:
    Everyone hates mondays?
    +1
  • The Helper The Helper:
    Happy Tuesday!

    Staff online

    Members online

    Affiliates

    Hive Workshop NUON Dome World Editor Tutorials

    Network Sponsors

    Apex Steel Pipe - Buys and sells Steel Pipe.
    Top