wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Warcraft III Modding > Developer's Corner > Triggers & Scripts
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 03-18-2007, 03:52 AM   #1
botanic
User
 
botanic's Avatar
 
Join Date: Feb 2007
Posts: 551

Submissions (2)

botanic will become famous soon enough (41)botanic will become famous soon enough (41)

Send a message via AIM to botanic
Default Explode on touch spell?

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.
botanic is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 03-18-2007, 04:15 AM   #2
Hydrolisk
User
 
Join Date: Mar 2006
Posts: 321

Submissions (1)

Hydrolisk is on a distinguished road (11)

Default

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
Hydrolisk is offline   Reply With Quote
Old 03-18-2007, 04:36 AM   #3
Pyrogasm
Lackadaisically Absent.
 
Pyrogasm's Avatar


Respected User
 
Join Date: Sep 2006
Posts: 4,514

Submissions (9)

Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)

Hero Contest - Fourth place

Send a message via ICQ to Pyrogasm Send a message via AIM to Pyrogasm Send a message via MSN to Pyrogasm Send a message via Yahoo to Pyrogasm
Default

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.
__________________
Quote:
Originally posted by Rising_Dusk
Your spells are mostly ignored because they are not very cool so we aren't very excited to review/approve them, but you are incredibly persistent and won't give us an excuse to graveyard it. That is generally what results in a resource being ignored for a long time.

The Spell Request Thread Done for, unless someone else wants to revive it...
It lasted a damn long time.

Please; Ask for Help Appropriately














Quote:
Originally posted by Kyrbi0
Huh. Almost makes me wish I had a girlfriend, to take advantage of today (wait, no, that's not what I meant... I mean, take advantage of the fact that it is international women's day... gah, never mind).
Quote:
Originally posted by Pyrogasm
Rome may not have been built in a day, but the Romans sure as hell didn't say "look at this great city we built guys!" when they had nothing more than a bit of stone and some cottages.
Pyrogasm is offline   Reply With Quote
Old 03-18-2007, 06:29 PM   #4
botanic
User
 
botanic's Avatar
 
Join Date: Feb 2007
Posts: 551

Submissions (2)

botanic will become famous soon enough (41)botanic will become famous soon enough (41)

Send a message via AIM to botanic
Default

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
botanic is offline   Reply With Quote
Old 03-18-2007, 07:00 PM   #5
Dil999
CUSTOM USER TITLE!!!!!!!!
 
Dil999's Avatar
 
Join Date: Dec 2006
Posts: 740

Dil999 has a spectacular aura about (82)Dil999 has a spectacular aura about (82)Dil999 has a spectacular aura about (82)

Send a message via AIM to Dil999 Send a message via MSN to Dil999 Send a message via Yahoo to Dil999
Default

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
__________________
Early man walked away as modern man took control.
Their minds weren't all the same, to conquer was his big goal,
So he built his great empire and slaughtered his own kind,
Then he died a confused man, killed himself with his own mind.
Dil999 is offline   Reply With Quote
Old 03-18-2007, 07:40 PM   #6
Hydrolisk
User
 
Join Date: Mar 2006
Posts: 321

Submissions (1)

Hydrolisk is on a distinguished road (11)

Default

Not MUI?
Hydrolisk is offline   Reply With Quote
Old 03-18-2007, 08:19 PM   #7
oNdizZ
User
 
oNdizZ's Avatar
 
Join Date: Jul 2004
Posts: 526

Submissions (2)

oNdizZ will become famous soon enough (33)oNdizZ will become famous soon enough (33)

Default

then just do another group loop and use picked unit instead of (Your unit)?
__________________

In need of a Macromedia Flash script tutor.

RIP - L2Extreme
oNdizZ is offline   Reply With Quote
Old 03-18-2007, 08:44 PM   #8
AKAmrdivine
User
 
AKAmrdivine's Avatar
 
Join Date: Mar 2007
Posts: 5

AKAmrdivine has little to show at this moment (1)

Default

Code:
explode
    Events
        Unit - A unit comes within 200.00 of YourUnit <gen>
    Conditions
    Actions
        Unit - Explode (Triggering unit)
AKAmrdivine is offline   Reply With Quote
Old 03-18-2007, 08:45 PM   #9
Pyrogasm
Lackadaisically Absent.
 
Pyrogasm's Avatar


Respected User
 
Join Date: Sep 2006
Posts: 4,514

Submissions (9)

Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)

Hero Contest - Fourth place

Send a message via ICQ to Pyrogasm Send a message via AIM to Pyrogasm Send a message via MSN to Pyrogasm Send a message via Yahoo to Pyrogasm
Default

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.

Trigger:
Collapse Events
Time - Every 0.20 seconds of game-time
Conditions
Collapse Actions
Set TempGroup[1] = Units in (Playable Map Area) matching (Unit-type of (Matching Unit) equal to YOUR UNIT)
Collapse Unit Group - Pick every unit in TempGroup[1] and do (Actions)
Collapse Loop - Actions
Set TempPoint = Position of (Picked Unit)
Set TempGroup[2] = Units within 20.00 of (TempPoint)
Unit Group - Pick every unit in (TempGroup[2]) and do (Unit - Explode (Picked Unit))
Custom script: call RemoveLocation(udg_TempPoint)
Custom script: call DestroyGroup(udg_TempGroup[1])
Custom script: call DestroyGroup(udg_TempGroup[2])
__________________
Quote:
Originally posted by Rising_Dusk
Your spells are mostly ignored because they are not very cool so we aren't very excited to review/approve them, but you are incredibly persistent and won't give us an excuse to graveyard it. That is generally what results in a resource being ignored for a long time.

The Spell Request Thread Done for, unless someone else wants to revive it...
It lasted a damn long time.

Please; Ask for Help Appropriately














Quote:
Originally posted by Kyrbi0
Huh. Almost makes me wish I had a girlfriend, to take advantage of today (wait, no, that's not what I meant... I mean, take advantage of the fact that it is international women's day... gah, never mind).
Quote:
Originally posted by Pyrogasm
Rome may not have been built in a day, but the Romans sure as hell didn't say "look at this great city we built guys!" when they had nothing more than a bit of stone and some cottages.

Last edited by Pyrogasm : 03-18-2007 at 08:47 PM.
Pyrogasm is offline   Reply With Quote
Old 03-18-2007, 09:58 PM   #10
botanic
User
 
botanic's Avatar
 
Join Date: Feb 2007
Posts: 551

Submissions (2)

botanic will become famous soon enough (41)botanic will become famous soon enough (41)

Send a message via AIM to botanic
Default

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
Collapse Events
Unit - A unit Begins casting an ability
Collapse Conditions
(Ability being cast) Equal to Deadly [H]allucinations
Collapse 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
Collapse Events
Time - Every 0.05 seconds of game time
Conditions
Collapse 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)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(MS_Trigger_unit is alive) Equal to True
Collapse Then - Actions
Collapse Unit Group - Pick every unit in MS_Group and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Picked unit) is an illusion) Equal to True
Collapse 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()]))
Collapse Else - Actions
Unit - Kill (Picked unit)
Custom script: call RemoveLocation(udg_MS_Trigger_unit_loc)
Custom script: call DestroyGroup(udg_MS_Group)
Else - Actions
__________________
Quote:
Originally Posted by cohadar
I really should not be the one telling you this
Quote:
Originally Posted by botanic
I think we established that

Last edited by botanic : 03-18-2007 at 10:06 PM.
botanic is offline   Reply With Quote
Old 03-18-2007, 11:50 PM   #11
Pyrogasm
Lackadaisically Absent.
 
Pyrogasm's Avatar


Respected User
 
Join Date: Sep 2006
Posts: 4,514

Submissions (9)

Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)Pyrogasm is a splendid one to behold (638)

Hero Contest - Fourth place

Send a message via ICQ to Pyrogasm Send a message via AIM to Pyrogasm Send a message via MSN to Pyrogasm Send a message via Yahoo to Pyrogasm
Default

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
Collapse Events
Time - Every 0.05 seconds of game time
Conditions
Collapse 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)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(MS_Trigger_unit is alive) Equal to True
Collapse Then - Actions
Collapse Unit Group - Pick every unit in MS_Group and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Picked unit) is an illusion) Equal to True
Collapse 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()]))
Collapse Else - Actions
Unit - Kill (Picked unit)
Custom script: call RemoveLocation(udg_MS_Trigger_unit_loc)
Custom script: call DestroyGroup(udg_MS_Group)
Else - Actions
Collapse Unit Group - Pick every unit in MS_Explode_Group and do (Actions)
Collapse 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)
Note that the last line is "GroupClear", not "DestroyGroup". A couple of other things I noticed:

- 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)
__________________
Quote:
Originally posted by Rising_Dusk
Your spells are mostly ignored because they are not very cool so we aren't very excited to review/approve them, but you are incredibly persistent and won't give us an excuse to graveyard it. That is generally what results in a resource being ignored for a long time.

The Spell Request Thread Done for, unless someone else wants to revive it...
It lasted a damn long time.

Please; Ask for Help Appropriately














Quote:
Originally posted by Kyrbi0
Huh. Almost makes me wish I had a girlfriend, to take advantage of today (wait, no, that's not what I meant... I mean, take advantage of the fact that it is international women's day... gah, never mind).
Quote:
Originally posted by Pyrogasm
Rome may not have been built in a day, but the Romans sure as hell didn't say "look at this great city we built guys!" when they had nothing more than a bit of stone and some cottages.
Pyrogasm is offline   Reply With Quote
Old 03-19-2007, 01:51 AM   #12
botanic
User
 
botanic's Avatar
 
Join Date: Feb 2007
Posts: 551

Submissions (2)

botanic will become famous soon enough (41)botanic will become famous soon enough (41)

Send a message via AIM to botanic
Default

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
Collapse Events
Unit - A unit Begins casting an ability
Collapse Conditions
(Ability being cast) Equal to Deadly [H]allucinations
Collapse 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
Collapse Unit Group - Pick every unit in MS_Group and do (Actions)
Collapse Loop - Actions
Unit - Kill (Picked unit)
Custom script: call GroupClear(udg_MS_Group)
Trigger - Turn off Mirror Image Explode Copy <gen>

Trigger:
Mirror Image Explode Copy
Collapse Events
Time - Every 0.05 seconds of game time
Conditions
Collapse 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
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(MS_Trigger_unit is alive) Equal to True
Collapse Then - Actions
Collapse Unit Group - Pick every unit in MS_Group and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Collapse 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
Collapse Unit Group - Pick every unit in MS_Explode_Group and do (Actions)
Collapse 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)
__________________
Quote:
Originally Posted by cohadar
I really should not be the one telling you this
Quote:
Originally Posted by botanic
I think we established that
botanic is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 10:20 AM.


Donate

Affiliates
The Hubb http://bylur.com - Warcraft, StarCraft, Diablo and DotA Blog & Forums The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2014, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services