• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

How to make the projectiles go straight ahead?

Status
Not open for further replies.
Level 11
Joined
Dec 5, 2009
Messages
846
How can i make the projectiles of the ranged unit just go straight ahead?

If you have played diablo II you know what i mean. For thoose who doesn't i will try to explain harder.

When a unit fires an arrow against the enemy, the arrow will always hit, if the enemy doesn't got evasion. But it will always go towards the target. Like searching to the target.
But i want it like in IRL. When you fires an arrow it will just go straight forward. And if the enemy moves away from the arrow it wont come after just go straight ahead and miss.

Could someone show me how to do this?

Thank you very much!

Regards Chewii
 
Level 19
Joined
Feb 4, 2009
Messages
1,313
you can do this with the object editor
just disable "target searching" or something like that
for meele attacks there is some kind of attack range buffer
don't know how it works for ranged unit but it might work, too
(or something else will)
edit:
missile has auto homing on default
artilery is what you are looking for
(you will have to find some way to remove the attack ground button though (probably by importing some script into the mpq; the button is very hardcored, it even pushes away the hero lvl button o_O))

of course projectile systems are more flexible but harder to implent

sorry if I got you wrong
did not play diablo for long because of the graphics :p (yeah, I will burn in hell because of that but so I will see it in high res :)
 

Attachments

  • asdf.w3x
    13.1 KB · Views: 45
Last edited:
Level 8
Joined
Sep 17, 2009
Messages
606
hmmm go to the unit you want in the object editor, scroll down intill you find Combat - attack 1 (or 2 if u want also) - project homing enabled and untick it
 
Level 11
Joined
Dec 5, 2009
Messages
846
Take a look at a projectile system.
Jass - GUI

Basically you have to create, move, and destroy the projectile via triggers.

If the thing with Object editor wont work, then I will use the links thanks!


you can do this with the object editor
just disable "target searching" or something like that
for meele attacks there is some kind of attack range buffer
don't know how it works for ranged unit but it might work, too
(or something else will)

of course projectile systems are more flexible but harder to implent

sorry if I got you wrong
did not play diablo for long because of the graphics :p (yeah, I will burn in hell because of that but so I will see it in high res :)

I can't find the ''target searching'' Can you tell me exactly where?

hmmm go to the unit you want in the object editor, scroll down intill you find Combat - attack 1 (or 2 if u want also) - project homing enabled and untick it

ehm.. This doesn't work. Like the archer already got it false from the beginning.
 
Level 17
Joined
Jun 17, 2007
Messages
1,433
Using a projectile system is the only way. Depending on the system you'll also have the ability to slow down unit's projectiles, and overall have more control over them.
--
A map that used to be played a long time ago (The Battle of Troy) had archers that could fire an incredible distance. The visual problem was that while the arrows would appear to miss a moving target the damage was still dealt to the unit.
 
Level 15
Joined
Jul 9, 2008
Messages
1,552
Using a projectile system is the only way. Depending on the system you'll also have the ability to slow down unit's projectiles, and overall have more control over them.
--
A map that used to be played a long time ago (The Battle of Troy) had archers that could fire an incredible distance. The visual problem was that while the arrows would appear to miss a moving target the damage was still dealt to the unit.

some where in the game constance you can set the miss damage default is set to 0.5 i think
 
Level 11
Joined
Dec 5, 2009
Messages
846
Thank you guys very much for trying to help me. I found one interesting system. exactly what i needed. But i just can't make it to work if im making a new trigger exactly copy of the other ones just changed attacking unit to archer.

BTW: The prob is that the projectiles doesn't deal any dmg..

Here's the system http://www.hiveworkshop.com/forums/...prev=search=projectile&d=list&r=20&c=114&t=65

And here's my trigger:

  • MS Init example1 and Read Me Kopieren Copy
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Archer
    • Actions
      • Set MSI_Caster = (Attacking unit)
      • -------- the caster and the damage dealer --------
      • Set MS_TempUnit[0] = (Attacked unit)
      • -------- the temp unit (for the angle) --------
      • -------- ================================ --------
      • Set MSI_Distance = 2000.00
      • -------- the max distance the missile can travel --------
      • Set MSI_Speed = (1000.00 x MS_RefreshRate)
      • -------- the missile speed (converted) --------
      • Set MSI_Damage = 20.00
      • -------- how much damage the missile deal --------
      • Set MSI_CollisionRadius = 60.00
      • -------- the collisions radius --------
      • Set MSI_DamageRad = 100.00
      • -------- the radius of the damage --------
      • Set MSI_SpeedIncraise = 0.00
      • -------- how much the speed will incraised x udg_MS_RefreshRate --------
      • -------- ================================ --------
      • Set MS_LeakPoint[0] = (Position of MSI_Caster)
      • Set MS_LeakPoint[1] = (Position of MS_TempUnit[0])
      • Set MSI_Angle = (Angle from MS_LeakPoint[0] to MS_LeakPoint[1])
      • -------- ================================ --------
      • Set MS_TempReal[5] = 5.00
      • -------- ================================ --------
      • Custom script: if GetUnitType(udg_MS_TempUnit[0]) == 2 then
      • Custom script: set udg_MS_TempReal[6] = GetUnitHeightCylinder(udg_MS_TempUnit[0])/2
      • Custom script: else
      • Custom script: set udg_MS_TempReal[6] = 0.
      • Custom script: endif
      • Custom script: set udg_MS_TempReal[7]=GetLocationZ(udg_MS_LeakPoint[0])-GetLocationZ(udg_MS_LeakPoint[1])
      • -------- ================================ --------
      • Set MS_TempReal[0] = (((Current flying height of MS_TempUnit[0]) + (MS_TempReal[6] - MS_TempReal[7])) - ((Current flying height of MSI_Caster) + MS_TempReal[5]))
      • Set MS_TempReal[1] = (Distance between MS_LeakPoint[0] and MS_LeakPoint[1])
      • Set MSI_ZAngle = (Atan2(MS_TempReal[0], MS_TempReal[1]))
      • -------- ================================ --------
      • Set MSI_MissleModel = Abilities\Weapons\WardenMissile\WardenMissile.mdl
      • Set MSI_MissleDeadModel = Abilities\Weapons\GyroCopter\GyroCopterImpact.mdl
      • -------- ================================ --------
      • Set MS_TempReal[2] = 0.60
      • Custom script: set udg_MS_TempReal[3]=GetLocationZ(udg_MS_LeakPoint[0])
      • Set MS_TempReal[4] = (Current flying height of MSI_Caster)
      • -------- ================================ --------
      • Set MSI_Angle = (MSI_Angle + (Random real number between -3.00 and 3.00))
      • Set MSI_ZAngle = (MSI_ZAngle + (Random real number between -3.00 and 3.00))
      • -------- ================================ --------
      • Trigger - Run MS Run <gen> (ignoring conditions)
      • -------- ================================ --------
      • Custom script: call RemoveLocation (udg_MS_LeakPoint[0])
      • Custom script: call RemoveLocation (udg_MS_LeakPoint[1])
 
Level 11
Joined
Dec 5, 2009
Messages
846
I found one interesting system. exactly what i needed. But i just can't make it to work, if im making a new trigger exactly copy of the other ones and i just changed attacking unit to archer.
The prob is that the projectiles doesn't deal any dmg...

I've posted the system and trigger up there.
It doesn't have to be GUI jass works too. But as far as i can see there's only 1 jass system. And that's not what i want.
 
Status
Not open for further replies.
Top