• 🏆 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!

[Spell] Need help with another spell

Status
Not open for further replies.

Kusanagi Kuro

Hosted Project: SC
Level 10
Joined
Mar 11, 2012
Messages
708
Hi guys.
I'm working on a spell like this:
After the Hero successfully casted 3 spells, the 4th spell he castes will release poison clouds to random location near him. These clouds last for 5s. If any enemy stand near the poison cloud, they will take damage (the damage only deal if the target is in the poison cloud and is not a damage over time).
I have tried to make this spell work but nothing happen after my hero casted 3 spells. Sadly, I have deleted the triggers so I cant show u guys so if anyone knows how to make this spell, plz help me. :grin:
 
  • Events
  • - Unit starts the effect
  • Conditions
  • - Unit-Type of Casting unit equal to your hero
  • Actions
  • - Set Variable = Variable +1
    • If Then Else
      • If- Conditions
        • -Variable Equal to 4
        • Then- Actions
          • Create poison dummy(with immolation skill)
          • Add Expiration timer (5s)
          • Set Variable = 1
          • Else- Actions
            • None
  • remove leaks
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Test map is here.

Instructions:
1. Cast Banish for 3 times
2. At the 4th time (configured), Poison Cloud will be spawned nearby the caster (configured)
3. The cloud lasts for 5 seconds (configured) that will deal 10 damage (configured) per second.
4. The AOE of the cloud damage is 200 (configured).
 

Attachments

  • Poison Cloud.w3x
    15.4 KB · Views: 36

Kusanagi Kuro

Hosted Project: SC
Level 10
Joined
Mar 11, 2012
Messages
708
Thks Defskull (and u too, En Trophy but I dont want to use that Immolation skill since it causes me some troubles the last time I used it).
But there are some problems:
+1st, I want to create more than 1 clouds per activates so how can I make it? If I use the Temploc2, they will all spawn at the same place instead of different place for each of them.
+2nd, I'm learning trigger and JASS so I wonder what do these lines do:
  • Custom script: set udg_PC_Key = GetHandleId(udg_TempUnit)
  • Custom script: set udg_PC_Key = GetHandleId(udg_TempUnit)
Can u explain to me plz? :D
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
GetHandleId(handle h) takes as argument any object in the game such as item, unit, timer, even texttag(Floation text)(real, integer, boolean, string and code are not handles) and returns the handleId(integer) of it.
This is usefull with hashtables and timers because all objects have unique handle starting at 0x100000(1048576) with exception of textttag and uberspalt starting at 100(dont know if ubersplat really does :D) so if you want to save some values to that timer, unit, item, texttag, whatever you just save it to hashtable as its handleId and then you retrieve it.
The script you have is setting integer to the handle and thats because JNGP has a problem with hashtable not showing handles in save functions in GUI so people have to get HandleIds this way :/ lame I know
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
+1st, I want to create more than 1 clouds per activates so how can I make it? If I use the Temploc2, they will all spawn at the same place instead of different place for each of them.
I have added it into configuration (PC_CloudCount).

+2nd, I'm learning trigger and JASS so I wonder what do these lines do:
  • Custom script: set udg_PC_Key = GetHandleId(udg_TempUnit)
  • Custom script: set udg_PC_Key = GetHandleId(udg_TempUnit)

edo494 pretty much sums it up.
To add in little bit details,

The script you have is setting integer to the handle and thats because JNGP has a problem with hashtable not showing handles in save functions in GUI so people have to get HandleIds this way :/ lame I know
Actually, it exist in GUI, silly ;p
  • Set IntegerKey = (Key (Triggering unit))
BUT, it is more efficient to use variable in that function since it reduces the function call.
In GUI, you can't replace the (Triggering unit) with a variable, therefore it can only be done in JASS/Custom script.

@hayaku
Please next time be details as you can and specific about your request.
Don't keep changing/modifying your request, okay ?
 

Attachments

  • Poison Cloud.w3x
    15.5 KB · Views: 24
Status
Not open for further replies.
Top