So I'm trying to make a unit that when attacks, it doesnt just hit the target, but instead deals splash damage in random point around it. I need it for artillery unit that is suppost to be inaccurate and shoot different place that it should. I'd like not to use triggers because it would get laggy.
you'll use an persistant at the target unit position and then do periodic damage effect with 1 phase with random offset. you can specify 32 offsets in the periodic offset field.
Thank you for quick reply, but would you mind explaining it more to me? I used to be good at such things in warcraft but I'm only beginner in starcraft. Also, I am not sure if that's what I'm looking for. To be clear I want unit to shoot missile at random point around target.
yes, your first effect is a persistant effect at target point. this effect has a launch missile effect at the periodic effect field. the random offset flag is checked. the offset field is filled with random offsets. now the launch missile effect launches a missile from caster to Target point of the launch missile effect (the effect field is the effect itself + target point).
I know this is some months old now, but other players will find it when they search this. Took a minute, used triggers for this and it was very simple:
Unit - Any Unit starts attacking with 1A 105mm Artillery
Catalog - Modify value of Effects 105mmArtilleryInaccuracy PeriodicOffsetArray[0] for player (Owner of (Triggering unit)) using Set and (Combine ((String((Random real between -1.0 and 1.0)) with Any Precision decimal places), ("," + (String((Random real between -1.0 and 1.0)) with Any Precision decimal places))))
http://i.imgur.com/7PQfpVt.png
I basically hooked up the weapon to the P which LM and then D. Persistant has the value PeriodicOffSet, of which I used modified Array0 each time the artillery weapon is fired. Doesn't seem to cause lag, I've tested it with over 200 artillery units. I don't modify Z axis because I don't want shells exploding mid air or underground.
It's not a perfect random at all. The inputs are simplistic and so are the outcomes. It ain't gaussian.
So I'm trying to make a unit that when attacks, it doesnt just hit the target, but instead deals splash damage in random point around it. I need it for artillery unit that is suppost to be inaccurate and shoot different place that it should. I'd like not to use triggers because it would get laggy.
you'll use an persistant at the target unit position and then do periodic damage effect with 1 phase with random offset. you can specify 32 offsets in the periodic offset field.
Thank you for quick reply, but would you mind explaining it more to me? I used to be good at such things in warcraft but I'm only beginner in starcraft. Also, I am not sure if that's what I'm looking for. To be clear I want unit to shoot missile at random point around target.
yes, your first effect is a persistant effect at target point. this effect has a launch missile effect at the periodic effect field. the random offset flag is checked. the offset field is filled with random offsets. now the launch missile effect launches a missile from caster to Target point of the launch missile effect (the effect field is the effect itself + target point).
Thanks, +rep!
I know this is some months old now, but other players will find it when they search this. Took a minute, used triggers for this and it was very simple:
Unit - Any Unit starts attacking with 1A 105mm Artillery Catalog - Modify value of Effects 105mmArtilleryInaccuracy PeriodicOffsetArray[0] for player (Owner of (Triggering unit)) using Set and (Combine ((String((Random real between -1.0 and 1.0)) with Any Precision decimal places), ("," + (String((Random real between -1.0 and 1.0)) with Any Precision decimal places))))
http://i.imgur.com/7PQfpVt.png I basically hooked up the weapon to the P which LM and then D. Persistant has the value PeriodicOffSet, of which I used modified Array0 each time the artillery weapon is fired. Doesn't seem to cause lag, I've tested it with over 200 artillery units. I don't modify Z axis because I don't want shells exploding mid air or underground.
It's not a perfect random at all. The inputs are simplistic and so are the outcomes. It ain't gaussian.