• 0

    posted a message on Adding unit to unit group causes units to be selected fix

    The deselecting is actually probably my fault, had a trigger set to only allow the most recently selected unit to remain selected. But I checked for selecting and that is not. Is automatically selecting the unit normal when adding it to a unit group? (without manually doing it)

     

    -Edit:

    It seems that me selecting a unit inside of a unit selected trigger was causing some unexpected behavior removing that completely solve the issue. Thanks, DrSuperEvil.

    Posted in: Triggers
  • 0

    posted a message on Adding unit to unit group causes units to be selected fix

    When adding a unit to a unit group, the units become selected for some reason and the currently selected units become deselected.

    (UnitControlGroupAddUnit/UnitControlGroupAddUnits)

     

    I found a workaround by waiting 0.125 - 0.25 game seconds (sometimes this isnt even enough) and clearing unit selection and reselecting, but this is not something ideal for my map.

    Another thing I tried is using a key down press event for '2' key. This works but is very slow as well to select the unit group.

     

    Is there a way around this?

    Posted in: Triggers
  • 0

    posted a message on Adept - Ability to make Psionic Transfer end early

    With some minor adjustments, that ended up working great.

     

    Thanks!

    Posted in: Data
  • 0

    posted a message on Adept - Ability to make Psionic Transfer end early

    Adept's Psionic Transfer ability teleports the adept to the shadow after a certain time period. How would one make an ability that can make the adept teleport to the shadow before the time period expires?

     

    I saw there are two behaviors on the adept, one for the shadow. There are expire effects on these behaviors and that is what makes the adept teleport after the time period expires.

     

    One of these is applied to the clone I believe, so how would one reference the clone? Would I need to use a search area effect?

     

    Thanks.

    Posted in: Data
  • 0

    posted a message on Redirect missile when missile reaches flying blockers or certain doodads

    All good. Just my curiosity. 

     

    Thanks.

    Posted in: Data
  • 0

    posted a message on Validator to determine that unit is on the ground (not a ground unit, but on the ground)

    For one of my effects, I need to determine if the target unit is at the same height level as the ground/caster unit. I was looking through the validators and saw Unit Compare Height and Z. Does anybody know how this works? Or is there an alternative? I am completely lost looking at those fields.

     

    Thanks

    Posted in: Data
  • 0

    posted a message on Redirect missile when missile reaches flying blockers or certain doodads

    I have a range of 0 set.

    Posted in: Data
  • 0

    posted a message on Func Ref/Pointer Syntax

    Ah, that makes sense. Basically, what is in <> just takes the signature of the function you pass. I kind of figured you would have to do it manually like.

     

    bool Equal(int, int);

     

    funcref<bool, int, int> ref;

     

    Thanks for the help.

    Posted in: Galaxy Scripting
  • 0

    posted a message on Redirect missile when missile reaches flying blockers or certain doodads

    Ah, thank you so much DrSuperEvil. That explains a lot actually.

     

    I still have the problem but now the distance is exactly the inner radius too big for the placement unit. Based on some tests I have run, it appears that the placement test is not centered upon the point. The center of the region for placement test is offset from the point by radius distance. So I believe I need to be offsetting where I scan for units by unitPlacementInnerRadius- y-axis relative. I do find this odd however that it checks placement forward instead. I think this is what is happening but I need to run some more tests.

     

    Here is an illustration of what I have found so far.

     

    -Edit: Yup that is exactly what is happening and accounting for it seems to be working  (within a 0.15 range discrepancy) - I wonder what could account for this.

    https://pasteboard.co/H0RFrdv.png
    Posted in: Data
  • 0

    posted a message on Redirect missile when missile reaches flying blockers or certain doodads

    Thanks for the help so far, I appreciate your willingness to assist. I almost have it working now. Just had to do one small part in the triggers for herc.

     

    The problem I am having now is accurately determining if a unit is what causes placement to fail. I guess I do not understand how the placement test works.

     

    I would assume that if distancebetweenpoints(placementpoint, unitpos) <= placementrad + unitrad then it did cause it. But, in my tests placement can fail and the unit is quite a bit further than that from the placementpoint. How exactly does placement work? Or, is there a way around this?

    Posted in: Data
  • 0

    posted a message on Func Ref/Pointer Syntax

    I know that you can do arrayref and structref in galaxy, I assume you can do function references/pointers too. Does anyone know the syntax?

    Posted in: Galaxy Scripting
  • 0

    posted a message on Redirect missile when missile reaches flying blockers or certain doodads

    It appears that the placement location validator is not using the placement footprint of the missile ammo unit. It is using the radius for some reason. Is this normal?

     

    I was able to get most of the slow-medium speed missiles working.  The enumerate area and function validators worked great.

     

    I am having difficulty with HERC though. It just has insane speed. One would probably need to search for obstacles at cast time and redirect then if necessary... is this possible to do? (Ideally one would need to use a loop and incrementally increase the range to test for placement up until the distance from the caster to target)

     

    Thanks.

     

    Posted in: Data
  • 0

    posted a message on Redirect missile when missile reaches flying blockers or certain doodads

    Gotcha. 

     

    Shouldn't it also work to change the placement check layer of the placement location footprint to avoid something that I can set by doodads and not by units? (Ex: no burrow or near resources) The problem I have run into though is that units seem to not allow placement even with those custom footprints. Is there a way to change this? (there are no footprints set for the units; I am guessing that the ground pathing defaults all these to be applied to the cell the unit occupies?)

    Posted in: Data
  • 0

    posted a message on Redirect missile when missile reaches flying blockers or certain doodads

    Unfortunately, I wasn't able to get the calibration working quite right by moving the validator to another effect. However, I was able to get it mostly right by creating another persistent effect to check the front of my unit for placement ahead.

     

    My question now is: Is there a way to determine what is causing the placement test to fail?  Perhaps an enumerate area validator from source unit to target point would work? I know this only detects units, but if the placement test failed and the enumerate area validator failed then it must be a doodad? Or maybe it would be easier to use different pathing flags for each kind of unit? Maybe I am overcomplicating this...

     

     

    Posted in: Data
  • 0

    posted a message on Redirect missile when missile reaches flying blockers or certain doodads

    Alright, I was able to get the periodic offset working for the redirect missile effect, I had forgotten to change the location from caster unit to target point.

     

    I am not sure I comprehend what you said about putting the validator in the effect after the create persistent. The validator should be in a periodic effect right? This changes when the periodic effect checks for placement, however, this should not change where it checks for placement location. I'm thinking that maybe I could create another persistent effect for checking placement in front of the unit? Perhaps I simply don't understand. Could you clarify what you mean?

     

    Thanks.

     

    Posted in: Data
  • To post a comment, please or register a new account.