| 05-04-2004, 04:58 AM | #1 |
I wanna Sacrifice (Pit) that can select any unit, and a Sacrifice (Acolyte) that can select a different building ... can anyone help? P.S. Changing the error messages would be nice ... |
| 05-04-2004, 05:05 AM | #2 |
I think the two abilities need to be used together. You have to set a specific unit type for both abilities. So i guess i can't really help you there. You can change the error messages though. Under gameplay interface is a whole bunch of error strings. Find the one that affects sacrifice and change that to change the error message. |
| 05-04-2004, 08:56 PM | #3 | |
Quote:
Lol, darn. Can I make multiple custom abilities for individual unit combos? (Take any of the four Barracks units, give them "Train Sharpshooter" and "Train Marksman", and leave the needed building blank? Or does the ability rely on who the abilities are given to?) |
| 05-05-2004, 02:27 AM | #4 |
I would just use triggers to do what you're trying to do. Maybe give units a "train at" ability and use if-then-else to decide what to make him into. |
| 05-05-2004, 04:25 AM | #5 |
I agree, this is one situation where overriding the game code is going to be more of a pain than simulating the whole process via triggers. |
| 05-05-2004, 07:02 AM | #6 |
Shall I bar the ability from working unless the unit is one of those I list in the spell? Heheh! Good news! I just need to change the error message(s), Sacrifice will work on any unit/building with the abilities (the Acolyte/Pit) ... however, now I have to change/determine what unit is produced by the training, because I'll have TWO variations both using Sacrifice as the base spell, each one producing a different unit - help, or do I have to trigger that? :( (I'm assuming "replace Shade with unit of choice"?) P.S. I can also change the target units of the base spell to begin with ... |
| 05-05-2004, 10:08 PM | #7 |
Well, you can't give the same unit two or more abilities based of the same one, so you couldn't just give the pit both of the abilities. I would suggest using a trigger to simulate the process, creating a different unit depending on the ability used. |
| 05-06-2004, 12:49 AM | #8 |
I'm in concurrence with Shimrra. The best way, and it seems the only way in your case, is making it based off of triggers. We can help you if you cannot do that on your own. |
| 05-09-2004, 04:30 PM | #9 |
Sorry to revive this topic, but I think I am gonna need this help :( is there a set formula to modifying Sacrifice in this manner, or can y'all teach me? |
| 05-09-2004, 05:30 PM | #10 |
You could try this trigger: Code:
Melee Initialization
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Sacrifice (Sacrificial Pit)
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Target unit of ability being cast)) Equal to Acolyte
Then - Actions
Unit - Change ownership of (Target unit of ability being cast) to Neutral Passive and Retain color
Unit - Order (Target unit of ability being cast) to Move To (Position of (Casting unit))
Wait (((Width of (Region((Position of (Casting unit)), (Position of (Target unit of ability being cast))))) + 1.00) / (Current movement speed of (Target unit of ability being cast))) seconds
Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using Abilities\Spells\Items\TomeOfRetraining\TomeOfRetrainingCaster.mdl
Unit - Change ownership of (Target unit of ability being cast) to Player 1 (Red) and Change color
Unit - Replace (Target unit of ability being cast) with a Shade using The old unit's relative life and mana
Unit - Change ownership of (Target unit of ability being cast) to Player 1 (Red) and Change color
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Target unit of ability being cast)) Equal to Ghoul
Then - Actions
Unit - Change ownership of (Target unit of ability being cast) to Neutral Passive and Retain color
Unit - Order (Target unit of ability being cast) to Move To (Position of (Casting unit))
Wait (((Width of (Region((Position of (Casting unit)), (Position of (Target unit of ability being cast))))) + 1.00) / (Current movement speed of (Target unit of ability being cast))) seconds
Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using Abilities\Spells\Items\TomeOfRetraining\TomeOfRetrainingCaster.mdl
Unit - Change ownership of (Target unit of ability being cast) to Player 1 (Red) and Change color
Unit - Replace (Target unit of ability being cast) with a Abomination using The old unit's relative life and mana
Else - Actions |
| 05-10-2004, 06:39 AM | #11 | |
Quote:
C&Ped the trigger, but how is the above done? I can't find "position of unit" as a usable region ... (I'm using this system in modified form; I want the ability to work just like Sacrifice normally does [you can cancel training, units can be ordered to do something else, et al], so I don't want the Neutral Passive change, and it's for a mod, not for a single map, so instead of Player 1 it's for "owner of casting unit") Moreover, I want this to work both ways, with the unit as the caster as well. Each of the "chosen" units will have both variants of Sacrifice (Acolyte), while the Pit shall have both variants of Sacrifice (Sacrificial Pit). |
| 05-10-2004, 08:45 PM | #12 |
OK, first, for the unit Sacrifice ability, just make another trigger that says: Unit begins casting ability Ability equal to Sacrifice (Unit) And then do the same thing, except switch casting unit and target of ability being cast. Now the second part is a wierd little function I discovered that should wait until the unit moves to the Sacrificial Pit. The function can be gained by following these steps: 1) Go Arithmatic 2) Width of Region 3) Conversion - Convert Points to Region 4) Set the two point values that appear to 'Unit Location of' casting and target of ability being cast 5) Press OK until you get back to the arithmatic part 6) Change the + to a / 7) Change the 1 to Unit - Movements Speed of Unit (Current) (Taget of Ability being Cast) |
| 05-11-2004, 06:59 AM | #13 |
Gwargh, it's not working ... I yield and give you full spoilers! Specific units in need of change: Rifleman, SAW Gunner, Engineer, Medic Building where they go: Sniper School What they become: Sniper, Designated Marksman User Interface: Two separate "unit sacrifice" icons on each of the four trainee units' menus, two separate "building sacrifice" icons on each Sniper School. I need for any of those four trainee units to be sacrificeable into any of those two Sniper School units :\ (With both the unit and the building initiating the ability, the units simply became Shades as normal.) |
| 05-11-2004, 07:17 AM | #14 |
I have a different approach for you to consider. Write a trigger like this: Code:
Event:
Unit begins casting an ability
Conditions:
Unit type of target unit of ability being used = sniper school
Actions:
If- Conditions:
Abilty being used = Train to sniper
Then:
Replace casting unit with sniper
Else:
Do nothing
If- Conditions:
Abilty being used = Train to marksman
Then:
Replace casting unit with Marksman
Else:
Do nothingThe "Train to..." Spells are dummy spells that can be based on any unit-targeting spells (just make sure you use a different one for each). OH and make the range of the train to spells pretty short, like 200. And frankly, i don't understand why you have to be so secretive about it, Battle Realms with it's trained/upgraded units came out plenty of time ago. |
| 05-11-2004, 01:53 PM | #15 |
thnx th15; it looks good, but I need it to work like Sacrifice for balance reasons, so I'm gonna hafta pass ... P.S. I posted exactly what I needed because even the test map failed to get the trigger(s) working. |
