| 07-04-2004, 06:05 PM | #1 |
Hey all. I'm making an Aliens vs Predator map, and in the map the preds can use a spell called Disc. This spell naturally throws a disc in the direction chosen, it's based off the TC's shockwave spell. In any case, the preds each have a Predator Disc in their inventories, and can only use the disc spell if they have their disc (Yeah like in the FPS games). So I have a trigger that looks like this: Events: Unit - A unit finishes casting an ability. Conditions: (Ability being cast) equal to Disc Actions: Item - Move (Item carried by (Casting Unit) of type Predator Disc) to (Target point of ability being cast) Player - Disable Disc for (owner of (casting unit)) Looks like it should work to me, and it does, except the disc item always goes to the center of the map instead of where it's targeted. Any help would be great! |
| 07-05-2004, 12:04 AM | #2 |
Theres something about "unit finishes casting an ability" and "target point of ability being cast". I've been led to believe that by the time the "unit finishes casting an ability" event goes off, the engine has "forgotten" the target point. Actually there might be another reason. Shockwave can target both points and units. It may be that you need to add another action that moves the item to "position of target unit of ability being cast" |
| 07-05-2004, 08:41 AM | #3 |
Changing the event to "starts the effect of an ability" should work, but you still have a problem. Shockwave can be ordered to cast right next to the casting unit, and that's where your item would move, even though the spell itself would move much further away. Perhaps it would be easier if you used a unit for the spell: when a pred would cast the disc (which would be a dummy spell, one with no effect), you would remove the item from the pred and create a disc-unit at the position of the pred; the unit would have flying movement, locust, kaboom and immolation abilities. Then you would order the unit to kaboom at the target point of the ability. That would cause the unit to move there (damaging enemies with the modified immolation) and then kill itself (modify kaboom to deal no damage to enemies; we need the unit to kill itself only because we want it to run another trigger when it reaches it's destination). When a disc dies (meaning it reached its destination), create a disc item at that location. |
