HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Invocation Spell Bug

08-22-2008, 12:26 PM#1
Olbibock
Hello to all! This is my first post on tge wc3 Campaigns.
I'm actually designing a map and it's almost done... Only a few problems remain.
- In my map I have created a building whose purpose is to summon wards. I want each ward to provide a different aura. Here comes the first issue : I copy-pasted the "Sentry ward" unit 5 times and added to each ward an aura. There's the Vampiric Aura ward, the Devotion Aura ward etc... but the problem is non of the auras work! In game, they appear all right but they don't give the bonus to the Units. Does this mean wards can't have auras?
- Secondly, for the invocations to work, I copy-pasted the "Sentry Ward" spell for each aura and changed the "Summoned unit" section for each ward. This way, each ward has its ow summon spell. Now the problem is that when I add those 5 spells to the building, it does not matter which one I use in-game, the building only summons the first one! Let me explain : the building can summon wards A, B and C. When click on Ward A, it summons ward A but if I click on ward B or C, it still summons ward A! How frustrating!
- Finally I take this occasion to ask a couple more questions:
-How can you give a Player 10% of his current gold? I tried Add player propriety - Current Players Gold x 10 / 100 but it does not work...
-Can a hero have no mana regeneration without modifying gameplay constants on the intelligence?

Thanks a lot!
08-22-2008, 12:41 PM#2
Anitarf
Quote:
Originally Posted by Olbibock
- In my map I have created a building whose purpose is to summon wards. I want each ward to provide a different aura. Here comes the first issue : I copy-pasted the "Sentry ward" unit 5 times and added to each ward an aura. There's the Vampiric Aura ward, the Devotion Aura ward etc... but the problem is non of the auras work! In game, they appear all right but they don't give the bonus to the Units. Does this mean wards can't have auras?
I'm not familiar with any issues regarding auras on wards, but have you checked that the units are allied with the ward, or that you didn't modify the auras by accident so they can't affect your units?
Quote:
- Secondly, for the invocations to work, I copy-pasted the "Sentry Ward" spell for each aura and changed the "Summoned unit" section for each ward. This way, each ward has its ow summon spell. Now the problem is that when I add those 5 spells to the building, it does not matter which one I use in-game, the building only summons the first one! Let me explain : the building can summon wards A, B and C. When click on Ward A, it summons ward A but if I click on ward B or C, it still summons ward A! How frustrating!
That's a classic problem with the wc3 engine, a unit can't have multiple active abilities based on the same ability due to order ID conflicts (the exception here is channel, because you can change it's order id). You need to base your abilities three different point-target summon spells; if you can't fund enough spells like that, you'll have to resort to triggers and create units with them whenever a non-summon point target spell is cast.
Quote:
-How can you give a Player 10% of his current gold? I tried Add player propriety - Current Players Gold x 10 / 100 but it does not work...
Player gold is an integer, so it gets truncated on division. I suspect you did "(Current Players Gold x (10 / 100))", in which case 10/100 gives you 0. Try this instead: "((Current Players Gold x 10) / 100)"
Quote:
-Can a hero have no mana regeneration without modifying gameplay constants on the intelligence?
Hmm, that one is tricky, it requires considerably coding as far as I know.
08-22-2008, 02:09 PM#3
moyack
Quote:
-Can a hero have no mana regeneration without modifying gameplay constants on the intelligence?
you can store the starting mana amount with the setunituserdata command and a periodic trigger could set every 0.1 seconds that amount on the unit, the only inconvenient is that any mana replenish should edit the unit userdata.
08-22-2008, 02:31 PM#4
Olbibock
Anitarf, you say "You need to base your abilities three different point-target summon spells" does that mean I have to use for example for ward A the sentry ward pell, for warb B the Inferno spell, for Ward C the Spirit Wolf Spell etc...? Wow that's tough! :p
Moyack, I had not thought about that that could be it! The thing is I want to create a Hero who works exactly the same as a warrior in wow: he stores mana when he hits units. I'll try to play with some integers and see what I can do, but it should work fine.

One last thing (two actually) : I'm always afraid to use a 0.1 sec periodic event, should I be? I mean will my map lag if use too much of these?
Lastly, I have the impression that the cinematic mode affects the music of the gmae by changing it. How can I counter that?

Thanks alot guys!
08-22-2008, 06:42 PM#5
Gwypaas
If you doesn't do alot of heavy calculations or leaks, 0.1 is fine, most spells use 0.04-0.02 :P
08-22-2008, 07:15 PM#6
Olbibock
Arf i'm still having a problem with the mana regeneration thing. Everything works fine exept this : I want my hero to gain mana equal to 20% of the killed units life. Im using a real thats updated everytime the Hero kills a unit but the 20% thing does not seem to work. It worked fine for the gold but the gold was an integer... I tried Add (0.02 x (life of triggering unit)), Add (20/100 x (life of triggering unit)), Add (20 x (life of triggering unit/100)) and nuthin works!
08-22-2008, 08:20 PM#7
Anitarf
Could you post your trigger in trigger tags?
08-22-2008, 08:40 PM#8
darkwulfv
It probably doesn't work because the instant it's set, it gets set back to the original value due. You'd have to update the amount in the anti-regen so it doesn't do this.
08-23-2008, 10:22 AM#9
Olbibock
Well I dont really know how to paste triggers ill try to write them down:

there are 3 triggers

Trigger 1 : Event : Every 0.5 sec
Actions: set mana of "hero" to "mana" (hero being a unit variable and mana a real variable)

Trigger 2 : Event : A unit dies
Condition : Killing unit = hero
Actions : Turn off Trigger 1
Set mana = mana + 0.2 x Life of Trigering Unit
Turn on Trigger 1

Trigger 3 : Event : A unit begins casting an ability
Condition : Triggering unit = hero
Turn off Trigger 1
set mana = mana of triggering unit
Turn on Trigger 1