HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

I need some jass code for this to work...

09-15-2004, 08:22 PM#1
oNdizZ
hmm... here's my prob:
In my map i got some nasty little fellahs called "razorblades", the are so sharp that if you gets to near you will die. now, i've used this event(only event for this thing):
Unit - A unit comes within 50.00 of "the unit"
And the thing is that i can't target the unit i want to target becouse that the unit isn't at the map at the startup (made by triggerz), and i can't target any variable (cant target your hero either; not at the startup too).
So, anyone got any tips for me?

send 'em! (please)
09-15-2004, 08:44 PM#2
bug
Why don't you just use a high damage permanent immolation?
09-15-2004, 10:05 PM#3
Gandalf2349
Or if you want to know how you would have done it with triggers, after he comes within range, order him to attack the unit he is coming near to with his huge attack of 0 damage, then, detect when he attacks, then kill the attacked unit.
09-15-2004, 11:04 PM#4
light_blade
i support bug's idea
09-16-2004, 09:14 AM#5
Cubasis
UMSWE/WeU both have methods for adding events at run-time where you can use variables. It may even be in normal WE. Look under "Trigger".

If it's not there, and you're not in the mood to use UMSWE/WeU, I might look up the Custom Script to add the event.

~Cubasis
09-16-2004, 03:01 PM#6
logik
why not save the unit that is created as a unit variable? then when it goes unit becomes within 80 of [the unit]
09-16-2004, 03:36 PM#7
oNdizZ
Quote:
Originally Posted by logik
why not save the unit that is created as a unit variable? then when it goes unit becomes within 80 of [the unit]


Did you miss the part in my text which told: and i CAN'T use variables. ?
09-16-2004, 03:49 PM#8
CynicalYouth
Cubasis touched on the right idea. The comunity consenus is that for triggers like this you add the event to the trigger after the unit has been created. This will allow you to do what you want. This is the trigger you want, its in the normal world editor under trigger actions, do this right after you create the unit

Code:
Trigger - Add to Your Trigger the event (Unit - A unit comes within 50.00 of (Last created unit))
09-16-2004, 04:00 PM#9
Dead-Inside
Why CAN'T you use variables? Do you suck, don't you want to learn or have to maxed out all the 1024 or whatever variables?
09-16-2004, 04:12 PM#10
CynicalYouth
Variables cant be used with specific unit actions, give it a try, the only way to do it is the way I have described.
09-17-2004, 06:50 PM#11
oNdizZ
Quote:
Originally Posted by Dead-Inside
Why CAN'T you use variables? Do you suck, don't you want to learn or have to maxed out all the 1024 or whatever variables?

what i meant was: that i CANT target the unit, becouse of that its not there(at the map?!), its created my triggerz, and you cant target variables with the event: Unit - A unit comes within 50.00 of "unit"

ok?!
09-17-2004, 09:43 PM#12
Gandalf2349
First off just make a high damage immolation!!

Second:

Code:
Kill the Unit

Events
Conditions
 Unit Type of (Entering Unit) is equal to blade or whatever
Actions
 -Kill varYourUnit

Code:
Create The Unit

Events
 ...
Conditions
 ...
Actions
 ...
 Create your Unit
 Set variable varYourUnit = Last Created Unit
 Trigger - Add Event to Trigger (Kill the Unit) (A Unit Comes within 50.00 of varYourUnit)
 ...

THAT is how its done if your sooo stubborn that you will not use a high damage immolation.

IT WORKS, DON'T TRY TO ARGUE.
09-17-2004, 10:08 PM#13
Guest
Quote:
Originally Posted by Gandalf2349
IT WORKS, DON'T TRY TO ARGUE.

I just checked it it just works fine.
09-17-2004, 10:19 PM#14
Gandalf2349
I don't think there is an easier way to explain this than this:

Zoom (requires log in)

Zoom (requires log in)



JUST USE A HIGH DAMAGE IMMOLATON FOR GOD'S SAKE
Attached Images
File type: jpgaff3.JPG (74.3 KB)
09-18-2004, 08:54 AM#15
oNdizZ
I've already did that gandalf :p