• 0

    posted a message on (SOLVED) Make Unit Only Vulnerable to Damage from Player that Owns It

    So turns out it was really simple, but took a couple more steps. Putting here in case someone else searches for the solution in the future:

     

    Create a 'Buff' behavior.

     

    Edit the behavior's Damage Response...

    - Make sure "Chance" is set to 1

    - Set Modify Fraction to 0

    - Check 'Modify Minimum Damage' (if you don't do this, the unit will still receive 1 damage)

    - Uncheck 'Player' in Target Filters

     

    Put the behavior onto your unit.

    Posted in: Data
  • 0

    posted a message on (SOLVED) Make Unit Only Vulnerable to Damage from Player that Owns It

    Hi, y'all,

     

    This seems like something that may be super simple, but I'm having trouble getting this to work. I want a unit to only be able to take damage from the player that owns it, and not from any other players (Enemy, nor Ally, nor Neutral). This seems like it should be simple using a behavior, but I'm having trouble getting anything to actually work correctly with it using Damage Response. I looked at Modification -> Combat to add 1 to life per damage taken, but I didn't see a way to only apply it if the damage is taken from a non-owner. Is there a good solution using a behavior, or is there a better solution entirely?

     

    Thanks in advance!

    Posted in: Data
  • 0

    posted a message on (SOLVED) Changing Ownership on Spawn

    Thank you! I ended up looking at triggers again based on your suggestion and came up with this:

     

    Events

    ----Unit -Any Unit Enters (Entire map)

     

    Local Variables

    ----Region of Triggering Player = (Region((Start location of player (Triggering player)), 50.0)) <Region> [this is enough range to find the structures but avoid grabbing structures from the other bases]

     

    Conditions

    ----(Owner of (Triggering unit)) != 0 [don't want neutral players grabbing the structures]

    ----(Elapsed time of Game Started Timer) < 0.1 [possibly unnecessary, but I want to make sure no bugs happen and unowned towers get cleared seamlessly with a separate trigger after 0.1 seconds]

     

    Actions

    ----Unit Group -Pick each unit in ([the debris towers] units in Region of Triggering Player owned by player 0 matching (No Value), with at most Any Amount) and do (Actions)

    --------Actions

    ------------Unit -Change onwership of (Picked unit) to player (Triggering player) and Change Color

    Posted in: Data
  • 0

    posted a message on (SOLVED) Changing Ownership on Spawn

    Hi! I'm currently creating a map that has debris towers that block the ramps of the main bases when torn down. However, I want only the player that spawns in a particular main base to be able to destroy the towers in that main base (so opponents can't destroy it). It seems easy enough to do this by having the player that spawns in the main base own the towers in that base, and then only making them targetable/attackable by the owner.

     

    However, I'm running into a roadblock trying to figure out how to assign the towers to the owner. I played with triggers some with no luck (not saying it can't be done), but at the moment I'm trying a Search Area effect approach. I'm trying to give the towers an ability with an effect that searches for a player-owned unit within a certain radius and then uses a behavior to change ownership (looking at Neural Parasite as a reference) to the player permanently and then disable the ability (so it stops casting after a player owns it).

     

    But I'm having a lot of trouble with the details -- I know how to create and assign an ability, I know how to add an effect to the ability, and I know how to add behaviors to effects. The other details I'm having trouble with, like actually making the towers cast the ability and give themselves to the players. Does anyone have any ideas on how to accomplish this? Is this even a correct approach?

     

    (Note: locking player spawns and simply assigning the towers to players 1 and 2 isn't an option because it's a 3-player map with random spawn positions)

     

    Thank you very much in advance!

    Posted in: Data
  • To post a comment, please or register a new account.