• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

[JASS] Connected Units

Status
Not open for further replies.
Level 12
Joined
Mar 23, 2008
Messages
942
I'm doing a spell that needs to have a set of positioned traps, but I want do when you destroy one trap, all the other are destroyed as well. And you can put as many set (One set is 5 traps) you want, and need to be MUI.

But I can't think a way to know which traps are of the same set :(
Also, I forgot the ability that creates a line of light between units, someone remember?

Thanks in advance ^^
 
Level 12
Joined
Mar 23, 2008
Messages
942
save them in a unit array then loop it to destroy them

JASS:
loop
    exitwhen i >= Dat.TotalTraps
    //damaging stuff
    call KillUnit(Dat.Trap[i])
    set i = i + 1
endloop

*sob*

I think you didn't understand. I have a spell that summon 5 traps. Those traps make a circular shape, when someone enter inside they explode, they are also invisible.

But, if someone buy a gem they can destroy one trap, so the other 4 become useless, I wanna destroy them since they will do nothing.

How to detect if one trap was destroy, so I can destroy the other? (MUI please)
 
Level 7
Joined
Jul 20, 2008
Messages
377
Needs more info:

Does the spell drop all traps within a set at once, or as long as you've got 4 or fewer traps, the new trap created belongs to that set?
 
Level 12
Joined
Mar 23, 2008
Messages
942
Needs more info:

Does the spell drop all traps within a set at once, or as long as you've got 4 or fewer traps, the new trap created belongs to that set?

All traps are created at the same time.

Edit: I'm using a global group array with a integer index, setting all the traps to the same custom value to match the group index... If anyone have a better idea, call me xD
 
Last edited:
Status
Not open for further replies.
Top