| 06-22-2007, 10:18 AM | #1 |
Here is wat i did Create a unit every 0.01 sec , trigger unit to move to target point of ability being cast [can some1 tell me how do i make the unit continiously move towards the direction it was moving before. It stops at the target point of ability being cast at the moment] Every 0.02secs, pick every unit within 80range [except the hero type of unit who cast the spell] and deal dmg to units within 800 range. The created unit has locust. The problem is, if the unit does not hit its intended target , the animation of the unit is still there and i cant seem 2 remove it with remove unit. Also, when i remove locust from the unit, it does not work. I cast the spell as per normal and i dont even see the unit being created. How to do this without locust and how to do it with locust but remove the "unit's animation" when the unit does not collide?At the moment, when it does not collide, the unit just stands there. I rather ask the experts than spend time experimenting cause i still have alot to do on the map. GUI please, this shouldnt be too hard i think. Thanks for any help u may offer |
| 06-22-2007, 01:20 PM | #2 |
I think you should explain yourself better, Ex: What kind of spell are you are trying to create? |
| 06-22-2007, 01:45 PM | #3 |
I think this will be most helpful to you: http://www.wc3campaigns.net/showthread.php?t=93313 . We can't help you until you clearly explain what you are trying to do and what your problem is. |
| 06-22-2007, 03:08 PM | #4 |
Make a trigger with Unit Comes In Range Of Unit event? |
| 06-23-2007, 04:59 AM | #6 |
All right, managed to solve all the problems. I SWEAR LOCUST IS THE MOST FRUSTRATING ABILITY EVER, buggy and i had to experiment so much to get it working properly. Minor problem now. When i cast the the spell at a point on the ground, the locust missle thats created moves to the point on the ground only. How do i make it move continiously in the same direction that it was moving. This means if i cast the spell at 100 distance northwards. The locust unit will move northwards all the way. Currently, it moves only to the 100 distance northwards and stops there |
| 06-23-2007, 05:28 AM | #7 |
create the unit at position of casting unit, make it face in the direction of the cast spells casting point. make it move in facing direction on a periodic timer. |
| 06-23-2007, 08:45 AM | #9 |
| 06-23-2007, 09:42 PM | #11 |
After a few seconds that system will lag out because of the leaks... but you know how to fix it don't you? :) That variable isn't even an array... it's just... one unit. I'm not sure how this could be multi instanceable... Try making "bullet" 'n' stuff an array... |
| 06-23-2007, 10:41 PM | #12 | |
Quote:
hmm so i guess i need 2 make it an array, I am a noob and never used arrays be4, not even sure wat it is lol. Can roughly give me an idea how do i set it to be an array especially with units within range trigger, does that trigger work with arrays? |
| 06-24-2007, 01:58 AM | #13 |
Variables, when you make variables, you can choose to make them "array" or not. Array just means you can have multiples of the same variable at the same time. If you're having 1 bullet per player at a time, then you'd be best doing something like this: Trigger: Else otherwise, do this if you have more than one bullet per player: |
| 06-24-2007, 04:03 AM | #14 | |
Quote:
I dont see how this can work at all. Now picked units will no longer refer to enemy units surrounding the "bullet". Picked units will then refer to the bullet/missle itself. How am i suppose to damage enemy? Currently i am doing this Trigger: Bullet missle 1st
![]() Actions
![]() ![]() Unit - Make (Triggering unit) face (Target point of ability being cast) over 0.00 seconds
![]() ![]() Wait 0.50 seconds
![]() ![]() Unit - Create 1 missle4 for (Triggering player) at (Position of (Triggering unit)) facing (Facing of (Triggering unit)) degrees
![]() ![]() Set bullet[(Integer A)] = (Last created unit)
![]() ![]() Unit Group - Add bullet[(Integer A)] to bulletgroup
![]() ![]() Unit - Make bullet[(Integer A)] face (Facing of (Triggering unit)) over 0.00 seconds
![]() ![]() Trigger - Turn on Bullet missle move <gen>Trigger: and Trigger: Bullet missle damage
![]() Conditions
![]() Actions
![]() ![]() Unit Group - Pick every unit in (Units within 100.00 of (Position of bullet[(Integer A)])) and do (Actions)
![]() ![]() ![]() Loop - Actions
![]() ![]() ![]() ![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)
![]() ![]() ![]() ![]() ![]() If - Conditions
![]() ![]() ![]() ![]() ![]() ![]() (Unit-type of (Picked unit)) Not equal to Tinker
![]() ![]() ![]() ![]() ![]() ![]() (Unit-type of (Picked unit)) Not equal to Air Tinker
![]() ![]() ![]() ![]() ![]() ![]() ((Picked unit) is alive) Equal to True
![]() ![]() ![]() ![]() ![]() ![]() (bullet[(Integer A)] is alive) Equal to True
![]() ![]() ![]() ![]() ![]() Then - Actions
![]() ![]() ![]() ![]() ![]() ![]() Unit - Cause bullet[(Integer A)] to damage (Picked unit), dealing 200.00 damage of attack type Spells and damage type Normal
![]() ![]() ![]() ![]() ![]() ![]() Unit - Create 1 bulletbombmodel for Player 1 (Red) at (Position of bullet[(Integer A)]) facing Default building facing degrees
![]() ![]() ![]() ![]() ![]() ![]() Unit - Make bullet[(Integer A)] Explode on death
![]() ![]() ![]() ![]() ![]() ![]() Unit - Hide bullet[(Integer A)]
![]() ![]() ![]() ![]() ![]() ![]() Unit - Unhide bullet[(Integer A)]
![]() ![]() ![]() ![]() ![]() ![]() Unit - Kill bullet[(Integer A)]
![]() ![]() ![]() ![]() ![]() ![]() Unit - Remove bullet[(Integer A)] from the game
![]() ![]() ![]() ![]() ![]() ![]() Game - Display to (All players) the text: trigger end
![]() ![]() ![]() ![]() ![]() ![]() Else - Actions
![]() ![]() ![]() ![]() ![]() ![]() Do nothingI truly dont understand why it does not work. For the unit array bullet, i set it as 10 arrays. The missle does collide with the target but if i fire 2 missles, only the last missle collides with the target. The first one just flies through it. Its so frustrating. Can please tell me whats wrong with this? Pls tell me |
