HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Blink to random point in region?

01-23-2004, 03:37 PM#1
Peacerich
I made a spell that teleports your hero to a random point in the map (its a hunt / run map). But i noticed that there is a small chance that the teleport will (of course) hit strange places, like places u cannot move when u arrive on (like on the height leveling of a hill). Now when i noticed this, my first though was to just delete the skill. But then i came up with the idea to make a blink with 0 cooldown and 0 mana with unlimited range. I add the blink spell, use order targeting a point to use blink and then remove the link again.

And heres my question: Is there no way to make a action which makes a unit to use one of his custom skills??? I only found like "order targeting a point - nigthelf warden - blink" but i cant choose my custom skills!!

And if this is impossible, is there any other way to make this spell possible?
01-23-2004, 03:42 PM#2
Eriond
With the new 1.14 Patch, it allows you to order units to use custom skills. Otherwise, you'll have to convert it to custom text and change the ability being cast to your abilties code.
01-23-2004, 03:43 PM#3
Peacerich
i played on b.net 5 min ago, and it didnt download any new patch... and i cant find anyway to use custom abilities?

Is it somewhere else then "issue order targeting point"?
01-23-2004, 03:44 PM#4
Eriond
It might be, but below the preset spells, there should be a list of hero, unit and items spells... if you can't find it, you'll have to convert to JASS and then do it manually.
01-23-2004, 03:47 PM#5
Peacerich
jass = /

i only know that its just a mess of numbers and stuff, so i dont think i CAN do it manually.. Hope its there, i havent got the time to start editor and check right now, but thx anyways)
01-23-2004, 03:49 PM#6
Eriond
Well, I'll tell you how to change it, when you have the time. Set the abilty that youwant to be cast to Warden - Blink. Find the place in the text where it has "Abli" or something very similar. Exchange that with your ability code.

To find your ability code, Press control - d in the object editor under the abilties tab. THe names of your abilities will change slightly. And it'll be something like A001 or something. That's your ability code.
01-23-2004, 04:58 PM#7
Voi
OMG!

It is order codes, just order it to night elf warden - blink and it will work if u havent changed the order code in the ability editor!
01-23-2004, 05:01 PM#8
Spinally
Voi is absolutely right, for example: if you base a spell of
"Finger of Death" and you order the unit to do special Archimonde - Finger of Death it WILL fire your CUSTOM spell, this is also one of the reasons why you shouldnt have 2 spells based of the same spell on one hero.
01-23-2004, 11:38 PM#9
Eriond
lol... never thought of that... of course he'd have to modify blink instead of creating a custom spell from it.
01-24-2004, 07:33 AM#10
Peacerich
lol thx=)

Actually, just this morning i found out that that works, as i have done this before with howl of terror :D

I have tried using a modded blink too, but it STILL doesnt work. And i cant get any problems with the trigger. The dummy spell is roar (warp = roar with 5 sec duration no damage increase but modded text), and blink (blink = warp (temp) which is used to teleport...

Here's the trigger:

Warp
Events
Unit - A unit Begins casting an ability
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Equal to Warp
Then - Actions
Unit - Add Warp (teleport) to (Casting unit)
Unit - Order (Casting unit) to Night Elf Warden - Blink (Random point in Arena <gen>)
Unit - Remove Warp (teleport) from (Casting unit)
Else - Actions

I cant possibly understand what cud go wrong with that trigger...

question 1: Why doesnt it work

question 2: if the unit has 7 spells (fills the "inventory") and it gains a spell, will the spell be invisible from the menu but still be usable? So i can give it this blink spell even if it has 7 spells...
01-24-2004, 07:44 AM#11
Newhydra
You're removing the ability before the unit can finish casting it. Try having a wait before you remove it.
01-24-2004, 07:44 AM#12
Bulletcatcher
Code:
Warp
Events
Unit - A unit Begins casting an ability
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Equal to Warp 
Then - Actions
Unit - Add Warp (teleport) to (Casting unit)
Unit - Order (Casting unit) to Night Elf Warden - Blink (Random point in Arena <gen> )
Unit - Remove Warp (teleport) from (Casting unit)
Else - Actions

The unit gains the ability and then loses it again in the same instant: It doesn't have time to actually cast the spell!

Instead, I'd recommend doing this:
Code:
WarpPartA
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Warp 
Actions
Unit - Add Warp (teleport) to (Casting unit)
Unit - Order (Casting unit) to Night Elf Warden - Blink (Random point in Arena <gen> )

and this:
Code:
WarpPartB
Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to Warp (teleport)
Actions
Unit - Remove Warp (teleport) from (Casting unit)
01-24-2004, 12:46 PM#13
Peacerich
thx alot everybody=) im gunna go test that rigt away!'

another question, about something totally different:

Im making a "time stop aura", which u use like roar with a duration. When a unit come within a certain distance of the unit casting the ability, he will be paused and animation speed 0 (time stopped=))

But when i use "unit comes within 1000 of ..." i cant use my variables. I have to choose a unit on battlefield, but as all units are CREATED in start, thats impossible!!

What to do? Check every 0.01 sec if there is a unit within range? does that cause lag?

and another question: true or false = a non initally enabled trigger with periodic event will not engage if its not turned on from another trigger?
01-24-2004, 06:10 PM#14
LegolasArcher
true
01-24-2004, 07:07 PM#15
Peacerich
k thx=)

Ok now i finally made this blink working. Now i got 1 problem left:

1: It works exactly as i wanted it to, when the "random point in region is a tree or other "non selectable blink point", it doesnt blink. Now i want so when the random point IS a non walkable point, it should choose another random point and teleport. I tried it this way:

When it starts casting the spell, i have a point_variable that i set to the position of the casting unit. And when the spell has ended, and the point is within 100 of the casting unit ( aka. the caster hasnt moved) it will repeat the teleport trigger. The problem is, IT DOESNT repeat the trigger for somereason... i can pay 20 points to the one that puts the trigger here (as text).