GUI Teleport Spell Troubles

This is where all discussion of WC3 mapmaking should be held. This forum exists particularly for mapmaking needs. If you have a question on how something works or have need for some code review, this is the place to put it.
Post Reply
User avatar
pandamanar
Revenent of the Replies
Posts: 324
Joined: Mon Apr 21, 2008 11:39 am
Contact:

GUI Teleport Spell Troubles

Post by pandamanar » Fri Mar 27, 2009 4:18 pm

[UDPATE] Excuse this thread, I fixed it. :3 thanks
This spell is supposed to teleport the caster to the targeted location and have the spell's mana cost go up 50 points for every 500 range between the target and the caster's position. Could anyone clue me in as to why this doesn't work?
First Skill

Meld
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Meld
Actions
Set MeldCaster = (Casting unit)
Set MeldPosition = (Position of MeldCaster)
Set MeldTarget = (Target point of ability being cast)
Set MeldMana = (Mana of MeldCaster)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Terrain type at MeldPosition) Equal to (Terrain type at MeldTarget)
Then - Actions
Unit - Set mana of MeldCaster to (MeldMana - (25.00 x ((Distance between MeldPosition and MeldTarget) / 500.00)))
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Terrain type at MeldPosition) Not equal to (Terrain type at MeldTarget)
Then - Actions
Unit - Set mana of MeldCaster to (MeldMana - (50.00 x ((Distance between MeldPosition and MeldTarget) / 500.00)))
Else - Actions
Do nothing
Custom script: call RemoveLocation (udg_MeldTarget)
Custom script: call RemoveLocation (udg_MeldPosition)
Set MeldCaster = No unit
Set MeldMana = 0.00
Second Trigger

Meld Copy
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Meld
Actions
Set MeldCaster = (Casting unit)
Set MeldMana = (Mana of MeldCaster)
Set MeldPosition = (Position of MeldCaster)
Set MeldTarget = (Target point of ability being cast)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Terrain type at MeldPosition) Equal to (Terrain type at MeldTarget)
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
MeldMana Greater than or equal to (25.00 x ((Distance between MeldPosition and MeldTarget) / 500.00))
Then - Actions
Do nothing
Else - Actions
Unit - Order MeldCaster to Stop
Sound - Play SpellShieldImpact1 <gen> at 100.00% volume, attached to MeldCaster
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Terrain type at MeldPosition) Not equal to (Terrain type at MeldTarget)
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
MeldMana Greater than or equal to (50.00 x ((Distance between MeldPosition and MeldTarget) / 500.00))
Then - Actions
Do nothing
Else - Actions
Unit - Order MeldCaster to Stop
Sound - Play SpellShieldImpact1 <gen> at 100.00% volume, attached to MeldCaster
Else - Actions
Do nothing
Custom script: call RemoveLocation (udg_MeldTarget)
Custom script: call RemoveLocation (udg_MeldPosition)
Set MeldCaster = No unit
Set MeldMana = 0.00
The second trigger is supposed to keep the caster from teleporting if he doesn't have the appropriate mana. For some reason when I test it, he is Stopped no matter what his mana is.
http://signup.leagueoflegends.com/?ref=4c242dfce214c
Play League of Legends, get to level 10 and I get buffs.

User avatar
Cold Phoenix
Keeper of the Keys
Posts: 449
Joined: Tue Jan 15, 2008 11:32 am

Re: GUI Teleport Spell Troubles

Post by Cold Phoenix » Sat Mar 28, 2009 9:35 am

You don't need the do nothings because they literally do nothing.
Your move.

User avatar
Rising_Dusk
Chosen of the Intargweeb
Posts: 4031
Joined: Sat Dec 15, 2007 1:50 pm
Contact:

Re: GUI Teleport Spell Troubles

Post by Rising_Dusk » Mon Mar 30, 2009 7:07 pm

First of all, you never actually move the unit. Second of all, I do not think "terrain type" checks are what you want. You'll need to provide more information though on what exactly you wanted that to achieve.

Also, I am not really sure what the second trigger is supposed to do. Stop the order if it's not meeting some criteria? It's tough to read your GUI.
"I'll come to Florida one day and make you look like a damn princess." ~Hep

User avatar
pandamanar
Revenent of the Replies
Posts: 324
Joined: Mon Apr 21, 2008 11:39 am
Contact:

Re: GUI Teleport Spell Troubles

Post by pandamanar » Mon Mar 30, 2009 7:49 pm

You are absolutely correct. Being the idiot I am, I made the whole skill and tested it to find that he never moved. I was upset, thinking that my second trigger stopped him no matter what his mana was, but I was incorrect. I had simply forgot to base the dummy skill off of Blink >_< Foolish me. Sadly I had already come here, asking for help, along with TheHelper.net before I had found my problem. Doh! Thanks for the help BTW
If You Are Curious...

The spell is a 500-3000 ranged blink with a 1 second casting time that costs your hero 50 mana for every 500 range traveled unless the terrain type that you are standing on is the same as the one under your targeted point, which would then make it cost 25 mana per 500 range.
http://signup.leagueoflegends.com/?ref=4c242dfce214c
Play League of Legends, get to level 10 and I get buffs.

User avatar
Rising_Dusk
Chosen of the Intargweeb
Posts: 4031
Joined: Sat Dec 15, 2007 1:50 pm
Contact:

Re: GUI Teleport Spell Troubles

Post by Rising_Dusk » Tue Mar 31, 2009 11:37 am

Cool. Glad it worked out.
"I'll come to Florida one day and make you look like a damn princess." ~Hep

User avatar
assassingao
Teh UBER Typist
Posts: 999
Joined: Wed Jan 16, 2008 12:56 pm

Re: GUI Teleport Spell Troubles

Post by assassingao » Tue Mar 31, 2009 11:51 am

Would it worked out with any spell with target location? I'm quite sure that it would've worked better that way.

Calculating the mana and stuff, instead of 50 mana for 500 range, you could have make it cost like 1 mana for 10 range or something, then make it blink with trigger. (aka. move it instantly.)

User avatar
pandamanar
Revenent of the Replies
Posts: 324
Joined: Mon Apr 21, 2008 11:39 am
Contact:

Re: GUI Teleport Spell Troubles

Post by pandamanar » Tue Mar 31, 2009 5:50 pm

I think I should make it 10 mana for every 100 range or something, but basing it on Blink makes it super easy :3
http://signup.leagueoflegends.com/?ref=4c242dfce214c
Play League of Legends, get to level 10 and I get buffs.

Post Reply

Return to “Custom Map Creation”