Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Something I never Figured out...
Something I never Figured out...
Apr 23 2008, 6:27 pm
By: UnholyUrine  

Apr 23 2008, 6:27 pm UnholyUrine Post #1



How does "explosive" virtual HP work?.. (I'm not actually doing virtual HP.. but I need an effect like so)

What I need is this...
For example.. I want .. let's call it.. a Frost Explosion...
Each player has their own Hero.. only 1 unit....
I can have a location centered on a hero.. and when the Frost Explosion trigger is fired... There'll be a BOOM and such... And i want it so that any Foe Heroes in that Location to be affected by that explosion

What I want to know .. is a quick and easy way for me to trigger a way so Each person DETECTS that a Foe has used "Frost explosion" on him..
Meaning if player 1 frost exploded player 2.. what triggers do I use so that I can do something to player 2 only if he's in that Frost explode location during that One time... .. How'd I do it?

Now I thought about using switches. .. but it's so tedious.. for example.. I can have .
Player # fires frost explosion..
Turn switch 1 on..

When switch 1 is on...
When P2 is in Location of Frost explosion
Do this to P2 ..

But then I gotto do that for Every Player.. and When'd u turn Switch 1 off?
If i turned off switch 1 for p2.. it won't affect p3 or 4 if they were ALSO in the same area.. (Or does it?)

Anyways.. Help! please explain a ezier way (if there is one) to detect Area of Effect triggers!!



None.

Apr 23 2008, 6:54 pm NudeRaider Post #2

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

add a set death action to the frost explosion trigger that sets every human player's death count to 1 if P1 cast it, to 2 if P2 cast it, etc..
Then set current player's (player casting frost) death count to 0.
Have a set of triggers with 2 conditions:
dc exactly 1 and brings at least 1 [men] to 'P1 follow'
dc exactly 2 and brings at least 1 [men] to 'P2 follow'
... etc. for all players
this trigger has the desired action for detecting cast. e.g. display text.

You'll also need a reset trigger for every player:
dc exactly 1 and brings at most 0 [men] to 'P1 follow' --> set dc to 0
dc exactly 2 and brings at most 0 [men] to 'P2 follow' --> set dc to 0
... etc. for all players

It's not hard, but you'll have to make a bunch of similar triggers.




Apr 23 2008, 7:48 pm DevliN Post #3

OVERWATCH STATUS GO

What do you mean by you want something to happen to players in the blast radius - are they taking damage or being slowed down or something like that?

And is the effect supposed to wear off after a few seconds? In that case, you should add a death count timer that starts when the Current Player uses his Frost Explosion and resets after a short while.



\:devlin\: Currently Working On: \:devlin\:
My Overwatch addiction.

Apr 23 2008, 8:21 pm Wormer Post #4



You can make it in a little bit another way.
You need to have a death counter dcMessage wich definetly indicates that the player for whom it is set to 1 (for example) has got into the range of the frost explosion. When you find your dcMessage equal to 1 it is time to do actions:

Trigger
Owners: All Human Players
Conditions:
Current player has suffered exactly 1 deaths of dcMessage.
Actions:
Preserve trigger.
Modify death counts for current player: set to 0 for dcMessage.
// other actions you would like to happen here

After this is done you need 8 triggers to set dcMessage when the player turn out to be in the range of the explosion casted by current player.

Trigger
Owner: All Human Players
Conditions:
// current player's frost explosion cast conditions here
P brings at least 1 uHero to lFrostExplosion.
// the next condition is required to exclude the spell caster from the spell's effect.
Current player brings exactly 0 uHero to lFrostExplosion.
Actions:
Preserve trigger.
Modify death counts for P: set to 1 for dcMessage.

You should copy the trigger for P equal to each human player.

This requres a little bit lesser triggers and permits you to use only one location. If you would like to add a new type of explosion (let me imagine it would be fire explosion) you should only add a new location lFireExplosion (this assumes explosions may have different effective casualty radius) and a new number for dcMessage counter which would indiate that the player got into the area of the fire explostion instead of the frost explosion.

Post has been edited 3 time(s), last time on Apr 23 2008, 8:31 pm by Wormer.



Some.

Apr 23 2008, 9:25 pm Falkoner Post #5



What are you using to fire the spell? Is it a Dark Swarm, or what? We need a bit more specific information on the map to give you a proper answer to your question.



None.

Apr 24 2008, 2:07 am UnholyUrine Post #6



In affect, It really doesn't matter if it's casted by Dark Swarm or Anything.... I just wanted to know the eziest way to Detect whether players were in the Blast Radius.

I understand Nude and Wormer's explanation... I don't have to do Nude's way since No two players can have the same Hero... But Nude's way is still very tedious... because i'd have to do at least two (1 for each force) for each spell... .. And I would also need to keep track which Deathcount to use for which spell...

Wormer's explanation doesn't tell me the best conditions for the "frost explosion" .. I guess the eziest way is Deathcounts :S... I guess it could work... meh~

Thanks anyway guys!



None.

Apr 24 2008, 2:52 am Falkoner Post #7



Why can't you just center a location and check if a unit is within the location? It's not that difficult..



None.

Apr 24 2008, 6:56 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

Wormers suggestion is much better than mine. I just wrote a few triggers real quick without giving much thought into it.
Taking everything into consideration this should be the simplest solution:

Spell is cast:
c: Current Player brings at least 1 marine to 'Spells'
a: remove Marine at 'Spells'
a: Center 'Spell Range' on [men] owned by Current Player
a: <subtract mana>
a: <explosion fx>
a: <do damage>
a: Set dcCast to 1 for all players
a: Set dcCast to 0 for current player
where the caster has just built the Marine in his "Spell-Barracks", which represents Frost Explosion.
dcCast is set to different values depending on the spell. E.g. build firebat (Fire Spell) -> dcCast is set to 2

Message trigger Frost
c: Current Player brings at least 1 [men] to 'Spell Range'
c: Current Player has suffered exactly 1 deaths of dcCast
a: <give Frost message>
a: Set dcCast to 0 for current player

Message trigger Fire
c: Current Player brings at least 1 [men] to 'Spell Range'
c: Current Player has suffered exactly 2 deaths of dcCast
a: <give Fire message>
a: Set dcCast to 0 for current player

No Message trigger
c: Current Player brings at most 0 [men] to 'Spell Range'
c: Current Player has suffered at least 1 deaths of dcCast
a: Set dcCast to 0 for current player

Btw. if necessary you can move the <do damage> action(s) to the message triggers and, if you like, add a "personal explosion".

Post has been edited 6 time(s), last time on Apr 24 2008, 7:40 am by NudeRaider.




Apr 24 2008, 7:20 am Wormer Post #9



O)UnholyUrine, can't understand you quite well.

Quote
I don't have to do Nude's way since No two players can have the same Hero...
Do you mean that you couldn't use my triggers because of the single uHero unit mentioned in the trigger's conditions? This really does not matter, you could change uUnit in the trigger to [men] (as far as you have only one unit for each player) or better specify particular player's P hero uUnit(P) in each copy.

Quote
In affect, It really doesn't matter if it's casted by Dark Swarm or Anything.... I just wanted to know the eziest way to Detect whether players were in the Blast Radius.

Quote
Wormer's explanation doesn't tell me the best conditions for the "frost explosion" .. I guess the eziest way is Deathcounts :S... I guess it could work... meh~

Quote
What are you using to fire the spell? Is it a Dark Swarm, or what? We need a bit more specific information on the map to give you a proper answer to your question.

As falkoner said we have not got enough information about how your spell is activated. You should fill the line "// current player's frost explosion cast conditions here" with the conditions that activate the spell. Dont forget to clear that clonditions immediately after the work is done. As you've said it may be a good practice to take the specific conditions out in a seperate trigger, setting a deathcounter. Then you should change the line "// current player's frost explosion cast conditions here" with something like "Current player has suffered exactly 1 deaths of dcSpellCast." Dont forget to clear the dcSpellCast after all actions are done.

Actually you could improove Nude's method to use a single location per spell. First of all you should center the location lFrostExplosion on Current player. and then check conditions:
dc exactly 1 and P1 brings at least 1 [men] to 'lFrostExplostion'
dc exactly 2 and P2 brings at least 1 [men] to 'lFrostExplostion'
... etc. for all players

This uses the next observation: if the player is in the casualty radius of the spell caster then the spell caster is in the casualty radius of that player.

Using Nudes method you could also have a single death counter for all spells. The only difference is having a range of dc values for each spell instead of a single value in my method. For example values 1-8 represent players 1-8 casting the frost explosion spell and values 9-16 represent players 1-8 casting the fire explosion spell and so on.

Using the Nude's method you will need 2*n*m triggers (where n is the number of Human Players and m is the number of spells). Using my method you will need (n+1)*m triggers. Use the method you like the most, both will work fine.

Post has been edited 1 time(s), last time on Apr 24 2008, 7:51 am by Wormer.



Some.

Apr 24 2008, 7:35 am Wormer Post #10



Well, I think this is the simpliest way (only 2+m triggers):
Quote
Spell is cast:
c: Current Player brings at least 1 marine to 'Spells'
a: remove Marine at 'Spells'
a: Center 'Spell Range' on [men] owned by Current Player
a: <subtract mana>
a: <explosion fx>
a: <do damage>
a: Set dcCast to 1 for all players
a: Set dcCast to 0 for current player
where the caster has just built the Marine in his "Spell-Barracks", which represents Frost Explosion.
dcCast is set to different values depending on the spell. E.g. build firebat (Fire Spell) -> dcCast is set to 2

Message trigger Frost
c: Current Player brings at least 1 [men] to 'Spell Range'
c: Current Player has suffered exactly 1 deaths of dcCast
a: <give Frost message>
a: Set dcCast to 0 for current player

Message trigger Fire
c: Current Player brings at least 1 [men] to 'Spell Range'
c: Current Player has suffered exactly 2 deaths of dcCast
a: <give Fire message>
a: Set dcCast to 0 for current player

No Message trigger
c: Current Player brings at most 0 [men] to 'Spell Range'
c: Current Player has suffered exactly 1 deaths of dcCast
a: Set dcCast to 0 for current player

It only may not work when two players cast spells simultaneously. This could lead to unexpected results. But before taking such things into account you should consider what heppens if two players cast different spells and the third player gets into the radius of both spells. Should their effects sum up? By the way, the simpliest method might not work if two players cast different spells on each other... But at last it is the simpliest method after all so if such things dont bother you it is the best solution...

ADDED:
You could solve the problem of simultaneous spell cast by not allowing to cast spells simultaneous. You should change the first trigger a little:
Spell is cast:
c: Current Player brings at least 1 marine to 'Spells'
c: All Players brings at most 1 marine to 'Spells' // this will restrict simultaneous spell casting.
a: remove Marine at 'Spells'
a: Center 'Spell Range' on [men] owned by Current Player
a: <subtract mana>
a: <explosion fx>
a: <do damage>
a: Set dcCast to 1 for all players
a: Set dcCast to 0 for current player

And add a trigger to handle the situation when at least two players command the marine at 'Spells':
Spell is failed:
c: Current Player brings at least 1 marine to 'Spells'
c: All Players brings at least 2 marine to 'Spells' // this will restrict simultaneous spell casting.
a: remove all Marine for all players at 'Spells'
a: display text message: "spell cast failed"

By the way, don't forget preserve trigger actions.

Post has been edited 3 time(s), last time on Apr 24 2008, 7:49 am by Wormer.



Some.

Apr 24 2008, 7:41 am 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

EDIT:
Quote from NudeRaider
No Message trigger
c: Current Player brings at most 0 [men] to 'Spell Range'
c: Current Player has suffered at least 1 deaths of dcCast
a: Set dcCast to 0 for current player
Now trigger amount is 1 + 2*m (1 reset + 2 triggers per spell)

And about the multicast problems:
Either you make multiple locations and dcs (1 for each spell)
=> This still causes trouble if you don't use hyper triggers as one player may cast 2 spells the same time. (Increase the build time to 36+ in that case)
- OR -
You add the condition "All players has suffered at most 0 dcCast" to the "Spell is cast" trigger.
=> This is failsafe, but gives P1 a slight advantage, as his spells are processed first and no one can cast until each player has been given his message. This would probably only be noticeable when you're not using hyper triggers

Post has been edited 1 time(s), last time on Apr 24 2008, 7:50 am by NudeRaider.




Apr 24 2008, 7:48 am Wormer Post #12



Quote
Now trigger amount is 1 + 2*m (1 reset + 2 triggers per spell)
Ah yes, my bad :D



Some.

Apr 24 2008, 7:55 am NudeRaider Post #13

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 Wormer nice battle of ideas! :D
That's how UMS assistance has to be.
I mean we both pushed the other to find the bestest solution and perfect the result for Unholy.




Apr 24 2008, 8:00 am Wormer Post #14



Quote
Lol Wormer nice battle of ideas! :D
That's how UMS assistance has to be.
lol ;) I have more to say but I think we should stop at this point and wait the answer of the creator or at least someone, because soon noone exept us will understand what is going on :)

ADDED:
cant stand answering once more ^^
Quote
And about the multicast problems:
Either you make multiple locations and dcs (1 for each spell)
You could use one dc to hold information about all the spells casted at once. Just have powers of two representing if the particular spell is cast: 2^0=1 for the first spell 2^1=2 for the second, 2^3=4 for the third and so on. You could extract information about all spells from the single dc :D

Post has been edited 1 time(s), last time on Apr 24 2008, 8:06 am by Wormer.



Some.

Apr 25 2008, 2:31 am UnholyUrine Post #15



=_______=''

Maybe i should've put more info at first..

There are 12 heroes.. each has 4 spells (not all spells will be complicated thankfully XD)
Each player can only pick 1 hero.. so the locations are hero specific rather than player specific.
Okay so I have a spell right now that i Want to do called "Static Charge".. which when casted.. Enemy heroes inside the radius will lose mana.
However, some heroes can summon units...

The big problem right now is again... eziest way to do detection.. .
All your ideas above .. I've already thought of... and are great but here's the problem...

Players: 1,2,3,4,5,6
Conditions:
Current player brings at least 1 zealot
Current player commands at least one archon hero
Actions:
remove zealot
Set dc to 1 for all players
do explozion effectz...

Now the problem arose here

player 1,2,3,4,5,6
Conditions:
Current player has 1 dc
Current player brings 1 specific hero (let's say defiler) to "static charge location"
Actions:
Set dc to 0
subtract 50 gas...
preserve trigger ...

The problem is i have to do it for 12 heroes and each has to have a "NOT in radius of spell trigger" too..
That'd be like...24 triggers per spell at least X.X
THEN I ALSO have to make it team specific .. so then it's 48 triggers per spell!!
Yes i'm very lazy and i'm hoping there's Some crazy (or a way that i just don't know of) Ezier way of doing this....

I hope that's clear enough



None.

Apr 25 2008, 3:07 am Falkoner Post #16



Oh, don't complain 48 triggers a spell isn't that much, I just made around 1000 triggers for the spawn system in my map recently, with triggers like the ones you have, it's simple to use Find and Replace to copy the triggers faster.



None.

Apr 25 2008, 4:56 am UnholyUrine Post #17



Well Yeah I know...
I'm just wondering whether there's sm1 really smart out there that came up with a System that's Efficient and Works... :S
oh well thnx anyways



None.

Apr 25 2008, 7:02 am NudeRaider Post #18

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

Hero dependent? Like subtract 50 mana for defiler and subtract 100 mana for marine? In that case I don't know how you can think it would even be possible to combine triggers. You want it specific for each hero/spell combination so you have to MAKE it different. ;)

OK just in case I misunderstood you and you want the spells to affect each hero the same, then I guess every hero should have different spells and you want a way to figure when the player builds a marine if it should be Frost explosion (Hero: Jim Raynor) or Mana Drain (Hero: Defiler). That's easy: Add this condition to each spell: Current Player commands at least 1 <hero unit>

If the problem is that you have many different locations and different sizes, 1 for each spell, then replace the generic location 'Spell Range' with explicit locations whereas you can combine locations with the same size. This wouldn't affect the trigger amount as you need 2 triggers per spell anyway.

If the problem is to detect if the affected players bring their hero (unknown type) to the spell location then you can just use [men] in the bring condition, which I already did in the above triggers.

Atm. I don't know what problem you tried to explain with this:
Quote from UnholyUrine
The problem is i have to do it for 12 heroes and each has to have a "NOT in radius of spell trigger" too..
That'd be like...24 triggers per spell at least X.X
THEN I ALSO have to make it team specific .. so then it's 48 triggers per spell!!
If I haven't covered your actual concern then please clarify why you think you'd need so many triggers.




Apr 25 2008, 12:07 pm Wormer Post #19



Well, I cant say I understand what you want.

Quote
If the problem is to detect if the affected players bring their hero (unknown type) to the spell location then you can just use [men] in the bring condition, which I already did in the above triggers.
Why not to make the last trigger like this:
player 1,2,3,4,5,6
Conditions:
Current player has 1 dc
Current player brings 1 specific [men] to "static charge location"
Actions:
Set dc to 0
subtract 50 gas...
preserve trigger ...

You could also use [men] to make the "NOT in radius of spell trigger". Therefore only 2 triggers per spell. Why so many?

Quote
THEN I ALSO have to make it team specific .. so then it's 48 triggers per spell!!
What does this "team specific" mean? You haven't told anything about it :omfg:

If you mean that some players might be allied with each other and you dont want spells to affect allies then set dc for foes instead of all players in the first trigger:
Players: 1,2,3,4,5,6
Conditions:
Current player brings at least 1 zealot
Current player commands at least one archon hero
Actions:
remove zealot
Set dc to 1 for foes
do explozion effectz...



Some.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06:57 am]
maxar39174 -- Outdoor gym and fitness equipment manufacturer and suppliers https://mountwoodco.com/outdoorgym-equipment-manufacturer-in-uttar-pradesh.php
[06:57 am]
maxar39174 -- Outdoor gym and fitness equipment manufacturer and suppliers https://mountwoodco.com/outdoorgym-equipment-manufacturer-in-uttar-pradesh.php
[06:57 am]
maxar39174 -- Outdoor gym and fitness equipment manufacturer and suppliers https://mountwoodco.com/outdoorgym-equipment-manufacturer-in-uttar-pradesh.php
[06:56 am]
maxar39174 -- Outdoor gym and fitness equipment manufacturer and suppliers https://mountwoodco.com/outdoorgym-equipment-manufacturer-in-uttar-pradesh.php
[06:56 am]
maxar39174 -- Outdoor gym and fitness equipment manufacturer and suppliers https://mountwoodco.com/outdoorgym-equipment-manufacturer-in-uttar-pradesh.php
[06:56 am]
maxar39174 -- Outdoor gym and fitness equipment manufacturer and suppliers https://mountwoodco.com/outdoorgym-equipment-manufacturer-in-uttar-pradesh.php
[06:56 am]
maxar39174 -- Outdoor gym and fitness equipment manufacturer and suppliers https://mountwoodco.com/outdoorgym-equipment-manufacturer-in-uttar-pradesh.php
[05:02 am]
Oh_Man -- whereas just "press X to get 50 health back" is pretty mindless
[05:02 am]
Oh_Man -- because it adds anotherr level of player decision-making where u dont wanna walk too far away from the medic or u lose healing value
[05:01 am]
Oh_Man -- initially I thought it was weird why is he still using the basic pre-EUD medic healing system, but it's actually genius
Please log in to shout.


Members Online: Roy, KiFxierkia15