[Andrewgosus problem section]

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
Code:
Paladin
    Events
        Unit - A unit Finishes research
    Conditions
        (Researched tech-type) Equal to Paladin 
    Actions
        Unit - Replace Knight 0042 <gen> with a Paladin using The old unit's relative life and mana

The trigger itself works but here is the catch. Im learning variables and how could I make that the trigger replaces all the knights not the preplaced knight. I did a unit variable but how do I set that it is kngiht? Im noob. :rolleyes:
 

Mullit

New Member
Reaction score
51
you dont need a variable. do it like this
Code:
Events
        Unit - A unit Finishes an upgrade
    Conditions
        (Researched tech-type) Equal to Paladin
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Unit-type of (Picked unit)) Equal to Knight
                    Then - Actions
                        Unit - Replace (Picked unit) with a Paladin using The old unit's relative life and mana
                    Else - Actions
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
Problem 9:

Another spell. How do I create a spell which takes takes away 1 hit point for every 4 mana points used when casted on a unit instantaneously.
 
C

Chele

Guest
Blackzabbith said:
you could base it off of the drain life spell
If I'm right what he meant was that the spell would take away all of your mana and then deal 1/4 of the mana spent to target unit. Am I right ? If so, make a trigger that'll check your remaining mana, divide it by 4 and then deal that damage to the target. I can help you with it if you want :D .
 

Rabarber

You can change this now in User CP.
Reaction score
94
Actually, i think subtracting the mana left of the unt from the max mana of it and dividing it by four, and then dealing that damage to a unit would be a better way then just checking how much mana the unit has left, divide that into four and deal damage to the unit.
Just my way of looking at it.
 
B

Blackzabbith

Guest
actually what i meant was making a new ability off of life drain and you could then change these fields->

mana cost-4
data hitpoints drained-1
duration hero-1
duration normal-1

i think that should make it do what you want :rolleyes:

edit-you change duration to 1 so it would be instaneous like you wanted a won't keep on draining
 
C

Chele

Guest
Code:
Spell
    Events
        Unit - A unit Starts the effect of an ability.
    Conditions
        (Ability being cast) Equal to [COLOR=Red]Mana strike[/COLOR]
    Action
        Unit- Cause (Triggering unit) to damage (Target unit of ability being cast), dealing ((Mana of (Triggering unit)) / 4.00) damage of attack type [COLOR=Red]Magic[/COLOR] and damage type [COLOR=Red]Magic[/COLOR]
        Unit - Set mana of (Triggering unit) to 0.00
Red stuff can be changed, hope I've helped :D .
 
C

Chele

Guest
Blackzabbith said:
actually what i meant was making a new ability off of life drain and you could then change these fields->

mana cost-4
data hitpoints drained-1
duration hero-1
duration normal-1

i think that should make it do what you want :rolleyes:
It would I guess but I think andrewgosu said he wanted it to happen immediately and that would only deal 1 hp and drain 4 mp every second right ?
 
B

Blackzabbith

Guest
Andrewgosu said:
Problem 9:

Another spell. How do I create a spell which takes takes away 1 hit point for every 4 mana points used when casted on a unit instantaneously.

i must of misunderstood what you said above... :confused:

if you didn't want that ^ then what did you want? :nuts:

i'm gonna try the ability out my self to see if it does take away 1 hp and drain 4 mana
istantaneously
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
Hmm, it seems that i cant locate the "/"(divide) sign after the mana of triggering unit.

Blackzabbit.

If I have 100 mana and I cast the spell, the target loses 25 health (100/4) and dont die because it has 60 hp.
But if I have 240 mana and I cast the spell, the target loses 60 health (240/4) and dies.
 
C

Chele

Guest
Andrewgosu said:
Hmm, it seems that i cant locate the "/"(divide) sign after the mana of triggering unit.
You have to use the Arithmetics function and change the "+" sign for "/".
 
B

Blackzabbith

Guest
Andrewgosu said:
Hmm, it seems that i cant locate the "/"(divide) sign after the mana of triggering unit.

Blackzabbit.

If I have 100 mana and I cast the spell, the target loses 25 health (100/4) and dont die because it has 60 hp.
But if I have 240 mana and I cast the spell, the target loses 60 health (240/4) and dies.
I don't know what you did wrong up there ^
but i got mine to work buts its not as instant as you might wanted it to be.

just saying even thou you got the spell the way you wanted to :D
 
B

Blackzabbith

Guest
Andrewgosu said:
I thought I should make this cause I dont want to trouble you all with so many threads.[/OUOTE]

I think everyone should do this.

1.saves a lot of thread space if andrewgosu posted all his problems as a thread he would taken up half of first page..

2.if you had a new problem the went with a problem that was a long time ago
instead of searching for the thread that was posted decades ago it would already by in the one thread, easily found.

3.things would be a lot more organized

4. I'm gonna use "Andrew's" brilliant idea my self ;). If he doesn't mind :D

note @ Andrew- You should copywrite this idea before someone steals it :p
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
Problem 10:

Code:
Ranger
    Events
        Unit - A unit Finishes research
    Conditions
        (Researched tech-type) Equal to Ranger Training {Archer}
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Unit-type of (Picked unit)) Equal to Archer
                    Then - Actions
                        Unit - Replace (Picked unit) with a Ranger using The old unit's relative life and mana
                        Wait 0.10 seconds
                        Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + 10.00)
                    Else - Actions
                        Do nothing
Everything seems to be working but instead of giving the picked units +10 hp, it gives it about +20% of its current hp.
 
B

Blackzabbith

Guest
did you use set life percentage?

if you did use the set life value and add 10+ life to unit

example- unit orginal life 120
action-set life value 140

edit-set unit does not add life in the way you think it does it actual does exactly what it says ;) .

example a unit has 150 hp
you use the action- set unit life to 10

unit now has only 10/150 hp left
hopes this helps :rolleyes:
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
I didn't use set life percentage.

And i know how life percentages work, I finished the 8th grade you know;)

Hmm, the trigger itself seems to be buggy because im telling it to add + 10 hp if the unit is not at full health, but it gives 2-4 health.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top