HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Familuars...

07-19-2006, 05:21 AM#1
Sardius
I am looking to create a unit for my hero, a familuar if you will...

But I want it to follow the hero automaticly when you've not issued it any orders, and I also don't want it to be able to stroll too far away from the hero...

In short, basicly a unit the follows you around at all times, except when your not issuing it orders...

Can anyone help?
07-19-2006, 10:02 AM#2
Freakazoid
http://www.wc3campaigns.net/showthread.php?t=83384

Vex!
07-19-2006, 10:35 AM#3
Jacek
ya, or set it to Patrol on you so he will guard you :)
07-19-2006, 04:16 PM#4
Sardius
Well the ward classification is cool, but I don't wanna lose total control of the unit, because I am giving the familuar skills and the ability to level up and invest skill points in the skill...

Basicly I want him to auto follow the hero around, perhaps mimic the heroes commands, like when the hero attacks a target, the familuar attacks the same target, when the hero moves, the unit follows... Pretty much just mimic's the heroes actions in most cases, except when casting their own unique abilities.

So far I've sort of worked this in... But I can't get the follow command right... I have this trigger running

Trigger:
Familuar
Collapse Events
Unit - Peasant 0000 <gen> Is issued an order with no target
Unit - Peasant 0000 <gen> Is issued an order targeting an object
Unit - Peasant 0000 <gen> Is issued an order targeting a point
Collapse Conditions
(Issued order) Equal to (Order(move))
Collapse Actions
Unit - Order Demon Familuar 0005 <gen> to Right-Click Peasant 0000 <gen>

But it only works if I actually click the command "move" not if I just right click on the ground.
07-19-2006, 04:21 PM#5
The)TideHunter(
To be honest, if you want something to happen that specific, i think you would have to do it yourself.
07-19-2006, 04:43 PM#6
Captain Griffen
Smart command is what you are looking for...
07-19-2006, 04:45 PM#7
Sardius
Ok, cool I figured that on, so far this works... I have my familuar attack when my hero attacks and follow my hero when my hero moves... But how can I prevent the familuar from moving away from the hero on their own? Or teleport them back to the hero if they get too far away?
07-19-2006, 05:02 PM#8
Captain Griffen
Got something like that. Take a look at the triggers in this map for the fighters.
Attached Files
File type: w3xSpace.w3x (422.7 KB)
07-20-2006, 12:35 AM#9
Sardius
Is there simply an event or condition trigger along the lines of "if "unit" is further then # range from "unit"

I know there is an event for "if unit is within # range" But I can't find a condition that has to do with range.
07-20-2006, 01:53 AM#10
map-maker
you can check range...either by a boolean or a real value comparison i believe.
07-20-2006, 04:02 AM#11
Sardius
Couldn't find any in either catagory and I looked over them a few times.

I have these triggers setup currently... Can you tell me if this will most likely do what I want my familuar to do? Giving you control of the familiar, but making it so it can never wander to far away from you on its own?? Can you see if there is anything wrong with this trigger? So far I have found that it seems to work fine unless the hero boards a transport ship of some kind... Can you tell me what I'd have to add to make the familiar follow the hero onto a transport and get off the transport when the hero does? and anything else I'm not seeing that might go wrong using these triggers?

Trigger:
Familuar Follow
Collapse Events
Unit - Ranger <gen> Is issued an order targeting an object
Unit - Ranger <gen> Is issued an order targeting a point
Conditions
Collapse Actions
Unit - Order Ranger Familiar 0007 <gen> to Right-Click Ranger <gen>

Trigger:
Familuar Command
Collapse Events
Unit - Ranger Familiar 0007 <gen> Is issued an order with no target
Unit - Ranger Familiar 0007 <gen> Is issued an order targeting a point
Unit - Ranger Familiar 0007 <gen> Is issued an order targeting an object
Collapse Conditions
(Target unit of issued order) Not equal to Ranger <gen>
Collapse Actions
Trigger - Turn off (This trigger)
Wait 6.00 seconds
Unit - Order Ranger Familiar 0007 <gen> to Right-Click Ranger <gen>
Trigger - Turn on (This trigger)
07-22-2006, 08:14 PM#12
Sardius
1.) Can anyone tell me if they notice anything that might go wrong with my above triggers in the previous post? Something unexpected in terms of my familiars orders that would cause some unexpected problems?

2.) Also can someone please tell me how to do an event triggered by a unit being unloaded off a transport? I found an event that occurs when a unit boards a transport, but not for unloading a transport... I can get my familiar to board a transport when my hero does with ease, but I also want him to unload the familiar if the hero gets off the transport. I am also not able to use this trigger if my familiar is onboard a transport and my hero is not...

Trigger:
Call Familiar
Collapse Events
Unit - Paladin 0020 <gen> Finishes casting an ability
Collapse Conditions
(Sword Spirit 0000 <gen> is alive) Equal to True
(Ability being cast) Equal to Call Familiar
Collapse Actions
Unit - Move Sword Spirit 0000 <gen> instantly to ((Position of Paladin 0020 <gen>) offset by (150.00, 0.00))


3.) And finally, I looked again and again and I could find no condition for a unit being "out of # range" of another unit.
07-24-2006, 04:14 AM#13
darkwulfv
well for 3) I beleive you would need like a real check, like
"unit1 distance from unit2 greater than or equal to whatever"
I dunno if this exists, I'm just saying to look there.

for 2) perhaps theres a boolean like
"is unit is loaded into transport" equal to false.
Hope this helps you out some...
07-24-2006, 07:17 PM#14
Sardius
Yah couldn't find any unit range things under "real" or "interger" Basicly what I'd like to do is if the familiar got too far out of range of the hero then it would automaticly return back to him, but yah it doesn't look like a condition exsists for that... Least no where I could find in "real"

Edit: Oh heh, Math: Distance between two points, that may just do it
07-25-2006, 05:00 AM#15
darkwulfv
perhaps... Point 1 = hero, point 2 = familiar. then like if the distance between 2 points is greater than or equal to whatever, do whatever.