Warcraft III resources & community, 2003–2006 · archived

Unit with Range Trigger Help

4 posts
#1

Unit with Range Trigger Help

Hello all,

I have been working on a campaign that utilizes multiple maps that saves and loads a selected char.

I am currently trying to use the Unit within range global trigger in the Event category to point to my last restored char. Ultimately, I want to use this action to cause a stationary mob - which I set to a slower speed (walk effect) to increase its movement rate (run) at the char if the char gets too close.

My prob is that the Unit within Range trigger only lets me select a unit that I have already placed on the map. It seems like an easy fix for Blizz to just go in and make a small coding change to let you select Last Restored or Last Created unit but alas I have tried everything including creating a Variable to assign my char to but nothing seems to work. I believe I have tried every possible Variable type and no Variable seems to pop up when I have to select a unit.

Can someone write a JASS script to allow me to use the Unit within Range Event option and have it to point to the Last Restored unit or Last Created unit? I dont know JASS at all but that seems to be the only possible option I have left.

Thanks for your time and any help you can give me.
#2
Add this action to some trigger and run it. Then you csn use "My trigger" to do what you want. You can select Last created unit from the list with this trigger.

Trigger - Add to (My trigger) the event (Unit - A unit comes within 256.00 of Unit)

===========================
#3
Thanks a ton Maker. I had to tinker with it just slightly but in the end it was a success. Again.. thanks much.

Now.. wonder if you could help me with trying to save items when I change my maps. I have looked at the bag trigger that someone created that allows you to open up a bag and put stuff in the 5 slots but no idea how to assign an item to a variable to store in a game cache. Seems all I can store is a unit, boolean, real, string, and integer. If I could only tie an item to one of those.. I can fix the last hang up on my map.

Thanks for any help or info in advance.
#4
only way storing items is storing a unit that holds items. all the carried items of a unit will be stored automaticaly