• 0

    posted a message on "Critical Strike using Triggers" Help

    @admielke: Go

    You should have Random Roll be an integer variable instead of a Real because it could get set to 1.1, or 2.5, 3.9 etc. Right now it is a lot less than 20% chance to crit. And what error message are you getting? And as for what you set Damage Done to, are you sure its being set to the right number? I can't be sure if there is (nor can I check atm), but there might be a damage taken on triggering unit. I can confirm it when I get back home.

    Posted in: Triggers
  • 0

    posted a message on getting only params as output + unit attack trigger failur

    @bookerTier: Go

    I am not sure what you mean by your first question, but as for the second question. One thing you can do is have unitgroup A attack move to position of any unit in unitgroup B. The only problem is, if one unit in unitgroup B is on the top of the map, and the rest of unitgroup B is at the bottom, unitgroup A could end up attacking the single unit at the top of the map. If unitgroup B should never be split up like that, this method should work fine.

    Another possible option is to have a while loop that runs while unitgroup B and unitgroup A is not empty and have unitgroup A attack any unit in unitgroup B until unitgroup B is empty (ie. unitgroup B all died out). You need to check if unitgroup A is empty because if unitgroup A ends up dying instead of unitgroup B, you will end up getting error messages otherwise. You would also need certain wait conditions though. I believe there are some wait until conditions, but I don't have access to the editor and can't say for sure. Without the wait conditions, your loop would be constantly running the attack order.

    Posted in: Triggers
  • 0

    posted a message on Replacing unit kills new unit

    Well that did work, but still, it is weird that beacons some beacons would die and others didn't. I guess I'll just use that method for now, thanks.

    As a side note, to those who are curious, just had to have a point variable added in to get the point of the unit before removing and then creating the unit at that point.

    Posted in: Triggers
  • 0

    posted a message on Replacing unit kills new unit

    So in my map, I have a bunch of Zerg beacons (small), and I try to replace them with Terran beacons (small). So the problem is, for some reason, when the Zerg beacon gets replaced with the Terran beacon, the Terran beacon somehow dies, leaving a blank spot.

    I changed the Zerg beacons into Probes and Terran beacons into SCVs to check (I wasn't sure if the actual beacon was dying. Never saw a beacon die before). So in this case, some of the SCVs died in this case.

    Anybody know what might cause this? Here is the part of the code that does the replacing.

    bool replaceblank(int x, int y){            
        unit replaced;                                
        replaced = gv_grid[x][y];               
        if(gv_mines[x][y] == 0)               
        {
            gv_mines[x][y] = 9;                 
            libNtve_gf_ReplaceUnit(replaced, "SCV", 1); 
            return true;
        }
        else
        {
                TextTagCreate(IntToText(gv_mines[x][y]), 24, UnitGetPosition(replaced), 1.0, true, false, PlayerGroupAll());
                libNtve_gf_ReplaceUnit(replaced, "SCV", 1); 
                return false;
        }
    }
    
    Posted in: Triggers
  • To post a comment, please or register a new account.