• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Flashbang Filter Effects

Status
Not open for further replies.
Level 18
Joined
Mar 13, 2009
Messages
1,411
I am trying to make a flashbang grenade spell that will turn the screen white for a few seconds for players that are in the range of a grenade explosion. I am quite sure this will need JASS, but I am not good with it. Is there anyone that could give me some hints? It would be nice if I had the option to do only a small part with a JASS script (mainly the filter) and the rest with GUI.
+rep for people that can help me
:wink:
 
Level 18
Joined
Mar 13, 2009
Messages
1,411
I know I should use those, but I want to know how to give the effect to 1 player. People told me it is possible by using a little jass script.
 
Level 18
Joined
Mar 13, 2009
Messages
1,411
How would that thing look in a trigger that picked all units in a 300 range of a dying unit (being the grenade dummy) and would give their owners a 15 second decaying white mask filter?
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Unfortunately, I just started learning JASS... :p (yesterday ><)

I know how you can do it the long way, but you can probably do it with 1 little script, so I'm not going to say anything :p

Basically, you just need to add in the custom script that it needs to pick all owners of the unit group, instead of the GetLocalPlayer, but I have no idea how...
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Right, I've said before that I'm learning JASS, so I've did some more research (it also helps me learning :p).
It should be something like this:

  • Actions
    • Set TempLoc = (Position of (Dying unit))
    • Set Group = (Units within 300.00 of TempLoc)
    • Unit Group - Pick every unit in Group and do (Actions)
      • Loop - Actions
        • Custom script: if GetLocalPlayer() == GetOwningPlayer(GetEnumUnit()) then
        • Show Fade Filter
        • Custom script: endif
    • Custom script: call RemoveLocation(udg_TempLoc)
    • Custom script: call DestroyGroup(udg_Group)
You should also learn JASS, see how many times I've used JASS for such a 'simple' trigger? :eek:

(edit: You can probably figure out the Variables yourself :p)
 
Level 8
Joined
Aug 4, 2006
Messages
357
hah i just helped Revolve make a flashbang trigger (in JASS) check it out: http://www.hiveworkshop.com/forums/triggers-and-scripts-269/flashbang-spell-129244/index2.html
he based the flashbang ability off storm bolt, so the unit group uses units in range of the target unit. it'd be easy to change if your target was a point instead of a unit. if you need any help with it, lemme know.
on the other hand, i understand if you want to use GUI. my JASS code would probably just look like gibberish and not help you to learn.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
hah i just helped Revolve make a flashbang trigger (in JASS) check it out: http://www.hiveworkshop.com/forums/triggers-and-scripts-269/flashbang-spell-129244/index2.html
he based the flashbang ability off storm bolt, so the unit group uses units in range of the target unit. it'd be easy to change if your target was a point instead of a unit. if you need any help with it, lemme know.
on the other hand, i understand if you want to use GUI. my JASS code would probably just look like gibberish and not help you to learn.

Just a question: would my GUI-trigger work? :/ (in my previous post)
Thanks for the spell, by the way ^^ it wasn't ment for me, but I can learn something from that ;)
I really need some easy spells right now, to see how it's done... most spells in the spell-section or damn hard to understand for a jass-newbie like me :p
 
Level 18
Joined
Mar 13, 2009
Messages
1,411
Yes I noticed he needed the same thing and VMed him, but he never answered. But I thought that he needed to have the ability activate on a hit and I kinda needed to hit units nearby the dying dummy unit.
 
Status
Not open for further replies.
Top