• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Trigger: Special Effects that Deals Damage

Status
Not open for further replies.
Level 2
Joined
Sep 9, 2011
Messages
9
----------------------------------------------------------------------------

Anyone knows how a special effect created in a random point in the map can damage a unit on its position or vicinity.

Please let me know about the trigger or your idea about it. I don't seem to figure it out correctly. You will be credited in any map that I will use it for. Thank You!

----------------------------------------------------------------------------

:vw_wtf:
 
There are two forums: http://www.hiveworkshop.com/forums/world-editor-help-zone-98/ and http://www.hiveworkshop.com/forums/triggers-scripts-269/ to post these things. Site Discussion is irrelevant :p

As for the trigger
  • Actions
    • Set Point = (Random point in (Playable map area))
    • Special Effect - Create a special effect at Point using Abilities\Spells\Demon\RainOfFire\RainOfFireTarget.mdl
    • Special Effect - Destroy (Last created special effect)
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Units within 150.00 of Point) and do (Actions)
      • Loop - Actions
        • Unit - Cause (Picked unit) to damage (Picked unit), dealing 25.00 damage of attack type Normal and damage type Normal
    • Custom script: call RemoveLocation (udg_Point)
 
It's dependent on the variable's name, my sample variable is called "Point", if you named it for example "Location1278", it would be
  • Custom script: call RemoveLocation (udg_Location1278)
Understanding the variables: http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/variables-5896/

Custom scripts allow GUI to communicate with Jass. As for the use of the specific function, the RemoveLocation() one, http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/.
set bj_wantDestroyGroup is a boolean that will clean the memory leak, created by the very next allocated unit group.
 
Level 2
Joined
Sep 9, 2011
Messages
9
no i just entered "call RemoveLocation (udg_Point)" on the custom script...

but I've already solved my problem thanks to you...

I didn't use custom scripts, I've removed them & i just changed the "Unit - Cause (Picked unit) to damage (Picked unit)..." line with another action (i cant remember, its the one next to it in the Action dialog and it worked).

The result, a special effect(flame strike) is created at a random point in every 0.1 secs and it damages the unit or destructible in its vicinity.

THANKS for YOUR help with the triggers!
 
Status
Not open for further replies.
Top