Modifié par gordonbrown82, 06 mars 2010 - 06:43 .
create aoe fireball at impact of projectile (solved)
Débuté par
gordonbrown82
, févr. 26 2010 11:05
#1
Posté 26 février 2010 - 11:05
i have code that makes a bolt or something similar fly from one waypoint and then create an impact event at another endpoint. what kind of code would i need to make this bolt explode and do aoe damage to both the player and enemies in the area?
#2
Posté 27 février 2010 - 06:53
Are you looking for something like this?
object[] arTargets = GetObjectsInShape(OBJECT_TYPE_CREATURE, SHAPE_SPHERE, lTarget, 3.0); '
int nArraySize = GetArraySize(arTargets);
int n;
for (n = 0; n < nArraySize; n++)
{
DamageCreature(arTargets[n], arTargets[n], RandomFloat() * 100.0, DAMAGE_TYPE_FIRE);
}
Modifié par Craig Graff, 05 mars 2010 - 02:29 .
#3
Posté 04 mars 2010 - 05:04
Where does oTargets come from?
#4
Posté 04 mars 2010 - 06:19
gordonbrown82 wrote...
Where does oTargets come from?
It's a typo. It should be arTargets, as defined earlier.
#5
Posté 05 mars 2010 - 11:16
everything works except damaging the creatures inside the aoe. when the player stands inside the aoe a damage of 0 appears above his head.
#6
Posté 05 mars 2010 - 11:27
i did another test just putting the damagecreature function in a trigger and running my pc over it and i got the same result even though i had DamageCreature(oPC, oPC, 100.0, DAMAGE_TYPE_FIRE, TRUE);
these are the include files in the script that contains the DamageCreature function:
#include "wrappers_h"
#include "events_h"
#include "ability_h"
these are the include files in the script that contains the DamageCreature function:
#include "wrappers_h"
#include "events_h"
#include "ability_h"





Retour en haut







