• 0

    posted a message on Issue Ai unit to move to point

    I am not in a location to post a screenshot right now but there are several ways to do this and, it all depends on how you want to do it. one way i would probably do it is like this

    Event: TriggerAddEventUnitRegion( Intended Unit, (Start Region), true)

    Condition: Event unit = Intended Unit

    Action: UnitIssueOrder((EventUnit()), (OrderTargetingPoint(Attack, End point)), c_orderQueueReplace)

    Posted in: Triggers
  • 0

    posted a message on Combining Texts - With line breaks?

    I have a trigger that works like how you seem to want yours here is a section of it.

    SetDialogItemText(Dialog Item 1, (CombineTextMultiple((FixedToText((UnitGetPropertyFixed(Unit 1, c_unitPropLife, c_unitPropCurrent)), c_fixedPrecisionAny)), "/", (FixedToText((UnitGetPropertyFixed(Unit 1, c_unitPropLifeMax, c_unitPropCurrent)), c, (PlayerGroupActive()))

    it shows its hp in a dialog like 169/200 I have somewhere around 13 situations that use this kind of layout and all work just fine. if you need me to explain better just tell me.

    Posted in: Triggers
  • 0

    posted a message on Adding points to a "learn" ability threw triggers

    I just made a map real quick to show an example. as for the [0] it references an array which i find kinda weird because the points field is not one. as to how i found that field entry or any, at least this is how i do it, is in the data editor go into anything that has a tooltip. i tend to use the ones in the buttons tab. open the tooltip like you were going to give it one then find the button that says create formula. in there you search for whatever it is you are trying to get the data for. in this example it would be Abilities, then in the next pull down it would be TestLearn. and finally i scroll down tell i find the field im looking for. then i just hit insert field reference and then copy paste the relevant part.

    Abil,TestLearn,Points[0] is what i would get in my example. and is what i use to fill the first 3 parts of my set catalog value action.

    i think the reason your attempts didnt work is that it looks like you didnt look for the field values you just put in Points[0] which the program wasnt able to tell what Points[0] you wanted to reference.

    hope this helps. Need anymore help let me know.

    Posted in: Triggers
  • 0

    posted a message on Adding points to a "learn" ability threw triggers

    ok the catalog is abilities you got that right.

    Next is entry. that is the ID of the ability. when you double click an ability to change its name its the one just under name. it is what the editor knows the ability as.

    Next is field path. that is the one that should be "Points[0]"

    player is obvious

    and the last one is what you want to set it to. you may need to pull it out as a variable first then add to the variable then put it back in. i know a few fields you have to do that with. and there are a lot of fields that you cant change and if you try you will get an error like the one you got. but i did try the one you want to change and it works. but i just did a quick test so you may need to mess with it a bit to get it right. Also sense you said you never used catalog before let me note that as of this time (heard rumors that it might change in HOTS) the only thing you can use this to change for buff behaviors is duration and requirements.

    Once again if you have any more questions or if i didn't explain something very well then ill try and make it make more sense.

    Posted in: Triggers
  • 0

    posted a message on Adding points to a "learn" ability threw triggers

    After reading your post i did a little testing and found that the "Catalog field value set" action in a trigger allows you to alter the number of points. so I assume you can make a dummy ability to trigger this. Also the field you want is just "Points[0]" hope that helps if you need anymore just post again.

    Posted in: Triggers
  • 0

    posted a message on Issue Ai unit to move to point

    jcraigk is correct. I just wanted to add that this is a good community here so don't be afraid to ask your questions there will always be someone here willing to help. And you should check out this link it has a bunch of tutorials for those just getting started. Tutorials. I found them to be greatly helpful but probably the best thing to do is just go through the editor open up everything and just try something. Learned a lot more from trial and error then any teacher could teach me.

    Posted in: Triggers
  • 0

    posted a message on Issues with Unit Started Attack Event

    Here is basically my trigger

    Event: Unit Starts Attacking (Hero)

    Conditions: Event Unit = Hero (the reason i put this was that when it broke it would cause my trigger to run. with this when it breaks they come up as failed)

    Actions: Run Action Definition

    Basically it updates a dialog that shows how much ammo a weapon has left. The issue is all in the event though. i can replace it with anything else and it works (Just not as accurate).

    Posted in: Triggers
  • 0

    posted a message on Issues with Unit Started Attack Event

    Hey, I have been having issues with the Unit-started-attack event. I have tried it in many different ways to get it to work like i need it to and I have found a way that it works... sorta. the way i have it currently set up is that when one specific unit attacks then it the trigger executes. This seems to work exactly like it should and exactly how i want it to. The problem arises when there are several units attacking at the same time. after around 20-30 units are attacking something the event breaks and then every unit in the map that is attacking causes it to trigger. It tends to cause the trigger to execute a little under 5000 times in a 5 min period which causes a little bit of lag. while its not a serious problem yet it will be long before a match is completed. I was mostly just curious if anyone else experiences the same thing and if anyone knows a way to fix it. I know of a few work arounds that will allow me to do the same thing but they are a lot less accurate and cause small hick-ups in a few other triggers if things line up just right.

    Posted in: Triggers
  • 0

    posted a message on Improve AI to protect whole base [SOLVED]

    glad you solved your issue. i haven't played much with the AI commands mostly because so far all my maps are quite basic when it comes to that. (or i just do it this way cause its what i know) Thanks for posting your trigger i may use it if i end up needing something like what your issue was.

    Posted in: Triggers
  • 0

    posted a message on [Solved] Basic level trigger not working

    I figured it out apparently the trigger cannot pick up the change between level 0 and 1 but it will work for all other levels ie 1-2, 2-3, 3-4 ect. so all i needed to do was change my veterancy so that my levelable units start at level 1 not level 0. i knew it was gonna be a simple little thing because the trigger was too simple to have an error like that. though it makes me wonder why they made it so it cant pick up that level change or if it was unintentional and just got over looked. this does cause a slight issue with how stats are distributed when a level is gained but im glad i had the foresight to write a simple program to track stats cause i knew i would need to change them later for balance. TY everyone for your help. just having a place to voice my problem helped to change how i tackled the issue. i thought of a work around almost imediately after i found the issue but im glad i didnt have to use it cause it would have added a lot of unnessisary trigger usage.

    Posted in: Triggers
  • 0

    posted a message on Improve AI to protect whole base [SOLVED]

    Idk if this is what you are looking for but i made a trigger that when a unit gets attacked all units in a limited range respond and move to the location of the attacked unit. you might be able to adapt it to an area instead of range based or just give you an idea on where to go with it.

    Event: TriggerAddEventUnitAttacked(null)

    Variables: None but depending on what you need it to do you may need some.

    Conditions: i have a few to make sure that it detects who owns the unit being attacked and a few others so it doesn't interfere with other commands IE my taunt ability

    Actions: UnitGroupIssueOrder((UnitGroup(null, "the player that controls the unit attacked goes here", (RegionCircle((UnitGetPosition((EventUnit()))), 12.0)), Excluded: Missile, Dead, Hidden, 0)), (OrderTargetingPoint("attack", 0, (UnitGetPosition((EventUnitTarget()))))), c_orderQueueReplace)

    this is code taken directly from my trigger so you will need to alter it to suet your needs but it should help you get an idea.

    Posted in: Triggers
  • 0

    posted a message on [Solved] Basic level trigger not working

    If you want to see the trigger its self i have it attached. i can't post it online at this time.

    Events: TriggerAddEventUnitGainLevel(Null)

    Local Variables:

    Conditions:

    Actions: PlayerModifyPropertyInt((EventPlayer()), c_playerPropCustom, c_playerPropOperAdd, 1)

    there are no variables and no conditions. and it does not matter what i put into the actions nothing happens. even in the trigger debug window it does not run and fail a condition it acts like the event never takes place. which is why i suspect its somewhere in the event part of the trigger. this trigger worked 5-6 months ago when i originally added it to my map and haven't noticed any issues for several months after that. it only seemed to have issue when i started working on my map again just this month. so maybe something in a patch broke it idk. maybe something got changed that you need to set something up so that the trigger recognizes that a unit has the ability to level up (beyond just giving it veterancy).

    Posted in: Triggers
  • 0

    posted a message on [Solved] Basic level trigger not working

    Hello, so I've been away from editing for a few months and i came back and a very simple trigger i had now does not work and i am unsure why.

    Event: unit gains a level Action: owning player gains 1 custom resource

    the issue is in the event. no matter what the event wont fire when a unit gains a level. this trigger worked a few months ago and i have just been hitting my head against a wall because its so simple i cant seem to figure out why it does not work anymore. any help would be much appreciated.

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