• 🏆 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!

Shooting "Spell"

Status
Not open for further replies.
Level 7
Joined
Dec 18, 2008
Messages
400
Hey i need some help to make a spell that shoots bullets.
If you have played Toy Soldiers or Elimination Tournament you know how the attack works and for those who havent it a spell that require you to target where to shoot instead of the ordinary wc3 system.

After reading this you will probally just say "modify shockwave!"
But nooo because the spell im talking about is destroyed if it collide with objects like walls, Barricades and so on. Also it shoots more than just one bullets.

So if anyone could post/link to a tutorial i would be very happy :thumbs_up:
 
Level 13
Joined
Sep 14, 2008
Messages
1,407
Mh I am not sure but i would use a dummy unit (looking like a bullet)
with max movement speed (maybe you have to modify some values to make it as quick as possible)
You make that one move and check if it colides ...

And you have to check whether it comes near an enemie to deal damage
 
Level 7
Joined
Dec 18, 2008
Messages
400
hmm sounds good but do you think i can get i move so fast?

I will test it now

So i tested it but its not that good, i need a better one.
But thanks for trying to help me :D
 
Last edited:
Level 7
Joined
Dec 18, 2008
Messages
400
yeah but i tried it with a unit and it look really bad so i just try to edit shockwav, but i still need help and if anybody else got an idea please post it :)
 
Level 8
Joined
Jun 20, 2004
Messages
229
you need to have a unit for the bullet created when the spell is cast and make the facing angle of the unit face the point clicked. then you need to add the unit to a bullet unit group that will be picked every .01 seconds where it will pick all bullets and move them xx distance while checking if there is any units nearby. basically, if you want to have a lot of bullets on screen at once without lag you will need to use a script moving them via x and y in a function and not locations. then you will need to add a collision detection in the x and y movement function that will check if the terrain path of the x and y of bullet is walkable or not which would take care of barricades etc. how you want to detect if a unit is near the bullet is up to you. you can use jass or just pick all units within 50 distance of bullet and damage them.
 
Status
Not open for further replies.
Top