| 07-01-2005, 09:01 PM | #1 |
Okay in my map you need to be able to pick up ammo off the ground, as well as swap with weapons that are on the ground. What is the best way to do this? My current ideas: A) A constant loop using variabled arrays Problem: Lag, Lag, and more Lag. B) Add 'When unit within 100 of unit' to a trigger everytime a weapon is dropped. Problem: Anoying, constantly happening, lag C) Use an ability to detect when a unit is within range, for example Immolation Problem: They spell effect would have to occur, resulting in the recreation of the amoo or weapon unit every time its killed, lag I would rather not use any of these, I have enough lag and loops to deal with already. |
| 07-01-2005, 11:09 PM | #2 | |
Quote:
It came to my mind that you could have all the weapon items be charged, non-perishable items. And so you could use a "Unit - Unit uses an item" event and compare if it's a weapon item being used and if there's any weapons nearby; and if there is, it would switch to that one... Hope you understood what I meant :) (if not i could post a trigger to clear things up) |
| 07-02-2005, 10:00 AM | #3 |
No i think he means like walking over the ammo to pick it up. This is a hard thing to solve. Although as you said with immolation etc, you could use phoenix fire that only attacks the ammo, and when it dies, you add it to its ammo. |
| 07-02-2005, 10:20 AM | #4 |
Maybe you could have the ammo be an immovable unit with short, invisible ranged attacks, dealing zero damage. Then you could use the 'Unit is attacked' event and detect if the attacked unit is a hero or whatever. |
| 07-02-2005, 10:45 AM | #5 |
Actually that is a much better idea. Although you cant have 0 damage, so have -1. (-1 doesnt heal, it just deals no damage) |
| 07-02-2005, 12:14 PM | #6 |
Hmmm I see. Thats quite possible. The only problem is what happens when two people aproach the same weapon? (With my weapon system you choose whether or not to pick up the weapon) Only one person will be given the option to aquire the weapon. |
| 07-02-2005, 12:25 PM | #7 |
For compulsory pick-ups maybe give a powerup the goblin land mine ability, so everytime it is walked over it explodes and you can detect the event (I forgot what it was... unit is attacked should do it). For weapons i guess it's 1st come 1st serve |
| 07-02-2005, 12:33 PM | #8 | |
I like your goblin land mine idea. Quote:
Still open to more ideas though. |
| 07-02-2005, 01:08 PM | #9 | |
Quote:
Maybe you could make it so that everyone who's near the weapon gets the option to aquire the weapon (since you can have units attacking multiple targets), and when someone does pick it up, the option would disappear for everyone else. Shouldn't be too hard doing that I think, but if it won't go with you system, then I think 1st serve might me best. |
| 07-03-2005, 03:40 PM | #10 |
In order to allow a unit to attack multiple units at the same time you need to give it an ability if I remember correctly. Wouldn't that then be the 'effects of an ability' instead of 'unit is attacked?' Just thinking out loud here. |
| 07-03-2005, 04:10 PM | #11 | |
Quote:
There is the Combat - Maximum number of targets on every unit, so I think that should do it...not sure though :) |
| 07-03-2005, 07:39 PM | #12 |
I've tried that on another map once before. It doesnt work, stupid hardcodes. As such I tried editing Barrage however it wont seem to work. It seems to replace the unit with the ability, to a Steam Tank (Barrage) unit. Normally this would be simple to adjust, but it seems I cant change the unit that Barrage changes the original unit to. Maybe I'm missing somthing obvious here, I dont know. However I've tried this 5 times now in the past 2 hours and all my results are null. |
| 07-03-2005, 08:58 PM | #13 | |
Quote:
Change the Combat - Attack type to Missile (bounce) and change the maximum number of targets to some big number and set the Area of Effect (Full damage) to however far you want it to reach...that will do it without using barrage i believe :) |
| 07-04-2005, 03:53 AM | #14 |
Guest | have you tried nashia's special ability?. that allows you to attack multiple units at one shot (shes in campaign |
| 07-04-2005, 10:07 AM | #15 |
I checked and if your refering to the 'Moon Glaive' ability that Naisha has, then your just suggesting the same thing as Therin. Anyway I gave it a try and it seems to work. Good idea Therin. The only problem is that the first attacked unit is 'Unit is attacked' but what about the rest? |
