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

[Solved] Cronosphere-spell sometimes isn't casted

Status
Not open for further replies.
Level 14
Joined
Jul 19, 2007
Messages
772
I've got problem with a spell in my map that works like Cronosphere. First I want the Cronosphere-spell to ONLY stop the time of enemies not allies too... and secondly the spell sometimes isn't even casted when using it, nothings happening... Pls help me with these problems :(
  • Spells Vars
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set ChAbilityMain = Sphere Of Timelessness
      • Set ChUnitEffect = Sphere Of Timelessness
  • Sphere Of Timelessness
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to ChAbilityMain
    • Actions
      • Wait 0.20 seconds
      • Set Chronosphere_Caster = (Casting unit)
      • Set Chronosphere_Point[0] = (Target point of ability being cast)
      • Unit - Create 1 ChUnitEffect for (Owner of Chronosphere_Caster) at Chronosphere_Point[0] facing Default building facing degrees
      • Unit Group - Add (Last created unit) to Chronosphere_Group[0]
      • If ((Level of ChAbilityMain for (Triggering unit)) Equal to 1) then do (Unit - Add a 5.00 second Generic expiration timer to (Last created unit)) else do (Do nothing)
      • If ((Level of ChAbilityMain for (Triggering unit)) Equal to 2) then do (Unit - Add a 7.00 second Generic expiration timer to (Last created unit)) else do (Do nothing)
      • If ((Level of ChAbilityMain for (Triggering unit)) Equal to 3) then do (Unit - Add a 9.00 second Generic expiration timer to (Last created unit)) else do (Do nothing)
      • Custom script: call RemoveLocation(udg_Chronosphere_Point[0])
      • Trigger - Turn on Sphere Of Timelessness Loop <gen>
      • Unit - Order Chronosphere_Caster to Stop
  • Sphere Of Timelessness Loop
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Chronosphere_Group[0] and do (Actions)
        • Loop - Actions
          • Set Chronosphere_Point[1] = (Position of (Picked unit))
          • Set Chronosphere_Group[1] = (Units within 400.00 of Chronosphere_Point[1] matching ((Matching unit) Not equal to Chronosphere_Caster))
          • Unit Group - Pick every unit in Chronosphere_Group[1] and do (Actions)
            • Loop - Actions
              • Unit - Pause (Picked unit)
              • Animation - Change (Picked unit)'s animation speed to 0.00% of its original speed
      • Custom script: call RemoveLocation(udg_Chronosphere_Point[1])
  • Sphere Of Timelessness Resume
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to ChUnitEffect
    • Actions
      • Unit - Remove (Dying unit) from the game
      • Set Chronosphere_Point[2] = (Position of (Dying unit))
      • Set Chronosphere_Group[2] = (Units within 400.00 of Chronosphere_Point[2] matching ((Matching unit) Not equal to Chronosphere_Caster))
      • Unit Group - Pick every unit in Chronosphere_Group[2] and do (Actions)
        • Loop - Actions
          • Unit - Unpause (Picked unit)
          • Animation - Change (Picked unit)'s animation speed to 100.00% of its original speed
      • Custom script: call RemoveLocation(udg_Chronosphere_Point[2])
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
I want the Cronosphere-spell to ONLY stop the time of enemies not allies too
Add a condition for enemy units in this line:

  • Set Chronosphere_Group[1] = (Units within 400.00 of Chronosphere_Point[1] matching ((Matching unit) Not equal to Chronosphere_Caster))
secondly the spell sometimes isn't even casted when using it, nothings happening
You should worry about fixing the leaks and making it MUI. Are there multiple instances occuring when you try to cast it?
 
Level 11
Joined
May 16, 2016
Messages
730
You should worry about fixing the leaks and making it MUI. Are there multiple instances occuring when you try to cast it?
I've got problem with a spell in my map that works like Cronosphere. First I want the Cronosphere-spell to ONLY stop the time of enemies not allies too... and secondly the spell sometimes isn't even casted when using it, nothings happening... Pls help me with these problems :(
WHen you cast the ability you have wait trigger, it's bad. You should change the ability on, for example, Ward spell (like Shadow Hunter orcish hero have) which summons Chronosphere instead of serpent ward.
Then add trigger with event Unit Summons unit (or something) and paste "Sphere of Timelessness" code into the summoning trigger WITHOUT Wait 0.2 sec at all and change Chronosphere Caster = Summoning Unit
ChronospherePoint[0] = Position of Summoned Unit
 
Level 14
Joined
Jul 19, 2007
Messages
772
Add a condition for enemy units in this line:

  • Set Chronosphere_Group[1] = (Units within 400.00 of Chronosphere_Point[1] matching ((Matching unit) Not equal to Chronosphere_Caster))

You should worry about fixing the leaks and making it MUI. Are there multiple instances occuring when you try to cast it?
Well I didn't make the spell by myself I just copied it from a spellpack. Well the times when the spell fails to cast it then it often happening when you cast the spell and then quickly make the hero do another action like moving, attack or cast another spell. It has a slightly waiting time to make the spell to be casted, else nothings happening but it thinks the spell is casted so the mana is used and the cooldown has started :-/ Also another problem about this spell and this bug doesn't happening very often but sometimes when the spell ends and they shouldn't be stopped in time anymore then it can happening a unit or a Hero still is stopped in time forever or until they die even if the spell is gone but this bug doesn't happening very often but when it's happening, it's very annoying -.-
 
Level 14
Joined
Jul 19, 2007
Messages
772
Actually, there's this chronosphere in our spell database. You can learn and modify it to your likings. Just don't forget to give credits to the author.
Well I got a problem when trying to import that Cronosphere-spell in to my map. I'm importing all spells, units and triggers required for it but when importing the triggers, all the variables isn't imported and is missing :-/ So how can I get them all imported too? Pls help...
 
Level 14
Joined
Jul 19, 2007
Messages
772
In the world editor, go to File => Preferences
Check the "Automatically create unknown variables while pasting trigger data"
Now, try re-import the triggers.
Oh I didn't know about that but that was the cause why they didn't get imported too. Thank you so much! I've got this problem before with some spells from spellpacks and is sick of making the variables by myself when they wont be imported... Thank you! :)
 
Level 14
Joined
Jul 19, 2007
Messages
772
It's pretty much a requirement for all spells in the Hive database to have "How to Import" instructions. The 1st step, which should be the same for every submission, is that the option is checked.

The Chronosphere submission has that instruction. Can you point to me what other submissions you ran into didn't have it?
Oh that's true I missed that... Well I can't exactly remember what spells it was because I have renamed and edited almost every triggered spell I got from spellpacks in my map and I have been working with my map since 2009 and it's not even sure these spellpacks is still on Hive but I can't remember which ones of these imported spells I got this problem with but it didn't happening with all of them, just some of them but most of them imported the variables too even if I didn't have it checked there was only a few of them that didn't and I had to create the variables myself but now the problem is solved :)
 
Status
Not open for further replies.
Top