• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Accuracy of Missile

Status
Not open for further replies.
Level 3
Joined
Jun 27, 2009
Messages
42
Anyone can teach me how to make something, maybe trigger, that make a ranged unit's missile not accurate ? i want the unit's missile to have chance to miss and hit another thing that is beside the target. so its like someone shoot arrow to unit A. but the arrow hit unit B which is beside A.
anyone can help me ? or make the trigger for me ? i am new to all these things :con: pls help :grin: beg uuu:grin::grin:
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
It doesn't need to be a trigger... just change the object data.
Of course, if you really want it to miss completely, you need to trigger it... which isn't the easiest trigger, since you need to keep a few things in mind:
1) large-scale battles have a lot of these units
2) Multiple types of units can have different accuracy/damage
3) You need to detect the damage of each unit (including upgrades, of course).

A way to make the unit able to miss is just like the mortar team can miss (the arrow will shoot in the direction of the unit, but you can dodge it by moving).

(It's a JASS-code, but that's to make it look better ^^ - it's just the object data)

JASS:
Combat - Attack 1 - Area of Effect (Full Damage): 30-60 (your choice)
Combat - Attack 1 - Area of Effect (Full Damage): 30-60 (your choice)
Combat - Attack 1 - Area of Effect (Full Damage): 30-60 (your choice)
Combat - Attack 1 - Damage Factor - Medium: 0.60-1.00 (your choice)
Combat - Attack 1 - Damage Factor - Small: 0.30-1.00 (your choice)
Combat - Attack 1 - Projectile Arc: 0.10-0.40 (your choice)
Combat - Attack 1 - Projectile Speed: 700-1500 (your choice)
Combat - Attack 1 - Weapon Type: Artillery

That's about everything you need... if it's not good enough, I won't create the trigger, that's for sure xD
 
Level 3
Joined
Jun 27, 2009
Messages
42
Thanks alot !!! where to put the scripts ? sorry i am very new to editor.....
is that in object editor ?

another thing, is there any other way to make the missile to be flew away? if shoot like mortars, and the target moved, the arrow will shoot 1 place. i want the accuracy like the rocket barrage (tinker) is there any way to get it ? maybe teach me whre to learn this trigger or anything that can allow me to have this ?
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
It isn't a script, it's all in the object editor (apart from the numbers you need to fill in).

The rocket barrage is an ability and is in fact an AoE attack, it does not react to the rocket hitting a unit, but everyone inside the AoE is hit.
The rocket's model also has this weird... motion, it doesn't move in a straight line, but that's all because it was animated that way.

So basically: it's possible, but you need an entire ranged damage system for it and I haven't seen such a thing yet (perhaps because it can take a while).
 
Level 3
Joined
Jun 27, 2009
Messages
42
oh.... maybe you want to see one of this thing, i played a game, SupCom (Supreme Commander) it's ranged units did what i said =X maybe i can learn from it. but that game uses terraining, so the missile might collide with terrain. but i only need the accuracy, 60 % for all unit is ok
 
Status
Not open for further replies.
Top