| 11-26-2003, 03:16 PM | #1 |
Oh, yeah Grater started a thread about this including a great function and his chaos + aloc method, however I didn't liked it because it requires you to create a chaos based ability for ever summonable unit and you couldn't see a summoned unit's hit points. But here I come with an alternative method that fixes those issues Version History Version 1.0 (First release) ------------------------------ Version 1.2 : - Fixed a dangerous bug with the smart order trigger - Updated UnitGuardAI to make trigger ai possible - Merged everything to One Trigger! - Calling UnitGuardUnitAI no longer stops the trigger until the summon dies - Compatibility with games where players may have multiple heroes ------------------------------ Version 1.3 : - Now units with even point value numbers are considered tanks and units with odd point values are considered support. - UnitGuardUnitAI is available as a "callable" function again (requested by people that used triggers to create units.) ------------------------------ Version 1.4 : - No longer uses custom values, so feel free to use custom values on your triggers. - The Smart order blocking system works better. - The summoned units will avoid to lose a target ------------------------------ Version 1.5 small update/bugfix |
| 11-26-2003, 04:46 PM | #2 |
Lord Vexorian you god. This will be so useful in Hordes of Darkness! I've been trying to get a working system based on Grater's for several of my summoners, but you did it for me. |
| 11-27-2003, 01:49 PM | #3 |
yep, it is really annoying to use aloc and chaos ability when you have 50+ summons |
| 11-27-2003, 05:53 PM | #4 |
Correct me if I'm wrong but half the cool of gaters function was the Aloc thing. Anyway couldn't you just create one dummy summoned unit. Then depending on conditions and which abilities you used you add a Chaos ability? |
| 11-28-2003, 01:47 PM | #5 |
Yep, but he added aloc just to avoid the summoned units to get orders. |
| 11-28-2003, 02:18 PM | #6 |
He added it so they were unselectable... |
| 11-28-2003, 02:18 PM | #7 |
Nice Work man ! Very Useful for my Diablo2 Map :) |
| 11-28-2003, 02:43 PM | #8 |
I know, but he made them unselectable to make the units ignore orders that was the objective, but why to mess with aloc when you can use this method? |
| 11-28-2003, 03:50 PM | #9 |
In diablo 2 they were NOT selectable. That was the point. Nice job on your alternative method though, but it's kind of weird having a selectable unit that ignores commands but still can attack and whatnot. Actually, one thing I noticed - units still make acknowledgement when given "commands" (commands that do nothing). Why not just get rid of the sound set so it doesn't make unit acknowledgement sounds when you right click? |
| 11-28-2003, 04:44 PM | #10 |
No offence, but if you don't want order aknoledgements, it is really your fault if your summons have a soundset. I love Lord Vexorian's method . It lets the player see HP and Mana while not being able to give orders. Plus the AI script work fine, just like in Graters. |
| 12-18-2003, 11:10 PM | #11 |
nice work but theres a few problems that i found 1) If you keep ordering the unit to move the just sit there and dont fight 2) They randomly acquire new targets in the middle of a battle so they attack sumthing then 1 second later they attack sumthing different |
| 12-19-2003, 01:58 PM | #12 | |
Quote:
1) It is because of the ignore order trigger, of course if you aren't supposed to order why are you ordering so much? 2) It is caused by Grater's function, I am working on something to make them be more intelligent |
| 12-19-2003, 09:58 PM | #13 |
Clever, altough I definitely dont like the fact that units look like they have been ordered, but dont do anything. For expendable units like skeletons not being able to see the health hardly matters, and for beefier units like golems they can be made as a hero to have a hero icon (should be even easier with 1.13). I think you would have to agree if not for the extreme hackiness of my method it does create better summons (one could say more professional) By the way I seem to recall uploading a better version of my function to the JASS function repository that caused the summons to try to escort rather than follow. It's simple enough stuff, simply projecting where the master is moving to and using that projected point rather than the exact location of the master. Also I figured out how to fix the changing targets thing, it involves keeping a "target" local variable in the function, when the target variable is null the summon just wanders, but tries to find a new target. Once it has aquired a target, it attacks that target until it dies or gets out of range, at which point the target variable is set back to NULL. However, the summon may still change targets when the current target is hit by a lightning orb, however it will change back at the next think "tick", this will look a bit silly (with a random shot fired at a random target), but theres no way around it and it affects all other attacking units too. |
| 12-20-2003, 10:42 PM | #14 |
Your method works so well when you have 4 summonables in your map, but I had to invent this because I didn't feel like making chaos abilities for everyone, and the hit points thing uhh, that's the reason this is called "alternative" diablo II style summons, also your summons can be targetted but have no target circle and that makes them to hard to target (unless you are a computer player) Edit : this method uses your function from the JASS vault so it makes me ask if you really looked at my map. The fix I am working on will use the first of group thing and some extra calculations. |
| 12-21-2003, 12:19 AM | #15 |
Actually the chaos style does have targetting circles, when you right click on them the green/red circle appears under their feet, they arent really harder to target, just look like they should be ;) Yes I did look at your map, however I didn't look at the repository to see if I had actually uploaded the updated function, turns out I hadn't, my bad. I cant even remember if I wrote it, these things happen after a WC3 hiatus ://// Turns out I did write it. Obviously designed for tanks rather than ranged, for ranged units the existing function works superbly. Code:
function TankGuardUnitAI takes unit summon, unit master, real projectrange, real thinktime, real thinktimedice returns nothing
local location target
local real angle
local real dist
loop
exitwhen IsUnitDeadBJ(summon)
if (DistanceBetweenPoints(GetUnitLoc(summon), GetUnitLoc(master)) > 1000.00 ) then
set target = GetUnitLoc(master)
call IssuePointOrderLocBJ(summon, "move", target)
call RemoveLocation(target)
else
set target = GetUnitLoc(master)
set angle = GetUnitFacing(master)+GetRandomReal(-15.0,15.0)
set dist = GetRandomReal(projectrange-100, projectrange)
call MoveLocation(target, GetLocationX(target) + dist * Cos(angle * bj_DEGTORAD), GetLocationY(target) + dist * Sin(angle * bj_DEGTORAD))
call IssuePointOrderLocBJ(summon, "attack", target)
call RemoveLocation(target)
endif
call PolledWait( thinktime+GetRandomReal(0.0,thinktimedice))
endloop
endfunctionThis one works on the masters facing direction, rather than movement direction. It does tend to make the summon stand in the way of the hero a bit, but you could make it stand to the side by changing the (-15.0,15.0) part to something like (15.0,30.0), and either add or subtract that amount depending on a random number (either 1 or -1) generated at the start of the function. Then each new summon would either stand to the left or right, not right in front ;) |
