| 09-23-2003, 07:40 AM | #1 |
This trigger is more comical than anything, but what it does basically is allow a unit to strike another unit at close range, and then propel that unit backwards at an alarming rate, toppling trees and bouncing other units out of it's path. I got the idea a long time ago by watching Insaneitous's (sp) cinematic map. Theres a scene where one of his blademasters is hit and he goes flying back and topples trees. Anyway, give it a shot if you are interested, and like all of our other spells, show FM a little love if you decide to use it. Here are some notes about the map in general. 1. Regrowing the trees once they are toppled (on a timer) is a bad idea, what hapens if a unit is stunned or something in the process? 2. This is sort of a test / development map and it doesnt account for dead or dying units being shoved around. 3. Units smacked by the initial unit will also bounce and the units they hit will also bounce, one thing i left out was to lower their bouncing velocity to the velocity of the unit that actually hit them (i just divide the velocities by 2 to simulate the intertial barrier). 4. Units hit by the initially smacked unit do not topple trees, if they did, you would run out of trees real fast. You can enable this if you really need it though, it helps in some situations where the smacked unit is pinned up against a slower unit. 5. When leveling this skill for a hero, i would suggest altering the initial smack velocity to have a greater effect. (Its about a level 3 hero skill now at its current velocity). 6. Smacked units wont go over cliffs, they have a system to avoid that, however it may be possible to get them stuck into nooks and crannies, evaluate this on your map and see if it will be a problem. (it uses the terrain height to avoid going over cliffs). 7. Smacked units target allied and enemy units for the bounce effect, this is vital because if allied units werent targeted in a mixed battle, the bouncing units would just jerk around trying to move. 8. It may be possible to stop the jerking on cliffs by taking some advanced evaluations based upon the collision size of the unit and the average cliff pathing barrier. Just look at the "IsSameCliffLevel()" function and maybe include an argument thats like 128 units away for an auto stop, that would reduce the jerkiness on cliffs. 9. You CAN turn collision off for the smaked unit, and that will allow it to pass through allies without bouncing them (it will still knock over trees too), but its almost assured that it will land them in a terrain nook. It WONT however send anyone over a cliff, so its something to think about. Sorry this is so conditional, but its the idea that really counts here, and if i had time i would make it more user-friendly. Sincerely, Eye |
| 10-11-2003, 04:15 PM | #2 |
That's hilarious, Tertiary! Also, it *could* be a useful hero ability to avoid getting mobbed, sort of a "Back off!" ability that a large, strong but slow hitting unit could conceivably pull off. Unfortunately, the Smack! effect is a little TOO comical. I'd like to do a little test on this using Slam -- all targets in a short radius get pushed back and stunned, instead of one target acting like a cue ball for everybody around it. The way you have it now would be ideal for dungeon based maps where monsters would have to come at you in a line, but in more open fields, the monsters will simply surround your hero, so smacking one back won't really be a life saver. Lemme see what I can come up with, and I'll post it here. Thanks for the nifty idea (and the good chuckles from pinballing around water elementals) ://// |
| 10-11-2003, 09:56 PM | #3 |
I'm glad you liked it, Don't discount, however, the effectiveness of this in large maps. FMVH isnt a dungeon map by any means, but this is still very effective, especially during vampire summoning attacks. I can smack one incoming zombie and disorient an untold amount of creatures following behind it. Its not useful in maps that have sparse amounts of units, but it is still useable for wide-open maps. In fact, just the value of keeping that one unit farrrrrrr awwwwaayyy in a tough fight with multiple heroes makes it worthwile. (for instace if that unit is one deadly fighter). Another modification of this is where the smacked unit, is actually your hero, and instead of causing damage, you "charge" or "stampede" across the field knocking units aside. -Eye |
| 10-11-2003, 10:54 PM | #4 |
I've run into a snag with the smack function (and my lack of knowledge about that level of coding prevents me from fixing it) -- the ability seems tied to that specific knight. I made the order trigger for Smack Effect unspecific, but if that particular knight doesn't do the smack, nothing happens. What I've attempted to do is cheat a little bit with creating Smackers, which should, theoretically, pick each target in range of KnockBack (a 200 range Slam) and send 'em backwards. However, since BWSmack watches gg_unit_hkni_0000, the Smackers can't actually do that. Could that be fixed? (I had, inadvertantly discovered the "Send hero charging forward" by picking every unit in range, including the knight -- woops!) |
| 10-11-2003, 11:07 PM | #5 |
Basically, What you need to change is the unit event registration at the bottom. look for something like UnitRegisterEventSimple or something and look for EVENT_SPELL_CAST or whatever. |
| 10-11-2003, 11:39 PM | #6 |
Bah, ok ok Let me give you a real answer. Alright, so you basically want a repel trigger, heres the steps i would take to making this a repel trigger. Ok, what i would do here is add all of the targets as intercepts using the add intercept function. 1) Have your trigger that finds all the units in the group set these variables... set udg_hero_BW_SmackRate = 84 (twice the normal smack rate) Make a copy of the add intercept function and change it so that it takes a unit argument. "function SetInitialTargs takes unit target returns nothing" and change "GetTriggerUnit()" to targets, also where it sets the target angle, "udg_hero_BW_Smack_INT_Angles[index]". Assign this to Angle between points( your stomper, and that unit) Lets see, whenever it hits it divides the velocity by 2 so if you double it from the beginning it will get them moving as fast as you want. And yeah, that looks like it will work as a cludge. Setup the other necessary elements of the initial trigger as you please. Also if you need explinations of the variables and stuff, just list the ones you dont get and ill splain'. Eye |
| 10-12-2003, 12:10 AM | #7 |
With collision off, just order the unit to go over the cliff a couple times, and he will go over it. |
| 10-12-2003, 01:42 PM | #8 |
Gah, sorry, Eye - your advice is way over my head. This is the first time I've looked at triggers in code form; I'm not sure what I'm doing even as far as passing a variable from one function to another. Rather than sound like your usual "i need help u do it for me" whiner, I'd actually kinda like to learn this -- could you recommend a tutorial, or is this so based on C++ that I'd just have to start there and adapt? |
