• 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.

[Spell] Doublecast!

Status
Not open for further replies.
Level 4
Joined
Jun 2, 2012
Messages
747
HOW TO DO DOUBLECAST?
:fp:Hi to all hivers! I have a problem on creating a skill actually Im not a good skill creator through triggers but HOW DO I DO the DOUBLECAST skill like in DOtA. Gives a % chance to double cast a specific spell used. Like when you cast Firebolt and you have a Doublecast skill in 100% chance, it will cast the Firebolt x2! Like that, how do I do that?:eekani:
 
Level 4
Joined
Jun 2, 2012
Messages
747
JASS:
set integer i
if GetTriggerUnit() != your_hero then
     return
endif
set i = GetRandomInt ( 0, 100 )
if i < 25 then // 25% Chance

/*Create dummy unit
Add ability to it
Level up ability if needed
Order dummy unit to cast same ability on same target
*/

endif
Sorry but Im not used to JASS. Can you pls make it to Events/Conditions/Actions like that?
 
  • Test
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Firebolt (Neutral Hostile)
      • (Triggering unit) Equal to Blood Mage 0000 <gen>
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random real number between 0.00 and 1.00) Less than or equal to 0.25
        • Then - Actions
          • Game - Display to (All players) for 3.00 seconds the text: MULTICAST
          • Unit - Create 1 Footman for Player 1 (Red) at (Position of (Triggering unit)) facing Default building facing degrees
          • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
          • Unit - Add (Ability being cast) to (Last created unit)
          • Unit - Set level of (Ability being cast) for (Last created unit) to (Level of (Ability being cast) for (Triggering unit))
          • Unit - Order (Last created unit) to Neutral - Firebolt (Target unit of ability being cast)
        • Else - Actions
Just fix variables, clean leaks, and edit constants.
 
Level 4
Joined
Jun 2, 2012
Messages
747
I hope you know the Multicast mechanics in DotA, Kobas :)
It has a small interval in-between Multicast, like 0.20 second interval or something, you might want to add that (if thread starter really wants it like this)

Yeah, im not really for the Firebolt but in all skills! Because Kobas only showed me the Multicast in Firebolt. Im planning a Multicast that works for all skills
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Remove these;
  • (Ability being cast) Equal to Firebolt (Neutral Hostile)
  • (Triggering unit) Equal to Blood Mage 0000 <gen>
It will work for all units and for all spells now since Kobas is using (Ability being cast) it will return as your casted ability, meaning that it will trigger for all spells and multicast for all spells.

Ah, the order string ?
You have to a bit JASS for this :)
 
Level 4
Joined
Jun 2, 2012
Messages
747
Remove these;
  • (Ability being cast) Equal to Firebolt (Neutral Hostile)
  • (Triggering unit) Equal to Blood Mage 0000 <gen>
It will work for all units and for all spells now since Kobas is using (Ability being cast) it will return as your casted ability, meaning that it will trigger for all spells and multicast for all spells.

Ah, the order string ?
You have to a bit JASS for this :)

Yay! Thank you very much defskull! Youve help me many times! MAYBE +REP to you!
 
Level 4
Joined
Jun 2, 2012
Messages
747
Remove these;
  • (Ability being cast) Equal to Firebolt (Neutral Hostile)
  • (Triggering unit) Equal to Blood Mage 0000 <gen>
It will work for all units and for all spells now since Kobas is using (Ability being cast) it will return as your casted ability, meaning that it will trigger for all spells and multicast for all spells.

Ah, the order string ?
You have to a bit JASS for this :)

Hey! Just one more tip! What skill should I base doublecast?? and I just remeber in DOta that it doesnt create a unit but casts it with more stronger but why is there a creat footman there?
 
1st. There will be small delay, test this and you will see!
2nd I create footman here because function default unit is footman, you need dummy unit here, remove model, shadow and make it locust.
3rd. You should edit variables you can have different chance with different spell level or different ability/unit and so on.

Damn, I showed you way how to do it, it's up to you how will you polish trigger!
 
Level 4
Joined
Jun 2, 2012
Messages
747
1st. There will be small delay, test this and you will see!
2nd I create footman here because function default unit is footman, you need dummy unit here, remove model, shadow and make it locust.
3rd. You should edit variables you can have different chance with different spell level or different ability/unit and so on.

Damn, I showed you way how to do it, it's up to you how will you polish trigger!

Ok.... chill out plz. I know now! THANKS! +REP to you. That helps!
 
The delay is barely to be seen.
It is like a delay of 0.0001 second I guess.

Whereas each interval is 0.30 second per Fireblast (source: http://www.playdota.com/heroes/ogre-magi)
You still don't believe me.
Each spell just like attack has it's cast delay, firebolt will be fired at target after 0.27 seconds.

You can increase delay even more with wait 0.00 seconds.
 
Level 4
Joined
Jun 2, 2012
Messages
747
  • Test
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Firebolt (Neutral Hostile)
      • (Triggering unit) Equal to Blood Mage 0000 <gen>
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random real number between 0.00 and 1.00) Less than or equal to 0.25
        • Then - Actions
          • Game - Display to (All players) for 3.00 seconds the text: MULTICAST
          • Unit - Create 1 Footman for Player 1 (Red) at (Position of (Triggering unit)) facing Default building facing degrees
          • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
          • Unit - Add (Ability being cast) to (Last created unit)
          • Unit - Set level of (Ability being cast) for (Last created unit) to (Level of (Ability being cast) for (Triggering unit))
          • Unit - Order (Last created unit) to Neutral - Firebolt (Target unit of ability being cast)
        • Else - Actions
Just fix variables, clean leaks, and edit constants.

Hey, Kobas! How can I make a Doublecast with multiple levels? Because you only show 1 level Doublecast.
 
If level of ability = 1 then set CHANCE = 0.25
elseif level of ability = 2 then set CHANCE = 0.35
and so on
then just in if then else function in trigger above replace 0.25 with real variable CHANCE.

or you can use this calculation within it like this:

(Random real number between 0.00 and 1.00) Less than or equal to (0.10 * (Level of (Ability being cast) for (Triggering unit)))
You will need to convert integer to real if I remember right, but that's not big deal, 1 more click in gui.
 
Level 4
Joined
Jun 2, 2012
Messages
747
If level of ability = 1 then set CHANCE = 0.25
elseif level of ability = 2 then set CHANCE = 0.35
and so on
then just in if then else function in trigger above replace 0.25 with real variable CHANCE.

or you can use this calculation within it like this:

(Random real number between 0.00 and 1.00) Less than or equal to (0.10 * (Level of (Ability being cast) for (Triggering unit)))
You will need to convert integer to real if I remember right, but that's not big deal, 1 more click in gui.

Thank you very much Kobas!
 
Level 4
Joined
Jun 2, 2012
Messages
747
Ah no problem, anytime.

Oh just like Aizen once said to Toshiro Hitsugaya.
"You should learn this well, Allain55X-kun. Admiration is the emotion furthest from understanding.

GUI is easy, just practice, read tutorials and explore resources like spells.

LOL! You do know animes too! Well I got the line in my game Bleach DS Blade of fate, lol not Blade battlers! when you use Aizen he sometimes say "Dont use strong words! It makes you look weak!"
 
Last edited:
Status
Not open for further replies.
Top