Aller au contenu

If placeable hit by specific spell


1 réponse à ce sujet

#1
Guest_dewkl_*

Guest_dewkl_*
  • Guests
1. How can I have a placeable notice if it's hit by a specific spell? If a cone of cold or something else hits it?
I know there's a case EVENT_TYPE_CAST_AT in placeable_core, but it responds to any spell. Edit: It does not it seems, it doesn't respond at all. The placeable will respond to melee attacks but won't generate any output on spell attacks. Maybe it has something to do with my custom spell. Regardless, the option in question 2 is much preferred if it works. 

2. Another idea would be to have the spell itself detect the placeable before it could fire. How do you make it check for a placeable within target (for Cone/Ranged AOE) before firing? 

Modifié par dewkl, 31 mars 2010 - 11:50 .


#2
DavidSims

DavidSims
  • BioWare Employees
  • 196 messages
One thing you could try is making two spells. The first is a fake spell that has no cast animation or projectile. All it does on it's impact is check if there's a placeable near the target area. Then, if there is, it orders the caster to cast the other, real spell that has the projectile and animations and flashy impact VFX. It won't grey out the targeting circle, but you could pop up a message like "no valid target in range" or whatever.



If the player can see the targets, you could make it a single target spell that only works on placeables. In the spell script, in the pending event, check the tag or whatever you use to identify the placeable. If it’s not the right kind of target, pop an error message and fail.