[GUI] Infection spell wont work in-game

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

SuperCoke.
Newcomer
Posts: 13
Joined: February 14th, 2009, 4:59 am

[GUI] Infection spell wont work in-game

Post by SuperCoke. »

Ok so, im making an infection map, etc etc enough of that.
So the problem im having is, my trigger. Everything works fine except for one function, here the function that is crippling my map.

Code: Select all

Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Casting unit)) and Change color
Heres the full trigger

Code: Select all

Infect Unit
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Infect 
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Target unit of ability being cast) is A Hero) Equal to True
            Then - Actions
                Game - Display to (All players) the text: (|cffffcc00 + ((Name of (Owner of (Target unit of ability being cast))) + 's|r |cff808040hero has been infected! He will lose all control of his Hero in 10 seconds|r))
                Game - Display to (Player group((Owner of (Casting unit)))) the text: |cffff0000Virus suc...
                Wait 10.00 seconds
                Game - Display to (Player group((Owner of (Casting unit)))) the text: |cffff0000Unit succ...
                Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Casting unit)) and Change color
                Unit - Add Infected  to (Target unit of ability being cast)
                Unit - Add Infect  to (Target unit of ability being cast)
                Game - Display to (All players) the text: (|cffff0000 + ((Name of (Owner of (Target unit of ability being cast))) +  has been infected and has been defeated.|r))
                Game - Defeat (Owner of (Target unit of ability being cast)) with the message: You have been Infec...
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                    Then - Actions
                        Game - Display to (Player group((Owner of (Target unit of ability being cast)))) the text: |cffffcc00One of yo...
                        Game - Display to (Player group((Owner of (Casting unit)))) the text: |cffff0000Virus suc...
                        Cinematic - Ping minimap for (Player group((Owner of (Target unit of ability being cast)))) at (Position of (Target unit of ability being cast)) for 2.00 seconds
                        Wait 10.00 seconds
                        Game - Display to (Player group((Owner of (Casting unit)))) the text: |cffff0000Unit succ...
                        Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Casting unit)) and Change color
                        Unit - Add Infected  to (Target unit of ability being cast)
                        Unit - Add Infect  to (Target unit of ability being cast)
                    Else - Actions
Any help with this would be extremely helpful, thanks

- SuperCoke
Ablac
Newcomer
Posts: 6
Joined: April 20th, 2010, 3:33 am
Title: Ablac
Location: USA

Re: [GUI] Infection spell wont work in-game

Post by Ablac »

The problem is your event, its looking for the Effect of an Ability not an Ability, so target of an ability wont work, try changing it to Starts casting an ability or Finishes casting an ability see what happens.

If thats not the problem then try making a Variable to save the Targeted unit and use that instead of (Target unit of ability being cast)
DL.PIGGY
Newcomer
Posts: 15
Joined: May 30th, 2007, 4:19 pm

Re: [GUI] Infection spell wont work in-game

Post by DL.PIGGY »

The wait 10 seconds causes target unit of ability being cast to fail. Also, use triggering unit instead of casting unit.