|
|
#1 |
|
User
|
Anyone know how I could make a spell that explodes a unit when it touches an enemy? I was thinking about the goblin land mines ability I just dont know how to add that to a unit...
thanks in advance Last edited by botanic : 03-18-2007 at 03:53 AM. |
|
|
|
| Sponsored Links - Login to hide this ad! |
|
|
|
|
#2 |
|
User
Join Date: Mar 2006
Posts: 321
|
Wait wait wait, what are you talking about?
__________________So let me get this straight. You need a spell like Goblin Land Mine but you DON'T KNOW HOW TO ADD IT TO A UNIT. Ok, your helplessness inspires my curiosity. Are you using ROC or TFT? I'm pretty sure either one would work, though with possibly GAY effects in ROC. First of all, you should go to the G section of Abilities/Units. Or items. Then find Goblin Land Mines. Or perhaps Item Goblin Land Mines in item section. Then, right around the top of any unit in the OBJECT editor, there should be a field like Ability - Normal. Add. If you're using TFT, I suggest making a custom ability off of Goblin Land Mines. ...Ok screw that, I now understand your question. I'm pretty sure, that the answer is NO. Basing a unit off of the Goblin Land Mine and basing an ability off of LAYING Goblin Land Mines is your best bet. Besides triggers that check every single second if a unit is in the radius of a mine. NO. That would be gay. So yeah, two answers. Each for seperate situations. Useless. o.O |
|
|
|
|
|
#3 |
|
Lackadaisically Absent.
Respected User
|
You'd need to use the "A unit comes within range of unit" event, but in GUI it would get all wonky-jod.
__________________A JASS version could work fine, though. |
|
|
|
|
|
#4 |
|
User
|
is there any way that someone could post something in jass then that I could use or at least so that I can go in the right direction I don't know jass very well
|
|
|
|
|
|
#5 |
|
CUSTOM USER TITLE!!!!!!!!
|
Just do:
__________________Every .2 seconds Pick all units in range of (Your unit) and do If unit is (whatever conditions u wnat) Then do Unit - Explode picked unit |
|
|
|
|
|
#6 |
|
User
Join Date: Mar 2006
Posts: 321
|
Not MUI?
__________________ |
|
|
|
|
|
#7 |
|
User
Join Date: Jul 2004
Posts: 526
![]()
|
then just do another group loop and use picked unit instead of (Your unit)?
__________________ |
|
|
|
|
|
#8 |
|
User
Join Date: Mar 2007
Posts: 5
|
Code:
explode
Events
Unit - A unit comes within 200.00 of YourUnit <gen>
Conditions
Actions
Unit - Explode (Triggering unit) |
|
|
|
|
|
#9 |
|
Lackadaisically Absent.
Respected User
|
This should work; just change the range to change how close a unit must be to explode. If you're not using unit-types, set TempGroup[1] to units with a specific buff, instead.
__________________Last edited by Pyrogasm : 03-18-2007 at 08:47 PM. |
|
|
|
|
|
#10 |
|
User
|
Ok this is what I have for the spell so far I just need to add in the exploding part... Can someone help with that please ^.^ I used the mirror image as a base for this spell. All the images will move away from the caster. What I would prefer is if they explode when they stop moving (hit a tree or whatever) however hitting a unit is fine.
__________________Trigger: Mirror Image Explode![]() Actions![]() ![]() Set MS_Trigger_unit = (Casting unit)![]() ![]() Set MS_Group = (Units within 10000.00 of MS_Trigger_unit_loc matching ((Owner of (Matching unit)) Equal to (Owner of MS_Trigger_unit)))![]() ![]() Wait 0.10 seconds![]() ![]() Trigger - Turn on Mirror Image Explode Copy <gen>![]() ![]() Wait ((Real((Level of Deadly [H]allucinations for MS_Trigger_unit))) x 15.00) game-time seconds![]() ![]() Custom script: call DestroyGroup(udg_MS_Group)![]() ![]() Trigger - Turn off Mirror Image Explode Copy <gen>Trigger: Mirror Image Explode Copy![]() Conditions![]() Actions![]() ![]() Set MS_Trigger_unit_loc = (Position of MS_Trigger_unit)![]() ![]() Set MS_Group = (Units within 10000.00 of MS_Trigger_unit_loc matching ((Owner of (Matching unit)) Equal to (Owner of MS_Trigger_unit)))![]() ![]() Unit Group - Remove MS_Trigger_unit from MS_Group![]() ![]() Set TempInteger = (0 + 1)![]() ![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)![]() ![]() ![]() Then - Actions![]() ![]() ![]() ![]() Unit Group - Pick every unit in MS_Group and do (Actions)![]() ![]() ![]() ![]() ![]() Loop - Actions![]() ![]() ![]() ![]() ![]() ![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)![]() ![]() ![]() ![]() ![]() ![]() ![]() Then - Actions![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set MS_Picked_unit_loc[1] = (Position of (Picked unit))![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set MS_Picked_unit_loc[2] = (MS_Picked_unit_loc[1] offset by 15.00 towards (Angle from MS_Trigger_unit_loc to MS_Picked_unit_loc[1]) degrees)![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set MS_Picked_unit_loc[3] = MS_Picked_unit_loc[2]![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Unit - Move (Picked unit) instantly to MS_Picked_unit_loc[3]![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() For each (Integer A) from 1 to 3, do (Custom script: call RemoveLocation(udg_MS_Picked_unit_loc[GetForLoopIndexA()]))![]() ![]() ![]() ![]() Custom script: call RemoveLocation(udg_MS_Trigger_unit_loc)![]() ![]() ![]() ![]() Custom script: call DestroyGroup(udg_MS_Group)![]() ![]() ![]() Else - ActionsLast edited by botanic : 03-18-2007 at 10:06 PM. |
|
|
|
|
|
#11 |
|
Lackadaisically Absent.
Respected User
|
Try this; it should explode the mirror images whenever they come within 20.00 of a unit (changeable). To get them to explode when they reach a destructable, you would need JASS and a pathability check function.
__________________Trigger: Mirror Image Explode Copy
![]() Conditions
![]() Actions
![]() ![]() Set MS_Trigger_unit_loc = (Position of MS_Trigger_unit)
![]() ![]() Set MS_Group = (Units within 10000.00 of MS_Trigger_unit_loc matching ((Owner of (Matching unit)) Equal to (Owner of MS_Trigger_unit)))
![]() ![]() Unit Group - Remove MS_Trigger_unit from MS_Group
![]() ![]() Set TempInteger = (0 + 1)
![]() ![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)
![]() ![]() ![]() Then - Actions
![]() ![]() ![]() ![]() Unit Group - Pick every unit in MS_Group and do (Actions)
![]() ![]() ![]() ![]() ![]() Loop - Actions
![]() ![]() ![]() ![]() ![]() ![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)
![]() ![]() ![]() ![]() ![]() ![]() ![]() Then - Actions
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set MS_Picked_unit_loc[1] = (Position of (Picked unit))
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set MS_Picked_unit_loc[2] = (MS_Picked_unit_loc[1] offset by 15.00 towards (Angle from MS_Trigger_unit_loc to MS_Picked_unit_loc[1]) degrees)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set MS_Picked_unit_loc[3] = MS_Picked_unit_loc[2]
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Unit - Move (Picked unit) instantly to MS_Picked_unit_loc[3]
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Unit Group - Add (Picked Unit) to MS_Explode_Group
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() For each (Integer A) from 1 to 3, do (Custom script: call RemoveLocation(udg_MS_Picked_unit_loc[GetForLoopIndexA()]))
![]() ![]() ![]() ![]() Custom script: call RemoveLocation(udg_MS_Trigger_unit_loc)
![]() ![]() ![]() ![]() Custom script: call DestroyGroup(udg_MS_Group)
![]() ![]() ![]() Else - Actions
![]() ![]() Unit Group - Pick every unit in MS_Explode_Group and do (Actions)
![]() ![]() ![]() Loop - Actions
![]() ![]() ![]() ![]() Set MS_Picked_unit_loc[4] = Position of (Picked Unit)
![]() ![]() ![]() ![]() Set MS_Group = Units within 20.00 of (MS_Picked_unit_loc[4]) matching ((Matching Unit) belongs to an enemy of (Owner of (Picked Unit)))
![]() ![]() ![]() ![]() If (Number of units in MS_group equal 0) then do (Unit - Explode (Picked Unit)), else do (Do Nothing)
![]() ![]() ![]() ![]() Custom script: call RemoveLocation(udg_MS_Picked_unit_loc[4])
![]() ![]() ![]() ![]() Custom script: call DestroyGroup(udg_MS_Group)
![]() ![]() Custom script: call GroupClear(udg_MS_Explode_Group)- You're setting TempInteger = 0+1. Why? It's not used, and just setting it to 1 would be easier. - Any unit within a 10,000 (ten-thousand) radius of the casting unit that is owned by the owner of the casting unit will be killed. - You have "MS_Trigger_unit_loc" and "MS_Picked_unit_loc[index]"; couldn't you just combine them into 1 array variable? If you want the mirror images to be uncontrollable, add this line right after the "Unit Group - Add (Picked Unit) to MS_Explode_Group)" line: Trigger: Unit - Pause (Picked Unit) |
|
|
|
|
|
#12 |
|
User
|
Ok it works not they die when they hit a unit but I cant get them to be removed when the spell ends. That means that the first trigger doesn't work correctly... here is what I got
__________________Trigger: Mirror Image Explode
![]() Actions
![]() ![]() Set MS_Trigger_unit = (Casting unit)
![]() ![]() Set MS_Group = (Units within 10000.00 of MS_Trigger_unit_loc matching ((Owner of (Matching unit)) Equal to (Owner of MS_Trigger_unit)))
![]() ![]() Wait 0.10 seconds
![]() ![]() Trigger - Turn on Mirror Image Explode Copy <gen>
![]() ![]() Wait ((Real((Level of Deadly [H]allucinations for MS_Trigger_unit))) x 15.00) game-time seconds
![]() ![]() Set MS_Group = (Units within 10000.00 of MS_Trigger_unit_loc matching ((Owner of (Matching unit)) Equal to (Owner of MS_Trigger_unit)))
![]() ![]() Unit Group - Remove MS_Trigger_unit from MS_Group
![]() ![]() Custom script: call GroupClear(udg_MS_Group)
![]() ![]() Trigger - Turn off Mirror Image Explode Copy <gen>Trigger: Mirror Image Explode Copy
![]() Conditions
![]() Actions
![]() ![]() Set MS_Trigger_unit_loc = (Position of MS_Trigger_unit)
![]() ![]() Set MS_Group = (Units within 10000.00 of MS_Trigger_unit_loc matching ((Owner of (Matching unit)) Equal to (Owner of MS_Trigger_unit)))
![]() ![]() Unit Group - Remove MS_Trigger_unit from MS_Group
![]() ![]() Set TempInteger = 1
![]() ![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)
![]() ![]() ![]() Then - Actions
![]() ![]() ![]() ![]() Unit Group - Pick every unit in MS_Group and do (Actions)
![]() ![]() ![]() ![]() ![]() Loop - Actions
![]() ![]() ![]() ![]() ![]() ![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)
![]() ![]() ![]() ![]() ![]() ![]() ![]() If - Conditions
![]() ![]() ![]() ![]() ![]() ![]() ![]() Then - Actions
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set MS_Picked_unit_loc[1] = (Position of (Picked unit))
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set MS_Picked_unit_loc[2] = (MS_Picked_unit_loc[1] offset by 15.00 towards (Angle from MS_Trigger_unit_loc to MS_Picked_unit_loc[1]) degrees)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Set MS_Picked_unit_loc[3] = MS_Picked_unit_loc[2]
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Unit - Move (Picked unit) instantly to MS_Picked_unit_loc[3]
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Unit Group - Add (Picked unit) to MS_Explode_Group
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() For each (Integer A) from 1 to 3, do (Custom script: call RemoveLocation(udg_MS_Picked_unit_loc[GetForLoopIndexA()]))
![]() ![]() ![]() ![]() ![]() ![]() ![]() Else - Actions
![]() ![]() ![]() ![]() Custom script: call RemoveLocation(udg_MS_Trigger_unit_loc)
![]() ![]() ![]() ![]() Custom script: call GroupClear(udg_MS_Group)
![]() ![]() ![]() Else - Actions
![]() ![]() Unit Group - Pick every unit in MS_Explode_Group and do (Actions)
![]() ![]() ![]() Loop - Actions
![]() ![]() ![]() ![]() Set MS_Picked_unit_loc[4] = (Position of (Picked unit))
![]() ![]() ![]() ![]() Set MS_Group = (Units within 100.00 of MS_Picked_unit_loc[4] matching (((Matching unit) belongs to an enemy of (Owner of (Picked unit))) Equal to True))
![]() ![]() ![]() ![]() Unit - Cause (Picked unit) to damage circular area after 0.00 seconds of radius 100.00 at MS_Picked_unit_loc[4], dealing 50.00 damage of attack type Spells and damage type Normal
![]() ![]() ![]() ![]() If ((Number of units in MS_Group) Greater than or equal to 1) then do (Unit - Explode (Picked unit)) else do (Do nothing)
![]() ![]() ![]() ![]() Custom script: call RemoveLocation(udg_MS_Picked_unit_loc[4])
![]() ![]() ![]() ![]() Custom script: call GroupClear(udg_MS_Group)
![]() ![]() Custom script: call GroupClear(udg_MS_Explode_Group) |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
|
Donate |