Eve of the Apocalypse: Twilight

An Aeon of Strife map for Warcraft 3
It is currently November 21st, 2019, 9:40 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Trigger Help
PostPosted: June 28th, 2008, 7:26 pm 
Offline
Visitor
Visitor
User avatar

Joined: January 5th, 2007, 3:50 pm
Posts: 34
Not sure if this should go in off-topic.

How do you make summons follow their summoner? Are you using a follow command? Or more complicated, like calculate when the hero get's too far away and order it to move to the hero? I'm having trouble with my own following summon.

Quote:
Summon
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Summon Water Being
Or - Any (Conditions) are true
Conditions
(Region 001 <gen> contains (Triggering unit)) Equal to True
Actions
Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at (Center of Water <gen>) facing (Position of (Triggering unit))
Unit - Add Summon Water Being (real) to (Last created unit)
Unit - Order (Last created unit) to Human Archmage - Summon Water Elemental
Set WaterBeing = (Summoned unit)
Set NaturesGuardian_Water = (Triggering unit)
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)


Now for the follow.

Quote:
WaterBeing Move
Events
Time - Every 2.00 seconds of game time
Conditions
Actions
Unit - Order WaterBeing to Follow NaturesGuardian_Water


If you have some time Darn Yak, I'd appreciate it if you could help me out. Thanks.

_________________
The Hive Workshop
My Terrain


Top
 Profile  
 
 Post subject: Re: Trigger Help
PostPosted: June 28th, 2008, 10:12 pm 
Offline
Jelly Doughnut
User avatar

Joined: May 27th, 2006, 8:13 am
Posts: 1431
Location: Germany
Try "Distance between points" with the positions of the 2 units. It should return a real.

If it is larger than 300 make it attack move to the caster, if it is larger then 800 make it move to him.

Will leak in GUI though if you dont fix it.

_________________
<EotA@Azeroth> YAKS GO MOOOOOOOOOOOOOOOOOOOOOOOO

Dekar: the ultimate ocean themed hero should buff and depend on spawn waves!
DarnYak: why is that
Dekar: WAVES
Dekar: :D
DarnYak: i was afraid that was the answer


Top
 Profile  
 
 Post subject: Re: Trigger Help
PostPosted: June 29th, 2008, 11:41 am 
Offline
Visitor
Visitor
User avatar

Joined: January 5th, 2007, 3:50 pm
Posts: 34
Dekar wrote:
Try "Distance between points" with the positions of the 2 units. It should return a real.

If it is larger than 300 make it attack move to the caster, if it is larger then 800 make it move to him.

Will leak in GUI though if you dont fix it.

Can't get it to work. Here is what I have.
I even tried moving the triggers that set the variables up to the top. Still won't work.

Quote:
Summon
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Summon Water Being
Or - Any (Conditions) are true
Conditions
(Region 001 <gen> contains (Triggering unit)) Equal to True
Actions
Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at (Random point in Water <gen>) facing (Position of (Triggering unit))
Unit - Add Summon Water Being (real) to (Last created unit)
Unit - Order (Last created unit) to Human Archmage - Summon Water Elemental
Set WaterBeing = (Summoned unit)
Set NaturesGuardian_Water = (Triggering unit)
Set Range = (Distance between (Position of (Summoned unit)) and (Position of (Triggering unit)))
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)


Quote:
WaterBeing Move
Events
Game - Range becomes Equal to 300.00
Conditions
Actions
Unit - Order WaterBeing to Attack-Move To (Position of NaturesGuardian_Water)


Quote:
WaterBeing MoveFarther
Events
Game - Range becomes Equal to 800.00
Conditions
Actions
Unit - Order WaterBeing to Move To (Position of NaturesGuardian_Water)

_________________
The Hive Workshop
My Terrain


Top
 Profile  
 
 Post subject: Re: Trigger Help
PostPosted: June 29th, 2008, 1:29 pm 
Offline
Site Admin
Site Admin
User avatar

Joined: August 12th, 2006, 2:54 pm
Posts: 2363
Alright, you've got the basic concept right but there's some big issues with the triggers. Ignoring memory leak issues, as those should be dealt with after the thing works.

Code:
Conditions
(Ability being cast) Equal to Summon Water Being
Or - Any (Conditions) are true
Conditions
(Region 001 <gen> contains (Triggering unit)) Equal to True


Not sure why youhave an or here, the ability being cast should be sufficient. Unless it should be an AND... I suppose that could explain some of the weirdnessi n the trigger.

Code:
Unit - Order (Last created unit) to Human Archmage - Summon Water Elemental
Set WaterBeing = (Summoned unit)


Suggestion: just create the summoned unit directly with a create unit, and add a summon timer (if nessary). If there's a birth animation problem, just queue that animation up.

Problem: Summoned unit doesn't refer to anything in this trigger. Another event, "A unit spawns a summoned unit" goes off, and in that event it will refer to Summoned Unit properly.

This is the main reason you're entire trigger is being frustrating and unresponsive at the moment.

Code:
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)


You could probably just remove the unit at this point, most spells go off instantly.


Dekar's suggestion is pretty correct for a nicer following unit, but you're understanding of how that works seems abit off.

Code:
Events
Game - Range becomes Equal to 300.00


This might work, but I doubt it and don't like it. Not too familiar with the range trigger and how frequently it goes off. Instead what you want to do, in you're periodic 2 second timer, have an If (Distance between is > 300) then do follow, else (if distance between > 800 then do warp)

DarnYak


Top
 Profile  
 
 Post subject: Re: Trigger Help
PostPosted: June 29th, 2008, 1:35 pm 
Offline
Jelly Doughnut
User avatar

Joined: May 27th, 2006, 8:13 am
Posts: 1431
Location: Germany
"Game - Range becomes Equal to 300.00" O_o wtf is that?

Add a periodical event for the distance check triggers: Every 1 second

Change the distance check to xxx greater than 300/800 instead of equal to.

Merge the 2 distance checks into one trigger:


Events:
Every 1 sec
Actions:
if distance between x y > 300 then attack move
if distance between x y > 800 then move

edit: yak posted at the same time :D

_________________
<EotA@Azeroth> YAKS GO MOOOOOOOOOOOOOOOOOOOOOOOO

Dekar: the ultimate ocean themed hero should buff and depend on spawn waves!
DarnYak: why is that
Dekar: WAVES
Dekar: :D
DarnYak: i was afraid that was the answer


Top
 Profile  
 
 Post subject: Re: Trigger Help
PostPosted: June 30th, 2008, 11:42 pm 
Offline
Visitor
Visitor
User avatar

Joined: January 5th, 2007, 3:50 pm
Posts: 34
Thanks guys, I'll try and fix it up soon.

btw DarnYak, I have the "Or" condition because I was going to make multiple areas that you could spawn the unit. Now that I've thought about it, I have to just summon the unit beside the caster.

_________________
The Hive Workshop
My Terrain


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group