So Im looking to polish my targeting system, and I would like to have some sort of graphical event when the player has a unit targeted. New to the data editor, and was wondering if anyone knew how to attach, lets say the model ACTIVE CRYSTALS to a unit through triggers? The effect im shooting for is to show the player in some easy way that he has that unit targeted. Also, on that same note, wondering if i could somehow either restrict that model to the player doing the targeting, or color it dynamically (for multiplayer targeting, can see it getting confusing if all 4 players are targeting enemies).
@coronbale:
Untitled Trigger 001
Events
Unit - Any Unit acquires a target
Local Variables
Conditions
(Owner of (Triggering unit)) == 1
Actions
Environment - Execute Corruptor - Corruption (Launch Missile) on (Acquired Target) from (Triggering unit)
not sure if this is what you were after, this works when the marine targets another unit, just have to find the effect you like.
continued playing found the active crystals u mentioned.
Untitled Trigger 001
Events
Unit - Any Unit acquires a target
Local Variables
Conditions
(Owner of (Triggering unit)) == 1
Actions
Actor - Attach Active Crystals to Head on (Acquired Target)
working on the code to remove the model when u switch targets now
lmao.. couldnt help but laugh when this one worked.. could be useful for disguise type quests in a rpg perhaps
Untitled Trigger 002
Events
Unit Selection - Any Unit is Selected by player Any Player
Local Variables
Conditions
(Owner of (Triggering unit)) == 1
Actions
Actor - Attach Spore Crawler to Head on (Triggering unit)
Having problems with the removing of the effect on target switch, if the unit dies its no problem, just thinking if you switch targets before one died..
Thanks for looking into this for me, really appreciate it. Gonna play with this too, and ill drop what i have back on here. My reason for this primarily is a tab targeting system, so i know what unit im tabbing to. The way it currently works, is my target unit is actually saved into a variable, so abilities can be used on it through my action bar. Since the unit itself isnt being targeted by the player or the unit, but being stored in a variable, im thinking by event needs to reflect that in some way, but I think you got me on the right path. Off to play with some things :)
Thanks again for trying to be helpful here, and not just trying to rewrite my code with what you think im trying to do.
Actor - Attach Active Crystals to Head on Target Unit[Targeting Player]
Variable - Set Targeting Actor = (Last created actor)
Bacially this creates the crystal, and stores it to a variable. Then when you run it again, it kills the actor on your previous unit, and moves the active crystal model to the next unit in line. This way, each model i select only has the crystals on it, and not the previous. Thanks again for getting me in the right area.
@coronbale:
all good, while i was playing around, found an arrow model, attach it overhead and it points right down at the target, perfect for what u need i think.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
So Im looking to polish my targeting system, and I would like to have some sort of graphical event when the player has a unit targeted. New to the data editor, and was wondering if anyone knew how to attach, lets say the model ACTIVE CRYSTALS to a unit through triggers? The effect im shooting for is to show the player in some easy way that he has that unit targeted. Also, on that same note, wondering if i could somehow either restrict that model to the player doing the targeting, or color it dynamically (for multiplayer targeting, can see it getting confusing if all 4 players are targeting enemies).
@replaywarrior: Go
Thanks for looking into this for me, really appreciate it. Gonna play with this too, and ill drop what i have back on here. My reason for this primarily is a tab targeting system, so i know what unit im tabbing to. The way it currently works, is my target unit is actually saved into a variable, so abilities can be used on it through my action bar. Since the unit itself isnt being targeted by the player or the unit, but being stored in a variable, im thinking by event needs to reflect that in some way, but I think you got me on the right path. Off to play with some things :)
Thanks again for trying to be helpful here, and not just trying to rewrite my code with what you think im trying to do.
@coronbale: Go
Ok, got it 100% now. Here is the line
Actor - Kill actor model Targeting Actor
Actor - Attach Active Crystals to Head on Target Unit[Targeting Player]
Variable - Set Targeting Actor = (Last created actor)
Bacially this creates the crystal, and stores it to a variable. Then when you run it again, it kills the actor on your previous unit, and moves the active crystal model to the next unit in line. This way, each model i select only has the crystals on it, and not the previous. Thanks again for getting me in the right area.