• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] How to make my ability more accurate.

Status
Not open for further replies.
Level 4
Joined
Aug 3, 2008
Messages
58
  • Cast Shoot
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Shoot
    • Actions
      • Unit - Create 1 Wisp for (Owner of (Casting unit)) at (Position of (Casting unit)) facing (Facing of (Casting unit)) degrees
      • Set Bullet[(Player number of (Owner of (Casting unit)))] = (Last created unit)
  • Shoot Effect
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set Loc01[(Integer A)] = ((Position of Bullet[(Integer A)]) offset by 15.00 towards (Facing of Bullet[(Integer A)]) degrees)
          • Unit - Move Bullet[(Integer A)] instantly to Loc01[(Integer A)]
          • Custom script: call RemoveLocation(udg_Loc01[GetForLoopIndexA()])
When the wisp is created, its never directly in front of the caster. its like off to the side next to the caster. In the event that a unit suddenly turns to use the ability, the bullet isnt accurate either. how do i make the bullet thing more accurate?

Also, how do i make it deal damage enemy units?

Thank you very much! :3
 
Level 18
Joined
Mar 13, 2009
Messages
1,411
Makes me think of Elimination Tournament :p

For damage the only thing I can think of is giving the bullet immolation (ugly way D:) or checking the distance between the bullet and enemy units (probably inefficient if you have to check it every 0.01 seconds). Depends on if you want to destroy the bullet if it hits a target (if you wouldn't have it destroyed it would nearly be a shockwave/the bat wave thing, but more accurate if working).

I think the bullets in ET are made with JASS.

GhostWolf is right about the Locust (make sure the bullet doesn't cost food either :p)

And a little thing: the first action got a location leak (but seeing as how you did the trigger you probably already knew that ^^)

This could probably be fixed in a better way, but I don't know how D:
 
Last edited:
Level 4
Joined
Aug 3, 2008
Messages
58
oops forgot to mention that it has locust already.. o.o
i tried immolation, the bullets go to fast so immolation doesn't damage and
i also tried unholy aura changing it so it makes people lose health but it doesnt work well and erg i don't know jass hah

thx though o.o
 
Level 13
Joined
Nov 22, 2006
Messages
1,260
I suggest changing the interval to 0.03, because 0.01 is too small.

Well, every time ShootEffect trigger fires, you can check are there any enemy units around the bullet. I know this would be really inefficient, but stuff like that work best in JASS, because GUI is just to laggy.

oops forgot to mention that it has locust already.. o.o

What? It has locust? Why is it created next to the caster then? This reminds me of the same problem I had....try to do tests with pinging minimap or something...

Uh, like Billy said, you have a nasty leak in the ShootEffect trigger, store the Position of Bullet[(Integer A)] in a point variable, then destroy it afterwards (the same thing you did with Loc01). The reason why it is nasty is because it's leaking a point every 0.01 seconds.
 
Level 18
Joined
Mar 13, 2009
Messages
1,411
Uh, like Billy said, you have a nasty leak in the ShootEffect trigger, store the Position of Bullet[(Integer A)] in a point variable, then destroy it afterwards (the same thing you did with Loc01). The reason why it is nasty is because it's leaking a point every 0.01 seconds.

A nasty one in the second part and a little leak in the first one to be exact.
 
Level 13
Joined
Mar 16, 2008
Messages
941
Try changing it to a flying unti, then it shouldnt have to worry about collisions

#

CreateUnit still checks for collision, although they have locust.
There are two easy possibilities that worked for me:
- movetype flying/none
- after creating the units, setting it's position with SetUnitX/Y since they ignore collision too
 
Level 18
Joined
Mar 13, 2009
Messages
1,411
I have no idea why it gives that problem with the dummy. What spell did you base the Shoot of?

For the damage:
Do you want the bullets to go through units or should it stop on a hit?
 
Status
Not open for further replies.
Top