Page 1 of 2

Walking on ground=damage

Posted: Thu Aug 17, 2006 2:57 pm
by Meeem
I was wondering if it was possible to have units walk across an area of the map and have all the unit's health drop as they stay within this area. As soon as they leave the area, their health stops dropping. I really want to do this on a multiplayer map - is that possible? I've seen Lichen where that fountain heals any units that get close to it..

If not, how would it work on a single player map?

thanks

Posted: Thu Aug 17, 2006 4:19 pm
by AblitERateOR
Im no map maker but I've seen it done before.. the labyrinth map in AvX2 (its from some other map pack originally but im not sure which) has green water that hurts you to walk in

Posted: Thu Aug 17, 2006 4:22 pm
by point and laugh
You'd probably need to script it.

Posted: Thu Aug 17, 2006 5:07 pm
by Lugas
Aye. You could make a test whether the units are on the terrain (that supposed to damage them), and make them steadily lose health. I'm sure it's possible, try checking this Loathing Guide here.

Come to think of it, if that technique is possible, you could make non-undead units that lose health when in deep water and eventually they die if in too long, which makes it look like they drowned.

Posted: Thu Aug 17, 2006 5:10 pm
by GizmoHB
Guess you could make an invisible unit (some sort of invincible really fast ambient life) that can only walk on a certain terrain type, then have it always attack nearby units so when the unit enters he'll get attacked by something invisible, and will get damaged...

...hope that helps...

...Giz

Posted: Thu Aug 17, 2006 8:46 pm
by Pyro
Yes like everyone already has said. Scripting is one way and so is the method Giz sugguested. As for the scripting method could go something like this...

All Possible Units
GEOM. Any units in the area?
CTRL. Units lose health

The first would be a list of all the units that could walk in that area that should get hurt. The second would be a GEOM (Geometry Filter) that never expires and will test for "All Possible Units" in a polygon that is the area where they get hurt walking on. The Geom's Results would be sent to the 3rd and the Geom would Activates on Success to "CTRL. Units lose health". The CTRL (Unit Control) will hurt a certain health whatever you want. Test with something small like 0.1 and thats it. If you need a clearer description let me know.

Posted: Mon Aug 21, 2006 3:14 pm
by vinylrake
GizmoHB wrote:Guess you could make an invisible unit (some sort of invincible really fast ambient life) that can only walk on a certain terrain type, then have it always attack nearby units so when the unit enters he'll get attacked by something invisible, and will get damaged...
Interesting solution. If you did this you'd want to be sure the invisible unit's attack type is not something that would draw blood - unless of course you wanted the player to visibly bleed while it was in the deadly terrain.

Posted: Mon Aug 21, 2006 8:54 pm
by Baak
[quote=vinylrake]Interesting solution. If you did this you'd want to be sure the invisible unit's attack type is not something that would draw blood - unless of course you wanted the player to visibly bleed while it was in the deadly terrain.[/quote]

Aye - also the unit being attacked would "flinch", which might not be desirable.


lol Gizmo - 5 stars for the Avatar! :shock: :D

Posted: Tue Aug 22, 2006 12:51 am
by Zeph
you can also go in the media tags and modify the projectile groups by adding a projectile that detonates imediately. Problem is the damage would only occur when the unit walks in the water and not when its not moving.

Posted: Tue Aug 22, 2006 8:49 am
by vinylrake
Baak wrote:Aye - also the unit being attacked would "flinch", which might not be desirable.
Could you turn off the 'flinches' tag for that kind of attack - or is that unit based? I want to say the tag is attack based and is called 'causes unit to flinch' but I am probably just making that up.

Posted: Tue Aug 22, 2006 9:48 am
by Zeph
you can make a projectile inflict damages that "doesn't cause unit to flinch"

Posted: Tue Aug 22, 2006 3:07 pm
by Baak
vinylrake wrote:Could you turn off the 'flinches' tag for that kind of attack - or is that unit based? I want to say the tag is attack based and is called 'causes unit to flinch' but I am probably just making that up.
As Zeph said, you are indeed correct. :)

[NOTE: It took me this long to reply because apparently I've been in a hypnotic state all night after glancing at Gizmo's avatar again. I woke up just now to the relentless droning beeeeeeeeeeeeeeeeep sound of my keyboard with a waffle-like pattern of key impressions etched on my face...]


Other potential drawbacks with the "invisible ambient life attacking" I can think of just now:

* If the terrain is liquid, will it show water ripples when the invisible unit walks through? Maybe not - but I'd test this to be sure.

* If something bumps into the invisible unit, will you be "blocked"? This might look weird and could affect gameplay in really close situations (i.e. tagging a ball, or a tossed Dorf grenade bounces off the invisible ambient unit back into your own guys, etc.).

* What happens if 30 Thrall go into the terrain? How much ambient life are you going to have attacking? Enough to cover ALL units in the area? What if two+ armies collide in the area? If you do have 30 ambient units poised to attack, if one lone unit goes into the terrain how do you limit the number of ambient units attacking this one unit?


I think the GEOM filter would likely be the best solution. Perhaps having a built-in delay so it only checks every second or two or three? (So it's not running at 100% and sucking up everyone's CPU). I would look at the map mentioned above with the green liquid (acid?), see if you like the way it behaves, and model your method after that. It's amazing how many things have already been done - or at least the base has already been done to get you started. And if it were me, I'd be sure to give credit to anyone (and/or any map) that inspired your final product. :)

Posted: Mon Aug 28, 2006 6:22 pm
by Unkfolt
I created a really cool wizard projectile a while ago that was launched out like a bullet, then upon impact it exploded and left a warlock fireball that just sat there burning for several seconds before it itself exploded. While the fireball sat there, it burned units that walked close to it. Since then I deleted it, but I think what I did was make the fireball's contrail detonate continuously with fire damage. I did the same effect, but made the projectile's life span very long, to make it so units would suffer damage while walking through lava on one map I did. But instead of using a warlock fireball as the local projectile, I used things more ambient, like smoke.

☼☼ Unkfolt

Posted: Sun Dec 07, 2008 4:52 pm
by Topsy Kretz
I Know this is an old post, but some of these ideas just made me chuckle, so I had to post how I'd do it.

Unkfolt was closest to the the actual/best, IMHO, solution. ;op

First, and easiest solution coming to mind for me would be to create a continually detonating PROJ that does low damage and has an area of effect set to your desired radius. Set appropriate flags. IE doesn't make monsters flinch, etc etc.

Make it invincible, immovable, scaled to 0 in the OBJE tag.

This is all rough memories of course, been awhile and all, but you may need an initial PROJ that promotes to the damaging one after xxx amount of lifespan to get the damaging PROJ to start damaging??

Place the PROJ in the appropriate location(s) on your map. You may want to leave the OBJE scale set to 1.0 until after placing and testing your new PROJ(s).

I`m pretty sure this has been done in some past maps, though which eludes me.

Anyways . . .

GL HF!!

Posted: Mon Dec 08, 2008 1:04 am
by Graydon
Why reply to a two and a half year old post?

You did something similar on a thread earlier... If there's no action on a thread for a while, the person usually solved their problem.