Requesting help triggering a very difficult spell

Cal1991

New Member
Reaction score
7
My brother and I have been trying to create a spell for our map for a few weeks now, with no success.

The spell is supposed to create a power generator, and then allow the caster to create additional towers that "link" to the generator, creating a beam of electricity between them that damages people. the towers are also supposed to "link" to other towers, and if one of the towers or the generator dies, the whole system goes down.

My attempt at making it in GUI can be found here:
http://www.thehelper.net/forums/showthread.php?t=85333&highlight=Cal1991

My brothers attempt at making it in jass:
http://www.thehelper.net/forums/showthread.php?t=92102

If anyone can successfully make this spell, they will earn rep from me and both my brothers (evan1993 and daskunk)
 

WilliamPa

Active Member
Reaction score
51
Well, it is pretty simple i think, though i didn't exactly get what you want, here is what i made.

Code:
DestroyLine
    Events
        Unit - A unit owned by Player 1 (Red) Dies
    Conditions
        ((Unit-type of (Dying unit)) Equal to Tower) or ((Unit-type of (Dying unit)) Equal to Generator)
    Actions

Then how you want them to go down. If they shuld just disactivate, try changing all the tower's and the generator's owner and make them rescuable?
 

Cal1991

New Member
Reaction score
7
Well, it is pretty simple i think, though i didn't exactly get what you want, here is what i made.

Code:
DestroyLine
    Events
        Unit - A unit owned by Player 1 (Red) Dies
    Conditions
        ((Unit-type of (Dying unit)) Equal to Tower) or ((Unit-type of (Dying unit)) Equal to Generator)
    Actions

Then how you want them to go down. If they shuld just disactivate, try changing all the tower's and the generator's owner and make them rescuable?

No, it is not pretty simple.
Since you apparently didn't understand what I wanted, I will try to explain it again.

There is an Engineer hero in our map. A spell he is supposed to have, but we were unable to get working, is as follows:

1. You make the Engineer learn the spell. This allows the Engineer to place a Power generator unit.
2. After placing the Power generator unit, the Engineer can create towers for a mana cost within a certain radius of the Power Generator, or within a certain radius of a tower "linked" to the Generator.
3. When you place a tower, it creates a beam between the placed tower and any power generator or tower within the linking radius.
4. If a tower dies, all the beams connecting to it disappear.
5. if a Power Generator dies, every tower/generator connected to it, and any connected to them, and so on, are all destroyed.
6. the beams constantly do damage to any enemy units near them.

A slightly easier way to make the spell, which is how I attempted to make it in GUI, is to only allow 1 power generator and make the entire system go down if either a tower or the generator dies. Either way is good enough, but the first is preferred.

If you still don't understand, try testing the attached map. It was my attempt at making the spell. It works sometimes but is hopelessly buggy and glitched.
 
1

131ackout

Guest
Well its look more like a system from Power Towers.

Sorry about "no success" spell.
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
Since I failed to make this one in GUI for you last time, I decided to give it another shot, this time with JASS.

If this is not the result you wanted, just tell me what I did wrong and I'll edit it as soon as possible.

Requires:

NewGen
HAIL system (located in map)

Edit: Forgot the damage function, I'll add this when I get more info on how it should be done.
 

Cal1991

New Member
Reaction score
7
Since I failed to make this one in GUI for you last time, I decided to give it another shot, this time with JASS.

If this is not the result you wanted, just tell me what I did wrong and I'll edit it as soon as possible.

Requires:

NewGen
HAIL system (located in map)

Edit: Forgot the damage function, I'll add this when I get more info on how it should be done.

That is a lot closer to what I wanted, but there are still a few problems.
1. In your version when it is unable to cast it still costs mana and triggers the cooldown. If it can't be casted it should make the caster stop like it does in my version.
2. In your version it seems the towers must always be within a certain reach of the power generator. I meant for them to be always within reach of the generator OR another linked tower. So that you could create a long wall. For example:

g= generator
t= tower

g-t-t-t-t-t-t-t-t
| | | | |
t-t-t-t-t-t

As for damage, it should effect all non-invulnerable and non-structure enemy land units.
The amount of damage can be the same on every level, but it should stack. I.e., if two beams cross at a certain point, and a unit is standing on that point, it would take double as much as standing on only one beam.
As long as the damage is not effected by armor type (light, heavy, medium, etc.) and gives credit to the killing player(meaning they would get gold and exp) I don't care if it ignores armor value(1, 4, 10, etc)
Being reduced by hero armor is acceptable since most of the wc3 spells are that way also.

If you are unable to make the damage stack, I can live without it. At this point I would be happy to just have a working version of the spell. :banghead:

For some reason when I opened your map in my version of newgen editor, added some units and saved it, it wouldn't work any more. Does this mean one of us has an old/corrupted version of newgen, or what?

Gave you some rep... If you get it working all the way I'll get my brothers to rep you too.
 

Cal1991

New Member
Reaction score
7
For some reason when I opened your map in my version of newgen editor, added some units and saved it, it wouldn't work any more. Does this mean one of us has an old/corrupted version of newgen, or what?
.

Never mind, got the newer version of newgen and it's fine.

I should mention: the lightning dummy units in my version of the spell were only needed for visual effect and for their immolation ability to deal damage, if you use lightning effects and deal damage via triggers or however you plan to do it, they are not required.
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
Ok I'll remove them then I guess and trigger the damage. Still wont be doing this until tomorrow though.

Edit: Can't bump this just yet since it hasn't passed 24 hours, so hopefully you'll just notice this. I fixed everything but the damage function since I could use a little more information about this part.

Should each lightning damage each unit, and should it be damage per second or just damage once?

Attached the most recent map, tell me if I missed something fatal or if you're missing anything but the damage function.
 

Cal1991

New Member
Reaction score
7
Should each lightning damage each unit,
Yes.
and should it be damage per second or just damage once?
Per second. Once a second or once a half second, either is fine.

Attached the most recent map, tell me if I missed something fatal or if you're missing anything but the damage function.

It seems pretty good. Other than two minor things, the damage is all it needs now.
1. When you can't place a tower, it gives the "must place tower next to another tower or generator message" like it should, and the cool down does not fire, but, it gives you some mana.
Since the spell is not casting, this bit of code you have in there should be unnecessary:
Code:
call SetUnitState(data.caster, UNIT_STATE_MANA, GetUnitState(data.caster, UNIT_STATE_MANA) + 300 + (25 * data.level))

2. After a bit of testing I noticed the lighting graphics do not always line up quite right. See attached screen shot. If you can't find out why this happens, it's not a big deal, it doesn't happen very often.
 

Attachments

  • Linktowers.png
    Linktowers.png
    862.3 KB · Views: 200

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
1) I acually lost mana even though the cooldown didn't fire, that's why I added that function.

2) That's odd, never occured to me. I'll look into it tomorrow.

Edit: ok #2 is caused when trying to place a tower on top of another unit. It isn't a very difficult thing to fix.
 

Cal1991

New Member
Reaction score
7
1) I acually lost mana even though the cooldown didn't fire, that's why I added that function.

2) That's odd, never occured to me. I'll look into it tomorrow.

Edit: ok #2 is caused when trying to place a tower on top of another unit. It isn't a very difficult thing to fix.

Alright, once you fix #2 and add the damage it should be all good.
I'm impressed :thup:
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
Oh I'm sorry I totally forgot about this one. It's almost done now, I just need to fix the damage a little, other than that it's done. Wont take too long.
 

Attachments

  • Chain-tower spell final.w3x
    371.2 KB · Views: 187

Cal1991

New Member
Reaction score
7
Oh I'm sorry I totally forgot about this one. It's almost done now, I just need to fix the damage a little, other than that it's done. Wont take too long.

Seems to be working well enough. I'll have my brothers rep you tomorrow as promised, if they don't do it themselves.

Thanks again, dunno what I would have done to get it working without ya <3
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top