Some annoying problems with a spell

shinami

Redirect your complaints to the nearest wall
So here are the 3 triggers with a spell that are making me confused.

Code:
Illusion cast
    Events
        Unit - A unit Begins channeling an ability
    Conditions
        (Ability being cast) Equal to (==) Illusions 
    Actions
        Set TriggeringUnit = (Triggering unit)
        Set UnitPointVariable[0] = (Position of (Triggering unit))
        Set OwnedUnit = (Owner of (Triggering unit))
        Trigger - Turn on Periodic Illusion <gen>
        Wait 10.00 seconds
        Trigger - Turn off Periodic Illusion <gen>
Code:
Periodic Illusion
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Unit - Create 1 Dummy for OwnedUnit at UnitPointVariable[0] facing UnitPointVariable[0]
        Unit - Add Item Illusions to (Last created unit)
        Unit - Set mana of TriggeringUnit to ((Mana of TriggeringUnit) - 300.00)
        Custom script:   call IssueTargetOrderById(bj_lastCreatedUnit, 852274, udg_TriggeringUnit)
         Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Mana of TriggeringUnit) Less than (<) 300.00
            Then - Actions
                Trigger - Turn off (This trigger)
                Unit - Order TriggeringUnit to Stop
            Else - Actions
        Custom script:   call RemoveLocation(udg_UnitPointVariable[0])
Code:
Stop Illusion
    Events
        Unit - A unit Stops casting an ability
    Conditions
        (Ability being cast) Equal to (==) Illusions 
    Actions
        Trigger - Turn off Periodic Illusion <gen>
So what this spell does is creates illusions every second for the cost of 300 mp. So first problem. My hero has 750 mp, and somehow he is only able to produce just one illusion, before his mp goes down to 150. How can i fix this?

Second problem.

Even if the hero has 1 mp, it will still produce an illusion, so all you have to do to abuse this is keep clicking the spell and you've got a billion of clones. My guess is i have to put on a condition somewhere that checkes if the unit has more or equal to 300, and if he doesn't cancel the effect, but i'm not sure so i want some advice.

I think thats it for the problems, i might encounter some more. +rep for help.

P.S Thanks to AceHart for the custom script that casts item illusions.
 

Exide

I am amazingly focused right now!
Add a condition to your Periodic trigger:
Code:
(Mana of TriggeringUnit) Greater than or equal to 300.00
-If the Hero has less mana, the trigger won't run, and no illusions will be spawned.
 

shinami

Redirect your complaints to the nearest wall
Add a condition to your Periodic trigger:
Code:
(Mana of TriggeringUnit) Greater than or equal to 300.00
-If the Hero has less mana, the trigger won't run, and no illusions will be spawned.
Well that was simple, thanks, +rep. Anyone has ideas about the first problem?
 

Exide

I am amazingly focused right now!
Your first problem doesn't make sense. -Since the trigger states that only 300 mana is drained per second.
Unless, somehow, your Hero is stuck in the trigger twice..

Also, this seems pretty useless:
Code:
    Set OwnedUnit = (Owner of (Triggering unit))
 

shinami

Redirect your complaints to the nearest wall
Your first problem doesn't make sense. -Since the trigger states that only 300 mana is drained per second.
Unless, somehow, your Hero is stuck in the trigger twice..

Also, this seems pretty useless:
Code:
    Set OwnedUnit = (Owner of (Triggering unit))
Yes, it was, i did it because before doing the spell, i thought of an "imaginary" problem.

Anyway. I attached the map so You, or someone else who is experienced could take a look at this strange problem. ( Requires NewGen ^_^ )
 

Attachments

emootootoo

Top Banana
You are setting a point variable when you cast the spell.

Then after the first time the periodic trigger goes off, you remove it. So next time it runs, there is no point. So it is not creating the dummy where you desire it to be.
 

shinami

Redirect your complaints to the nearest wall
You are setting a point variable when you cast the spell.

Then after the first time the periodic trigger goes off, you remove it. So next time it runs, there is no point. So it is not creating the dummy where you desire it to be.
The second time it runs, the Illusion cast goes off which once again sets the variable... Well atleast i think thats how it is.
 

AceHart

Your Friendly Neighborhood Admin
> The second time it runs, the Illusion cast goes off

Why would it?
That would mean the dummy casts the very same ability as your Hero... which 1. isn't possible here, 2. would lead to much bigger problems.


> making me confused

Understandable.
You have a variable with "variable" in the name... it's an array for no good reason.
There's a variable called "OwnedUnit" that is actually a player...

> Trigger - Turn off (This trigger)

The "stop" is already doing that.
 

shinami

Redirect your complaints to the nearest wall
Not sure, maybe i said it wrong that you misunderstood it, but this is what i meant.

First time casting, runs the illusion cast trigger and setting the variable and then activates periodic trigger, removing the variable.

So in my logic, the second time i cast it the it goes into the same cycle. Illusion cast goes off, variable setted, periodic goes off , variable removed.

EDIT: There is a reason for the array.

One of your point is right, not sure why did i do the turning off. Ah yes i remember, the time i did the turn off trigger, i still haven't done the stop illusion trigger, so i did it for testing purposes, but when i did the stop trigger, i just forgot to remove it ^_^

Also the variable in the name doesn't do any harm.. Its just a name.
 

AceHart

Your Friendly Neighborhood Admin
> the second time i cast it the it goes into the same cycle

Well, yes.
Assuming you actually cast it.

Channeling, which this seems to be doing, only happens once though.
It's not continuously re-casting the spell while channeling. Otherwise this would fail miserably...
 

shinami

Redirect your complaints to the nearest wall
> the second time i cast it the it goes into the same cycle

Well, yes.
Assuming you actually cast it.

Channeling, which this seems to be doing, only happens once though.
It's not continuously re-casting the spell while channeling. Otherwise this would fail miserably...
Logical, yet the only failure so far i have here, or see here is my first problem of the spell. Also this spell is still not finished.

Also: OwnedUnit, well i know that its a player, this is not a spell for submission, OwnedUnit might not make sense to some people, but for me it does ^_^
 

AceHart

Your Friendly Neighborhood Admin
Well, we could sit around here and argue about the weather or so, or you simply go and try to see what happens if you don't remove the point on every cast but only in the end instead.
Your going to try is presumably more productive.
 

shinami

Redirect your complaints to the nearest wall
Well, we could sit around here and argue about the weather or so, or you simply go and try to see what happens if you don't remove the point on every cast but only in the end instead.
Your going to try is presumably more productive.

The weather sucks. Anyway, that helped and the reason i didn't do it earlier because i didn't quite understand what you meant by in the end. Anyway i tried removing the variable removing and it works..

So now, by the end do you mean on the triggers Illusion Cast end?
 

emootootoo

Top Banana
You've had the answer to your problem since post #6... and then AceHart further explained it, and you still don't understand?

The reason it did not work is you were only creating the point once, when you began casting your heroe's ability.

So don't destroy the point until the ability is completely finished.

At the moment you are destroying it after the first illusion is created, and continue channeling.

(if you understood it, why would you need to ask that question?)
 

shinami

Redirect your complaints to the nearest wall
You've had the answer to your problem since post #6... and then AceHart further explained it, and you still don't understand?

The reason it did not work is you were only creating the point once, when you began casting your heroe's ability.

So don't destroy the point until the ability is completely finished.

At the moment you are destroying it after the first illusion is created, and continue channeling.
I understand it...

"At the end of illusion cast" was what i said. It was just a question to make sure, not other words to say " duuhhh i still not knows"
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • tom_mai78101 tom_mai78101:
    Would like to get some annual forum statistics report.
  • The Helper The Helper:
    there are stats in the xenforo forum admin section and we have matomo stats we started collecting beginning of the year so we will not have annual on that until next year
  • The Helper The Helper:
    I thought you had keys to the bathroom Tom? Ghan does Tom have access to the stats thread in the bathroom
  • The Helper The Helper:
    since I started jacking with the bots on the site we doubled our page views on the site in a week lol
  • The Helper The Helper:
    I have been having lots of fun
  • The Helper The Helper:
    we have had like 6000 views of the American Airlines economy class thread in the last week
  • The Helper The Helper:
    I ought to stick a travel affiliate link or something on that page to try and monetize that they are just going there and leaving it might even be bots I am not sure
  • The Helper The Helper:
    I just got into it with the Atari VCS Facebook Moderator I started trolling him and almost got banned
  • The Helper The Helper:
    They deleted one of my posts one time so I was trolling him on a help post I put up because I am evil I guess and bored and the guy handled it well I loved his attitude Atari has a good social media presence even if they do not have many games.
  • The Helper The Helper:
    The French Atari they call them even though they are like totally based in America they just have French Money coming in. Gotta love it
  • Ghan Ghan:
    Microsoft buying Activision Blizzard holy crap!
  • The Helper The Helper:
    I know right holy cow
  • Accname Accname:
    Thats not going to save it.
  • The Helper The Helper:
    It might
  • The Helper The Helper:
    They are going to use alot of that IP in the Metaverse
  • The Helper The Helper:
    I found a new section of the stats that is freaking interesting!
  • The Helper The Helper:
    oh yeah this is what I was looking for good job matomo! These are some sweet stats I am learning the interface on it too!
  • The Helper The Helper:
    If anyone ever asks later how I found out about it was watching the site bots but not watching what they were doing but asking myself why they were here?
  • The Helper The Helper:
    there must be a reason and ok that is it
  • The Helper The Helper:
    the past and the future all come together into one
  • The Helper The Helper:
    the search engines are what built thehelper.net the search engines will make it big again maybe
  • The Helper The Helper:
    the real question is are 5 million links better than 60 real good links?
  • The Helper The Helper:
    the answer is 60 lol
  • The Helper The Helper:
    unless you put 100k links on it lol then you get something

    Members online

    No members online now.

    Affiliates

    Hive Workshop NUON Dome
    Top