• 0

    posted a message on Unit is lowering terrain after being attacked certain other units.

    For people who find this thread in the future and had the same problem:

    I removed the critter explosion event in the unit's actor events tab to fix it. (Since this units actor was based on the utilitybot / automotron critter)

    Posted in: Data
  • 0

    posted a message on Unit is lowering terrain after being attacked certain other units.

    I made a custom unit by copying another unit's unit and actor (Utility bot) I then gave it the baneling suicide explode attack by copying the weapons and effects and other things from the baneling's attack and then linking them appropriately.

    After this unit gets attacked by something like a baneling explosion the terrain underneath it is lowered and when the unit moves the terrain it walks on is also lowered. Ditches in the ground are forming following the unit. This doesn't happen if say a tank shoots it.

    I don't know if there's a value I accidentally changed or if its a bug or what to do to prevent this from happening.

    Thanks for any help or suggestions.

    Posted in: Data
  • 0

    posted a message on Changing Model trough upgrades

    Go to the unit's actor events tab.

    In the Actor Event list right click Add event.

    Msg Type Upgrade
    Source: Your upgrade
    Subname: add

    In the term of the event:

    Msg Type: Modelswap
    Model: your model

    Posted in: Data
  • 0

    posted a message on Getting the AbilityCommand That Created a Unit

    Yes, I have found out how to tell the building to build a marine, marauder, etc through actions. However that way would require a bunch of triggers, one for each building, or a huge wall of if-then-else statements because one would have to know which building it is so the right train order can be issued to it. I guess I will have to do it this way then when it would probably be easier if I knew how to change the order of unit's ability index so that the train commands will be the same for each of them. This is probably more a data editor section question now than a trigger question.

    As always thanks for the help.

    Posted in: Triggers
  • 0

    posted a message on Getting the AbilityCommand That Created a Unit

    ability index

    These are the tabs for a new barracks unit I made in the map. I changed the barracks train ability to index 0 for that unit.

    However ((((Triggering unit) ability 0), 0)) <Ability Command> still does not get me the barracks-train command; I still have to use ((((Triggering unit) ability 3), 0)) <Ability Command>.

    For some reason the index value of the ability in the data editor is lying.

    Also, the index of the regular barracks for the train command is at index 2. And you still have to use ((((Triggering unit) ability 3), 0)) <Ability Command> to get that command.

    The abilities indexes in the data editor and their real values that one would use in the trigger editor do not match up. Is there a way I can make them match up?

    Posted in: Triggers
  • 0

    posted a message on Getting the AbilityCommand That Created a Unit

    For each building I have a train-unit_specific_to_that_building ability and the unit_specific_to_that_building is at index 0 in that ability. Therefor the j in the following will always equal 0: ((((Triggering unit) ability i), j)).

    However all of the buildings have many abilities (some of them left over that I don't need) such as Attack, Barracks-Addons, Queue(5), train-unit_specific_to_that_building, Rally, etc.

    How do I set or change the train-unit_specific_to_that_building ability so it is at the same index for all of the buildings so that I will know what i is equal to in the following: ((((Triggering unit) ability i), j)).

    I thought it was alphabetical order but a few tests using that assumption didn't work.

    Basically how do I rearrange the indexes. Moving them up and down in the Ability tab >> Abilities ability list did not change their index either for me.

    As always thanks for the help.

    Posted in: Triggers
  • 0

    posted a message on Getting the AbilityCommand That Created a Unit

    I am trying to auto-train units from my custom buildings. However, I cannot get the ability from the building using triggers without knowing what index they are at. For example the following will queue up another marine in the barracks the instant it finishes training a marine.

    KeepTraining
        Events
            Unit - Any Unit training progress is Completed
        Local Variables
            abilityVar = ((((Triggering unit) ability 3), 0)) <Ability Command>
        Conditions
        Actions
            Unit - Order (Triggering unit) to (abilityVar) (Replace Existing Orders)
    

    In this line "abilityVar = ((((Triggering unit) ability 3), 0)) <Ability Command>", 3 is the index value the "barracks-train" ability for the barracks unit and 0 is the "train-marine" ability index for the barracks-train command. However, this only works for barracks. If I train a hellion unit from the factory, it will lift off because the lift off ability is at index 3. This seems to be based on alphabetical order but I don't know and I don't know a way to get the train command index for each building. Note: All my custom buildings have their own train command with the unit I want to be trained at 0; However, the index for the linked train unit command is different for most buildings.

    An alternative I am trying is to get train command that trained the unit so I can use it again to train another one. However, I cannot get the following to work because "Ability that created unit" needs the "Unit is Created Event" so is there a way to get the following to work or an alternative to it?

    KeepTraining 3
        Events
            Unit - Any Unit training progress is Completed
        Local Variables
            abilityVar = (((Ability that created unit), 0)) <Ability Command>
        Conditions
        Actions
            Unit - Order (Triggering unit) to (abilityVar) (Replace Existing Orders)
    

    I am open to entirely different suggestions such as data editor or galaxy scripting. Once again thank you all for any help.

    Posted in: Triggers
  • 0

    posted a message on Transferring Data between Maps

    Instead of copying them over one at a time you can copy the entire category (actor, unit, effect, etc) by setting the list so it only shows the custom map dependencies. You then click in the list and select them all with ctrl-a. Then you can copy them all at the same time so you can paste them in the new map in their corresponding categories. My friend is making custom units for me in a different map that have all their own actors, units, effects, behaviors, weapons, etc and copying to my main map from his map like this is working without breaking the links between them.

    Posted in: Data
  • 0

    posted a message on Detecting When Any Building Finishes Upgrading or Morphing

    Thank you I will try that.

    Edit: update

    This is working out better than I had hoped because the build animations are actually working and paying attention to the ability.start and .end events of the morph abilities. Thanks once again.

    Posted in: Triggers
  • 0

    posted a message on Detecting When Any Building Finishes Upgrading or Morphing

    I have many building upgrades and I need to detect when any one finishes its upgrade into a more powerful building. I have searched the forum and have found that I can use this command to detect when a certain building completes an upgrade or morph:

    TriggerAddEventUnitAbility(null, "UpgradeToTower1ToTower2", 0, c_unitAbilStageComplete, false)

    Instead of making a trigger for each and every single upgrade command (I will have over a 150 building upgrades and thus 150 triggers) is there a way to detect when any building finishes uses any morph / upgrade command?

    This is because the cost of the buildings plays a role in determining that players income. When they morph a building they get a percentage of its cost in their income. For example an income starts at 10 minerals / sec. A player builds a 100 mineral building and now their income is 20 gold / sec (10 initial + 10%*100). I know how to do this part with triggers and script because I can get it using "TriggerAddEventUnitConstructProgress(null, c_unitProgressStageComplete)" which also allows me to obtain the player number and building that was build and thus their unit properties.

    Then the player upgrades the building with a 400 mineral upgrade cost. Now their income is 60 gold / sec (20 + 10%*400). Since there is no TriggerAddEventUnitMorphProgress type command I would have to detect each individual upgrade ability thus resulting in all of the 100+ triggers instead of being able to use just one.

    Is there a better way to do this with he trigger editor or using scripting or will I have to make the 100+ triggers to detect each individual building morph? Thanks for any help.

    Posted in: Triggers
  • 0

    posted a message on Castle Fight remake lfm

    I am also currently working on my own castle fight remake. I have the terrain finished and am now making the units and triggers with help from a friend. How close to the original are you making it?

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