• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Unit just revived (or used Reincarnation) - Move To Point

Status
Not open for further replies.
Level 5
Joined
Nov 14, 2004
Messages
159
I seem not able to find way to make unit do Move To end-goal region after when they come back alive with Reincarnation ability without attacking nearby towers (for my Maul map).

I have tried all the "ability" event, and ability equal to Reincarnation. They all didn't work. Once they get reincarnated, they attack nearby tower and walk back to the spot where they revived.

Code:
revived creeps
    Events
        Unit - A unit *all events with ability*
    Conditions
        (Ability being cast) Equal to Reincarnation (Wisp Lvl 30)
    Actions
        If ((Owner of (Triggering unit)) Equal to Player 7 (Green)) then do (Unit - Order (Triggering unit) to Move To (Center of endleft <gen>)) else do (Do nothing)
 
Level 4
Joined
Aug 11, 2005
Messages
101
Event: Every 1 second of game time
Conditions:
Actions: Pick all units in units in (playable map area) belonging to (*creep player*) and do
loop - actions
order picked unit to move to center of goal<gen>

that will remove any antistuck things also...you can make the periodic event a larger or shorter amount of time.
 
Level 5
Joined
Nov 14, 2004
Messages
159
I rather not do that periodic and pick all units thing because there's going to be 280 units on screen. I already have the anti-stuck trigger, where unit haven't been killed for a while, and trigger it up (it does the pick all unit, but it's less units there)

Any way to make it just respond to event unit just used recarnation? (so it won't be lagfest)
 
Level 4
Joined
Aug 11, 2005
Messages
101
not that i know of...you can always make a pseudo reincarnation via triggers...just make a trigger saying the unit dies and check to see if he has the ability reincarnation if so than just create a new one and order it to move..
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Time for some reasonanable answers.
Rencanate DOES NOT fire any even since it is neithor an active spell nor a full reival.
You can check for rencanate by once a unit dies creating a timer and geting it to check every sec for 10 secs if the unit's hp go above 0.

If so then do your move actions.

Code:
Event: Every 1 second of game time 
Conditions: 
Actions: Pick all units in units in (playable map area) belonging to (*creep player*) and do 
loop - actions 
order picked unit to move to center of goal<gen>

ARE YOU MAD!!!!!!
That will lag the game to pieces in under 2 minutes with leakage!
Never create something like this in GUI if you want your map to be playable.
 
Level 9
Joined
Sep 8, 2004
Messages
633
Well, you can pick units safely, just as long as you tell the game to the destroy the group made afterwise, else it will indeed cause memory leaks and break up your game after a while.
Code:
Custom Script: Set bj_WantDestroyGroup = true
Put the above custom script above every unit group creation (including, but not exclusively (unit group - pick every units in x) for instance)
 
Level 2
Joined
Jan 27, 2006
Messages
10
Event
Unit dies
Condition
Unit has Reincarnation
Actions
Wait Bla Seconds
Order Dying Unit to move to Bla<gen>

seems simple enough...
or(since the wait action will be bad)
Event
Unit dies
Condition
Dying unit has Reincarnation
Actions:
Add unit to Bla Group
Remove unit fomr Living Group
Remove Reincarnation from Dying unit
Wait Bla Seconds
Run Bla Trigger ignoring all conditions

Bla Trigger:

Pick every unit in Bla Group
order picked unit to move to Bla<gen>


Im not too sure about the lagg in this... so dont ask me or tell me im mad :p

EDIT: due to the large amount of units dying you might want to only turn this trigger on during the reincarnation waves
 
Level 5
Joined
Nov 14, 2004
Messages
159
Did you even tried that? it look like you typed it out of your head. When you go into "ability comparision".. only thing it has is "ability being cast - equal to - (ability)." and I don't think when unit has recarnination skill actual count as "died."

I can't even put "general unit becomes 0 HP" in event.

I had different idea to revive creep and move to point, but it will take alot of "wait", I'm holding it for last resort.

Help me out.
 
Level 5
Joined
Nov 14, 2004
Messages
159
Ok, I went ahead using the last resort method. It's like this:

Code:
Wisp Unit Died
    Events
        Unit - A unit Dies
    Conditions
        (Unit-type of (Triggering unit)) Equal to The Endless (LV 30)
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Triggering unit)) Equal to Player 7 (Green)
            Then - Actions
                Wait 5.00 seconds
                Unit - Create 1 The Endless (LV 30) for Player 7 (Green) at (Position of (Triggering unit)) facing Default building facing degrees
                Special Effect - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Items\TomeOfRetraining\TomeOfRetrainingCaster.mdl
                Unit - Order (Last created unit) to Move To (Center of endleft <gen>)
            Else - Actions
                Wait 5.00 seconds
                Unit - Create 1 The Endless (LV 30) for Player 1 (Red) at (Position of (Triggering unit)) facing Default building facing degrees
                Special Effect - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Items\TomeOfRetraining\TomeOfRetrainingCaster.mdl
                Unit - Order (Last created unit) to Move To (Center of endright <gen>)
        Set stuckwait = 20
        Unit - Remove (Triggering unit) from the game
        Special Effect - Destroy (Last created special effect)

Unless if anyone know way to make no "Wait".
 
Level 2
Joined
Jan 27, 2006
Messages
10
sorry my bad, i thought there was an ability comparison in the Boolean thingy, but no

here is my idea: make a caster cast a spell that gives a buff at the start of the wave, use the unit has buff boolean as a comparison and do revive unit with no wait
or add the unit at the start of the wave to a unit group, and when it dies remove it from the group
eg
Beginning Trigger:
Either: Order Caster to cast Human- Mountain King Thunder Clap (or something like that)
or: Pick every unit in (Playable Map) and do, add picked unit to unit Group wispALIVE

Death Trigger
A unit dies

EITHER: Dying unit has buff (buffname)
OR: Dying unit is in unit group wispALIVE
(both of these are boolean comparisons)

Revive Dyng Unit
Remove Dyng Unit from Unit Group wispALIVE (or dont, if you didnt use that)
Order Dyng Unit to move to End<gen>

Object Editor Data:
Caster Revive Spell: Range 9999999999999999999999999
Effect: Speed -0.00, Attack-0.00
Targets: Allies

Revive Buff: Bla Bla Bla

that should fix your problem i think (i didnt actually LOOK at anything, the thzunder clap spell may not be able to target allies and thus be inadequate)

hope it helps :p
 
Status
Not open for further replies.
Top