Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Spell Damage Trigger
Spell Damage Trigger
Jan 8 2008, 5:39 am
By: Joshgt2  

Jan 8 2008, 5:39 am Joshgt2 Post #1



Currently I am making a CTF map with selectable classes in it and what not but I came across a problem of some sort. I want to have the ability to have certain spells dealing a certain amount of damage if the foe were to be in the certain location, and if they were around the spells targeted location then they would only be hurt a little bit. Here is an example right from one of the Inferno Blast of the Dragoon in my GT Capture The Flag map in the Map Production forum... I have everything set and working on how the spell is put in the correct place by the user and the spell doing some nice animation to explode, but it would be nothing without some big a$$ damage if the played is in the inner location which will take basically their entire life, but the outer location is different. I would only like the outer location to do about 45 damage or so but I don't know how to damage a foe unless I use the 'kill unit at location' trigger and I don't want to kill the foe but only hurt them at that point. If there is a system for this then great but right now I am stuck like a rock and I don't know what to do to make this whole thing work correctly... Please and thanks for the help/suggestions...



None.

Jan 8 2008, 7:03 am Pyro682 Post #2



U can have a gradient.... the Most IVE ever done was 6 Locations (Six different amounts of dmg)

Lets say you have a set of locations.
The first would be a 2x2, the last would be... something bigger... i dont know.
A, B, C, D, E, F = the location names, and A is the smallest, while the F is the largest.

Heres an example to Determine whether the unit is inside A, or B, With A-F all centered on the Hero (Spell caster of Inferno)
The Target is... well.. The target, owned by Player 2, while the Spell caster is Player 1.
Conditions-
Player 2 Brings at least 1 Target To Location A
Actions-
(Highest level dmg)

ANOTHER TRIGGER
Conditions-
Spell Caster Casts his spell (Whichever method, unit on beacon, Build a rine... blabla)
Player 2 Brings at most 0 Targets to location A
Player 2 Brings at least 1 Targets to location B.
Actions-
(Second Highest level dmg)

ANOTHER TRIGGER
Conditions-
Spell Caster Casts Spell
Player 2 Brings at Most 0 Targets to location B
Player 2 Brings at Least 1 Target to Location C
Actions-
(Third Highest level Dmg)

And so on and so forth.



None.

Jan 8 2008, 10:40 am NudeRaider Post #3

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

That is one solution, but the problem with it is, that if the player had really low health he would actually be healed.

The ONLY other way to damage units (heroes) is by
1.) placing a unit (damager) near it which deals a certain amount of damage, then remove the damager. OR vice versa,
2.) bring the hero to an area where a damager is, and teleport the hero back after a short wait.
2nd variant is more reliable as there are no other targets for the damager around.




Jan 8 2008, 3:34 pm Conspiracy Post #4



A friend of mine expiremented with a Irradiation Damage. Basically, what it does, is it has alot of irradiated units around a certain spot. If you move to that certain spot, you take damage. The one problem with it is, that you have to keep the units irradiated. So, when they are within a certain distance, they move to spot with say, 3 SCVs or something that are irradiated. They will take some damage, and then move back to where they were before?

PS: Ill leave the way to keep them irradiated up to you :-_-:.



None.

Jan 8 2008, 8:08 pm who Post #5



have reavers in a hidden location shooting scarabs that deal a certain amount of damage, then send the enemy to that location and move a few scarabs there?



None.

Jan 8 2008, 8:53 pm Impeached Post #6



Or create X infested terrans/scourges to deal the damage (will only be seen for about half a second). Although someone's idea is really best. Just move X scarabs over to the eenmy from a place where there are like 10 reavers always firing at a target. Move the scourges to the enemy, then run the AI script "Send on Random Suicide Missions".



None.

Jan 9 2008, 2:16 am Joshgt2 Post #7



So just so I make this clear going off Someone09's method. I would have a bunch of reavers simply shooting scarabs at any target and when I would need to trigger the damage then I could send any amount of scarabs to the location of the foe and they will simply hit the foe and do damage. I like the idea but what about targetting the scarabs to the foe? I wouldn't want the scarabs to hit the caster now would I...



None.

Jan 9 2008, 2:31 am NudeRaider Post #8

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from Joshgt
So just so I make this clear going off Someone09's method. I would have a bunch of reavers simply shooting scarabs at any target and when I would need to trigger the damage then I could send any amount of scarabs to the location of the foe and they will simply hit the foe and do damage. I like the idea but what about targetting the scarabs to the foe? I wouldn't want the scarabs to hit the caster now would I...
You will have to regulate that by alliances. I guess its a map with 2 factions.

So you can make 2 comp players each allied with one and enemy to the other. And teleport the appropriate scarabs to the target.
Ofc that does not keep the scarabs from hitting other units of the same faction that are around the target.




Jan 9 2008, 3:31 am Joshgt2 Post #9



Quote from NudeRaider
You will have to regulate that by alliances. I guess its a map with 2 factions.

So you can make 2 comp players each allied with one and enemy to the other. And teleport the appropriate scarabs to the target.
Ofc that does not keep the scarabs from hitting other units of the same faction that are around the target.
That wouldn't be a big problem really because I do have 2 factions and 2 computer players that I could add to each one. The AoE damage wouldn't be a bad thing though...



None.

Jan 9 2008, 10:41 pm Vrael Post #10



If you want to do the simple gradient thing, you could have the 6 areas of effect and do something like

Conditions:
Whatever Spell Conditions

Actions:
Give Hero owned by Caster to P12 (or something neutral)
Set all units at Location 6 (largest location) to 80%
Set all units at Location 5 (slightly smaller) to 70%
Set all units at Location 4 to 60%
Set all units at Location 3 to 50%
Set all units at Location 2 to 40%
Set all units at Location 1 to 30%
Give Hero owned by P12 to Caster

Depending on the health of your enemies, this may be effective despite the potential for actually healing them.



None.

Jan 9 2008, 11:57 pm NudeRaider Post #11

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from Vrael
If you want to do the simple gradient thing, you could have the 6 areas of effect and do something like

Conditions:
Whatever Spell Conditions

Actions:
Give Hero owned by Caster to P12 (or something neutral)
Set all units at Location 6 (largest location) to 80%
Set all units at Location 5 (slightly smaller) to 70%
Set all units at Location 4 to 60%
Set all units at Location 3 to 50%
Set all units at Location 2 to 40%
Set all units at Location 1 to 30%
Give Hero owned by P12 to Caster

Depending on the health of your enemies, this may be effective despite the potential for actually healing them.
Gj repeating the first answer... do you got any other "unique" ideas?




Jan 9 2008, 11:59 pm Falkoner Post #12



He definitely made a more condensed version, although you really don't have to give the hero to a neutral player, just have it set the health for only units of the enemy force.

Post has been edited 1 time(s), last time on Jan 11 2008, 12:57 am by Falkoner.



None.

Jan 10 2008, 11:06 pm Joshgt2 Post #13



I can't have it set the health of the enemy units... That would mean that if they are at like 10% or something and they hit the outside ring of an AoE spell, then they would be healed most likely... And we don't need that to happen



None.

Jan 11 2008, 5:36 am Pyro682 Post #14



:D I tried setting up a map that i think had the same predicament that youre having..... and i think i have the perfect solution, although it is quite complex.
Lets overview-
Your Problem- You need a way to deal damage.

Solutions-
Use the traditional... Move in like 6 units that deal an amount of damage, and then remove those damagers.
-Lets face it, although used alot, this version is tacky.
Use a sort of traditional... Move the SpellCaster's Opponent to an area where there are unit damagers...
- Also tacky, not as much as the other, but still.. hes dissapearing for a while... not cool.

A third option involves Grids and burrowed units.... If you dont understand my description, ill just either whip up another Smiley Diagram or throw a sample map at ya.
Yes, it is very effective, but hard and tedious to put into place.
Now, lets say.... your spell caster hero has 1000 HP.
Lets ALSO say that you have Lings, and they are 10 HP each.
Ok, so you have 100 Lings.
Constantly have the burrowed 100 lings be centered under the hero, whilst the hero itself being invincible.
The Lings will keep the HP...
However, you have a problem now, dont you? Whenever you have burrrowed units constantly being centered under a unit, It is really really really really really slow... how do we fix this?
We dont have it under the hero. ^^
By setting up a grid that moves the lings down... about half of a location square underneat the hero, you can have the lings act as the Hero's HP.
For the spell casting...
Lets say you want the Spell to do 50 damage?
(Do whatever effect,... Exploding Scouts... blabla bla, and then Kill 5 Lings under the Opponent Hero.)


Let me know how it works out. :D


Oh, and vrael... Copy me again, and ill punch you in the nose. lol



None.

Jan 11 2008, 9:48 am NudeRaider Post #15

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Lol... that is vHP (virtual hit point system).

There are a few variants, check the Tuts section to learn more about vHP.
I personally don't like vHP even though you have full control over hp, which is very convenient for a mapper, it is odd for the player, because he can't use the small hp bar beneath his unit or the wire frame to estimate his health. Also the player has to check the leader board or minerals to see his actual hp.
Well, your choice.

I don't think a grid would work anyway, because constantly creating and removing air units over a unit causes it to slow down, too.
Also you don't even need a grid. It's easier to do the ling centering only every 3-4 trigger loops and you get rid of the slowdown of the unit.
If you use hyper triggers the unit won't slow down anyways.

Post has been edited 1 time(s), last time on Jan 11 2008, 9:55 am by NudeRaider.




Jan 11 2008, 6:26 pm JaBoK Post #16



If you can figure out how to use EUDs to calculate the health of a certain unit you could give all teh affected units to a certain player, then have one at a time checked for their hp percentage (with vHP) and then set to a percentage X% lower then the detected %. THis would take a pretty complext trig system and I doubt it would work properly, I don't even know if vHP conditions can do that reliably, and you'd need two extra players, one for the current unit having it's hp set, and one for the units awaiting the hp reset. YOu'd also need to repeat the trigger set about a hundred times (with no changes to trigs, that'd be busy work)

There's an idea.



None.

Jan 11 2008, 7:13 pm Pyro682 Post #17



The wireframe can be used. Have a constant trigger checking how many lings...
If the hero has 500 hp total, and 400 hp left, with each ling having 10 hp, he has 40/50 lings, meaning he can change the heroe's health bar to that. U can even make the heroes invincible, and have the Lings be the enemy, and then have the heroe's health number change with it.
If you use Hyper triggers, it will slow down the unit's walking, and even attacking for some types of units. I used Hyper triggers when i was making a realistic RPG, and if the hero walked over difficult terrain, (such as rocks or a ramp, or heavy sand dunes, he would slow down.) having it be centered every 3-4 loops would only reduce it, but the slow down will be there, and that still kills some microing advantages that many people use.
However, when creating some air units that dont DIRECTLY overlay the Hero, you can create the grid without slowing him down.

Post has been edited 2 time(s), last time on Jan 11 2008, 7:23 pm by Pyro682.



None.

Jan 11 2008, 8:21 pm Joshgt2 Post #18



How would the vHP work when I have a Zealot or something that is actually attacking some other unit and dealing damage? Just like NudeRaider said, the player wouldn't be able to see their health on the unit and I don't know how I would be able to change the vHP of a unit that just got attacked by a melee unit or something without the opponent using spells to do damage.

Addition: I am really going with the whole having Reavers on the map and they are constantly shooting a object that doesn't die and I simply move the scarabs to a location where they will attack the foe who the spell is cast on but can anyone give me the basic trigger set or a link to a tutorial on where to find that? I tried messing with it but I'm not moving very far with it...



None.

Jan 11 2008, 8:45 pm Ahli Post #19

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

for the scarabspell:
you need a computer on each team fraction....
you could do it with one computer..... maybe I create a tutorial map for that. but it would delay the spell a little bit.
(my idea 4 that: changing computer's allied status for the spellcasting...)

I attached the map I made which should show the best system I could create for the scarab spells.




Jan 11 2008, 9:03 pm NudeRaider Post #20

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from JaBoK
If you can figure out how to use EUDs to calculate the health of a certain unit you could give all teh affected units to a certain player, then have one at a time checked for their hp percentage (with vHP) and then set to a percentage X% lower then the detected %. THis would take a pretty complext trig system and I doubt it would work properly, I don't even know if vHP conditions can do that reliably, and you'd need two extra players, one for the current unit having it's hp set, and one for the units awaiting the hp reset. YOu'd also need to repeat the trigger set about a hundred times (with no changes to trigs, that'd be busy work)

There's an idea.
Don't mix up UED Conditions with vHP. Nevertheless I think I know what you mean.
But when you use vHP it's not needed to use UEDs.
And using UEDs is not recommended anyway, as your map would only work for one single bw version as the memory locations change each patch. And they work differently on MACs.

Quote from Pyro682
The wireframe can be used.
Ok, didn't think about that.
But you need 1 trigger for every color set of the wire frame and need to find out on what percentage it changes.

Quote from Pyro682
However, when creating some air units that dont DIRECTLY overlay the Hero, you can create the grid without slowing him down.
What do you mean? How would you create a unit NOT centered exactly above the unit?

Quote from Joshgt
How would the vHP work when I have a Zealot or something that is actually attacking some other unit and dealing damage? Just like NudeRaider said, the player wouldn't be able to see their health on the unit and I don't know how I would be able to change the vHP of a unit that just got attacked by a melee unit or something without the opponent using spells to do damage.
Obviously you didn't read the tutorials on this site. Go "mapping -> tutorials -> Old SEN (v4.1) Tutorials"
Please read those as they explain such basic things.

And Pyro already said it: Make the hero invincible and let lings be attackable. The enemy will ignore the hero and kill the lings instead thus draining hp.

A big problem with that is splash. Obviously with splash all hp would be gone instantly. That's why you must make a trigger that sets all lings invincible, then make 1 vincible. So only 1 is attackable at a given time.
That's also not perfect when many enemies are shooting: 1 ling dies ==> 0 lings are attackable for a short time. This results in enemies defocussing the hero and missile based units dealing less total damage.

Quote from Joshgt
Addition: I am really going with the whole having Reavers on the map and they are constantly shooting a object that doesn't die and I simply move the scarabs to a location where they will attack the foe who the spell is cast on but can anyone give me the basic trigger set or a link to a tutorial on where to find that? I tried messing with it but I'm not moving very far with it...
Also check the tutorials. Look for keyword "scarab".
In the example trigger you need to add the "move unit action" before executing the ai's.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:59 am]
NudeRaider -- *is
[05:17 am]
NudeRaider -- despite all its flaws the sound design its fantastic
[10:29 pm]
Oh_Man -- homeworld 3 = massive disappointment
[10:05 am]
Moose -- ya
[2024-5-14. : 5:23 am]
zsnakezz -- yes
[2024-5-12. : 8:51 pm]
l)ark_ssj9kevin -- Are you excited for Homeworld 3?
[2024-5-12. : 8:44 pm]
l)ark_ssj9kevin -- Hi Brusilov
[2024-5-12. : 4:35 pm]
O)FaRTy1billion[MM] -- Brusilov
Brusilov shouted: Hey, what happened to EUDDB? Is there a mirror for it somewhere? Need to do a little research.
my server that was hosting it died
[2024-5-10. : 8:46 pm]
NudeRaider -- Brusilov
Brusilov shouted: Hey, what happened to EUDDB? Is there a mirror for it somewhere? Need to do a little research.
https://armoha.github.io/eud-book/
[2024-5-10. : 8:36 am]
Brusilov -- Hey, what happened to EUDDB? Is there a mirror for it somewhere? Need to do a little research.
Please log in to shout.


Members Online: Roy