• 0

    posted a message on How do I detect target unit of an attack command?

    @DeltaV: Go

    My bad, you are right.

    I used "Position of Unit "UnitCount" in (Unit Group which Allied Units belong to)" and I cycle through each unit using a while condition using the "UnitCount" variable to order each unit inside the allied units group.

    So that's what Index means, thanks a ton for the explanation.

    Update on my problem, the condition seems to be as you said, perfect for what I intended. The problem was the action I set up (I merely copy pasted my attack action (Which used the order to attack any unit in the "Enemies" group of the allied unit which was closest to the unit). What I needed was an issue order for the target of the order of the player's units (Which are attacking the rocks, therefore the allies attack the rocks).

    It's amazing how simple the mistake was, thanks for the index lesson DeltaV. Stay awesome. [My problem is fixed btw]

    Posted in: Triggers
  • 0

    posted a message on How do I detect target unit of an attack command?

    In my trigger I want to issue an attack order to all allied units near the player if the player's units are attacking rocks (So they are helping out).

    I used a a condition: Unit Type of (Target Unit for ((Closest Unit to (Position of Unit in (Unit Group which Allied Units belong to)) in (Unit Group which Player's Units belong to) order at index 0))) == Rocks - Ex1 - 6x6

    Basically orders the allies to attack the target of the player's units IF said target is the correct type (In this case Rocks - Ex1 - 6x6).

    But the trigger doesn't work, and I am certain it has to do with index, the only lead on this I found was on the mapster website which said that index refers to the list in default buttons which says that it starts at 0, since the "attack" command only has one button I used Index 0 which is the first index. And it didn't work (Now I'm lost).

    How do order indexes work?

    Posted in: Triggers
  • 0

    posted a message on Player must not see his units

    I see what you mean about complex behavior through effects (Those examples are spot on, I actually understood them). Complex effect setups in data sounds scary as hell to implement (I'll have to keep reading tutorials on those and learn steadily to avoid burn out).

    Using few triggers I was able to script a basic system which I believe satisfies what I want the "minions" to do (It basically makes them attack the closest valid enemy (Literally). My mind is incredibly trigger focused (Because of my previous map editor experience with another game which had no "data" aspect.

    Seems that making an imitation of my Trigger Hostility Setup through data might be very hectic and convoluted attempt (I'd have to create an aggro buff for every player if what I am thinking is correct. This probably because I am using the "While" function HEAVILY on my map to cover all 14 players with ease (It was initially a humble 6 player map, until I came across the dark arts and found out I could force a player to hit / kill himself through triggers and figured I could squeeze in more players just for kicks).

    After writing that first paragraph I am now brainstorming about a data / effect system (In which ALL units have Behavior X) where ONLY units OWNED by player 0 search for any unit who's Behavior X's source player does not match the caster's (If Unit A's Behavior X's source player [Player 1] sees a unit who's Behavior X's source player is not player 1, he will attack it if it is the closest unit one who meets the criteria.

    Is the previous paragraph possible (And practical for a newbie to implement)?

    P.S. Thanks for the large detailed posts, they are really useful.

    Posted in: Data
  • 0

    posted a message on Player must not see his units

    I'd prefer it if players didn't know where these monsters are (Already fixed this by making Player 0 own all minions, using 1 variable array and 2 triggers to script minion attack behavior, I no longer need to worry about vision).

    I currently plan to make my game a Free For All (You Vs Everyone, 1 player per team)

    I am having trouble understanding the third paragraph. I do know I can define buff sources in triggers (From either a player or a unit). The thing where I get lost is:

    -Giving Minions to Hostile (Player 15), wouldn't that cause them to attack the player they should consider an ally?

    -You can define alliances for a single unit using some sort of "aura search", or is it an area search?

    -How do you refer to the source in a data effect? (In this case some sort of Buff behavior launches an Area Search Effect?, how does the Area Search Effect use the source of the behavior?

    I am super bad with data, so this sounds like a good thing to learn.

    Posted in: Data
  • 0

    posted a message on Creating Units Error
    Quote from SoulTaker916: Go

    Test ur condition by outputting text messages if ur unsure.

    ur probably doing nothing wrong, its hard to stop a unit from attacking a target once its acquired it. its a bit of a delima.

    I feel pretty dumb right now, it struck me (Hit me) when I used your text message test.

    I made a simple mistake, apparently I had two triggers which caused minions neutral monsters to aggro enemies, I had one in a general hostility trigger, but I had a second one in their movement / follow the player trigger as well (Which I had forgotten about and didn't add the cliff condition to).

    Both these issue attack order functions now have the cliff condition and they work perfectly.

    Quote from BasharTeg: Go

    @SoulTaker916: Go

    Well, you could remove the unit's weapon or stun the unit.

    Thanks for the support Basharteg. Right now my triggers work perfectly as intended (Units are now only issued an attack order when the attack target is valid, so I don't need to do force them to act nice. Sorry for being so nooby ;p

    Posted in: Triggers
  • 0

    posted a message on Creating Units Error

    @BasharTeg: Go

    I'm sorry, I screwed up.

    I used the condition (Ground height at (Position of (Unit that should Attack)) = ((Ground height at (Position of (Unit that that first unit should attack)), this condition must be true for the first unit to attack the second unit.

    But the first unit still keeps trying to attack units on different cliff levels. What am I doing wrong? (Are you SUPER SURE this condition doesn't check for actual terrain elevation height instead of cliff levels? I want units to only attack units on the same cliff level (Because I have cliffs with no ramps)

    Posted in: Triggers
  • 0

    posted a message on Creating Units Error

    So you can check a unit's height but not a unit's cliff level?

    Posted in: Triggers
  • 0

    posted a message on Creating Units Error

    Uh Oh, new problem (I am just so annoying aren't I?).

    I want to order a unit to attack a unit from a certain unit group ONLY when they are on the same cliff level (Because without this condition, he tries to attack units that are on a nonreachable cliff and ends up glued to the cliff doing nothing).

    But when I compare the cliff level of the position of the unit I want to be the attacker and the cliff level of the position of the unit I want to make the target of the attack (Cliff Level of (Position of (Unit A))) = (Cliff Level of (Position of (Unit B))), the unit doesn't attack enemies that share the same cliff level with him either (I am manually making units attack each other using triggers since SC2 doesn't allow enough player space).

    Does cliff level actually compare elevation and not the cliff the units are in?

    Posted in: Triggers
  • 0

    posted a message on Creating Units Error

    Thanks a lot, this worked perfectly (Just the function I needed), I just have one question out of curiosity.

    Your setup worked for me when I used Wait 0.0 seconds (Which I don't mind), but why does it not work without Wait 0.0, does Wait 0.0 actually wait a minuscule amount of time instead of none?

    Posted in: Triggers
  • 0

    posted a message on Creating Units Error

    In my map I am getting a lot of errors messages related to triggers that create units (Something about invalid position).

    My maps has a lot of cliffs (The bottom ones and the higher ones) and my triggers spawn units at random coordinates away from the player's unit's position. My guess is that the game is trying to create them at places where units can't be placed, so I was wondering how I can get some kind of condition where the triggers can check whether or not the area is viable for creating units there (Obviously you can't place units on the bottom cliff level, but I have no way of identifying unit creation point viability using triggers).

    My spawning points need to remain random and to depend on the position of player units, so this is the only solution I think would work for me. Help please.

    Posted in: Triggers
  • 0

    posted a message on Player must not see his units
    Quote from hobbidude: Go

    Are you talking about like in the campaign where the player comes across stray units that become his; this is just done with neutral units that then change ownership when you approach.

    Again why do they even have to be his units when he's not even able to see or intentionally control them.

    No, I'll try to explain as clearly as possible since I am doing something complicated. In my 14 player map, I want players to control a small amount of monster units (Zergs and Critters) to gather food (Bio Mass) to grow their small pack in number and gain upgrade points. But I also want the map to have a lot of monsters and try to simulate a mini ecosystem (Badly designed by your truly). Players will have their monsters all over the map, but they will act independently of the player except for a few units which are stronger and under the player's control (A more of an RPGish, micro type gameplay), the other weaker monsters would be killing fodder and food sources for other players (Monster leave "meat" behind when they die) and would attack certain objectives automatically when they come up (And have each player have these types of monsters all around the map). I wanted these monsters to share the same alliances as the player who the monsters are friendly to so I figured I might make the monsters belong to the player so I don't have to setup who they are hostile towards using triggers (Since I ran out of player space).

    TL'DR (I ramble a lot to the point where nothing makes sense), each player has personal minions like in a MOBA (He can't control them, but they help him) and these minions don't run around in lanes, they just hang out in a random part of the map and follow the player if the player finds them. They are weaker and have energy (Units lose energy when moving/attacking) so they stop following if they are low on energy (Players can't raise huge armies over time).

    It's my first map so I'm experimenting/screwing around more than I probably should, sorry for not being clear on what I wanted to do.

    Quote from caparosmith: Go

    @wisesquirrel: Go

    You can only do this if you create the unit for the neutral player or some other computer player. The player's own units will always be visible to the player no matter what.

    Thanks for the response caparosmith, I was afraid this might be the case, luckily I think I can apply my "[Same Player] Unit Group Self Hostility Demo" which allows units from the same player attack each other using unit groups (I use a periodic event trigger which counts every unit (Main) in a unit group, looks for nearby valid units from another unit group which I deem hostile and order it to attack the unit in such unit group who's position is closest to the position of the unit (Main). I'm afraid it might contribute lag to my map, but now that I know it is impossible to deshare vision of a player's own units, I think this is the only route I can take.

    Posted in: Data
  • 0

    posted a message on Player must not see his units

    These units belong to the player. But in the game the player never knows he controls these units (They are his allies). The player gets to see and control units in another unit group.

    I am not trolling at all, I can even show you the map if you are not convinced. Thanks for the trigger description tip, I'll read them next time I have problems.

    But I still really need help in finding out how to take away vision of a player from certain units he owns. (I swear I'm not trolling)

    Here's my map, for testing purposes I have revealed a good part of it so I can see what is going on when testing triggers/data changes.

    It currently has a setup where these "minion units" are summoned in areas which are a distance away from the player they belong to (They are not meant to be "his" units, those are allied monsters of his species which do not attack him, and follow him if the players' active units (The ones he can control and see) come near the minions.

    The triggers for the minion units are under Extra > Demos > MinionMonsterDemo folders. I gave them a behavior which makes them uncommandable, and I will also eventually also make them weaker than active player units, since I want to have a lot of them but don't want them to overpower players' active units.

    Posted in: Data
  • 0

    posted a message on Charged ability starting with max charges

    @Grasshopper721: Go

    So you want to display a number of charges (Tiems you have used abilities B and Beyond) on Ability A, and these charges reset when you have 5 charges and gain a charge. These charges only interact with abilities B and Beyond while the display text is on Ability A's button.

    Would changing Ability's A tooltip using Triggers (The Set Catalog Action, for Ability A's Button's Tooltip field) to display the number of charges you have for abilities B and Beyond work for what you want to achieve? (These are not actual charges from data, just made up variables you calculate through triggers by using the ability is cast event)

    if this works for you then the cooldown reset thing would be a piece of cake.

    You probably noticed I'm trying to avoid using the data editor's charges altogether, that's because I am no good there. If this method sounds like it could work, that's nice, but if you really want to use the data charges you'll probably have to wait for someone else to come by.

    Posted in: Data
  • 0

    posted a message on Player must not see his units

    I have made zero advances in using the data editor to take away player vision from certain units.

    In the trigger editor using "Unshare Vision of Unit" doesn't work if the player owns the unit (What's the purpose of this useless action I wonder?)

    If I use Unshare Vision of Player 1 with Player 1, player 1 no longer sees his units, and if I then use share vision of unit (The particular unit I want him to see) the game doesn't share vision of this unit because apparently Player 1 Can't see what he should be able to see (So it is a global function sorta). So this method doesn't work either.

    This means I also can't Unshare Vision of the Player and share the vision of the next player to him because even if the player has vision shared with the next player he can't see because he can't see what he sees (The idea is to Unshare Vision of Player 1 towards Player 1 and then Share Vision of Player 1 towards Player 2 and then sharing vision of the units player 1 should see with Player 2 (Since Player 1 can see what player two does but can't see what Player 1 sees), but since Player 1 can't see what player 1 sees, even if Player 1 can see what player 2 sees, player 1 can't see what player 1 sees to begin with, meaning he can't see what player 2 sees.

    I am between a rock and a hard place. I'm so bad at this.

    God I wish I wasn't so bad at map making, I can't even figure out something as simple as how to disable unit vision sharing with controlling player D;

    Posted in: Data
  • 0

    posted a message on Charged ability starting with max charges
    Quote from Grasshopper721: Go

    One ability is an active reset all cooldowns (this works) it also gains 1 charge whenever any of the other abilities are used. When it has 5 charges, the next ability to be used doesn't trigger it's cooldown.

    So this ability (Ability A) that resets the cooldowns for all other abilities (Abilities B and Beyond) is automatically cast when you have used abilities B and Beyond 5 times and causes the Ability (From Abilities B and Beyond) used for the fifth cast to have a cooldown of zero seconds (Doesn't have a cooldown for that cast)?

    To me it sounds like ability A is a passive ability since it is automatically triggered by the cast of Ability B or some other ability, or did you mean it becomes available to use as an active ability once it has 5 charges?

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