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

[Crash] My map keep crashing. Please help

Status
Not open for further replies.
Level 4
Joined
Oct 28, 2012
Messages
82
A test map, when I spam my custom spell, it crash, not on first try, you will have to spam spell like 4-5 times as soon as posible.
-
Does another map crash after spam spell ??

Code 1:
  • Untitled Trigger 001
    • Events
      • Unit - Far Seer 0000 <gen> Starts the effect of an ability
    • Conditions
    • Actions
      • Set W_d4_U[0] = (Triggering unit)
      • Set W_d4_U[1] = (Target unit of ability being cast)
      • Set W_d4_P = (Position of W_d4_U[1])
      • Unit Group - Remove all units from W_d4_UG
      • Wait 0.05 seconds
      • Unit - Pause (Triggering unit)
      • Unit - Hide W_d4_U[0]
      • Unit Group - Pick every unit in (Random 15 units from (Units within 250.00 of W_d4_P)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is alive) Equal to True
              • ((Picked unit) is in W_d4_UG) Equal to False
              • ((Picked unit) belongs to an enemy of (Owner of W_d4_U[0])) Equal to True
              • ((Picked unit) is A structure) Equal to False
            • Then - Actions
              • Unit Group - Add (Picked unit) to W_d4_UG
            • Else - Actions
      • Trigger - Turn on Untitled Trigger 002 <gen>
      • Wait until ((Untitled Trigger 002 <gen> is on) Equal to False), checking every 0.10 seconds
      • Lightning - Destroy W_d4_L
      • Unit Group - Remove all units from W_d4_UG
      • Unit - Unpause W_d4_U[0]
Code 2 : loop
  • Untitled Trigger 002
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Number of units in (Units within 300.00 of W_d4_P matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) is in W_d4_UG) Equal to False))))) Equal to 0
              • (Number of units in W_d4_UG) Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • Unit Group - Pick every unit in (Random 1 units from W_d4_UG) and do (Actions)
            • Loop - Actions
              • Lightning - Destroy W_d4_L
              • Lightning - Create a Healing Wave - Primary lightning effect from source (Position of W_d4_U[0]) to target (Position of (Picked unit))
              • Set W_d4_L = (Last created lightning effect)
              • Unit - Move W_d4_U[0] instantly to ((Position of (Picked unit)) offset by -100.00 towards (Facing of (Picked unit)) degrees), facing (Facing of (Picked unit)) degrees
              • Animation - Play W_d4_U[0]'s attack animation
              • Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Human\Invisibility\InvisibilityTarget.mdl
              • Special Effect - Destroy (Last created special effect)
              • Unit - Cause W_d4_U[0] to damage (Picked unit), dealing 75.00 damage of attack type Spells and damage type Magic
              • Unit Group - Remove (Picked unit) from W_d4_UG
 

Attachments

  • a.w3x
    18 KB · Views: 75
  • Untitled.jpg
    Untitled.jpg
    38.8 KB · Views: 98
Last edited:
Level 13
Joined
Mar 24, 2013
Messages
1,105
I am fairly certain your issue with crashing has to do with Destroying the Lightning, but yes, you should consult some tutorials and the approved spells of the spell section as your method of triggering is in poor form.
 
It is happening because you are attempting to destroy a lightning that was already destroyed (as pOke said).

You will need to update your trigger to be MUI, otherwise you can easily run into this issue in-game. Please see:
http://www.hiveworkshop.com/forums/tutorial-submission-283/general-spell-creation-236141/
Or:
http://www.hiveworkshop.com/forums/tutorial-submission-283/visualize-dynamic-indexing-241896/
Or just take a look at any of the approved spells in the spells section. They are all MUI.
 
Level 4
Joined
Oct 28, 2012
Messages
82
Thank you three.
I know my spell very poor made so I like to learn more.
Thank for the link :D
-
Create a lightning on a Code 1. Set it to W_d4_L. Then Code 2 have something to destroy.
-> it's not crash anymore, but I still work on it for a better version.
-
This is another problem.
Look at below
  • Lightning - Destroy W2_d4_L
  • Custom script: call DestroyLightning( udg_Your_Variable ) //Lightning Effect
Are they the same ?
 
Level 4
Joined
Oct 28, 2012
Messages
82
It's not a MUI, anyway.
Working on Lightning Leak, SE leak, unit leak.
Whose spell is leak, I'm working on it.
 
Level 4
Joined
Oct 28, 2012
Messages
82
Code 1:
  • W2 d4 a Copy
    • Events
      • Unit - Far Seer 0000 <gen> Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Chain Lightning
    • Actions
      • Set W2_d4_U[0] = (Triggering unit)
      • Set W2_d4_U[1] = (Target unit of ability being cast)
      • Set W2_d4_P[0] = (Position of W2_d4_U[0])
      • Set W2_d4_P[1] = (Position of W2_d4_U[1])
      • Set W2_d4_UG = (Units of type Peasant)
      • Unit Group - Remove all units from W2_d4_UG
      • Unit - Turn collision for W2_d4_U[0] Off
      • -------- begin --------
      • Unit Group - Add W2_d4_U[1] to W2_d4_UG
      • Unit Group - Pick every unit in (Units within 250.00 of W2_d4_P[1]) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is alive) Equal to True
              • ((Picked unit) is in W2_d4_UG) Equal to False
              • ((Picked unit) belongs to an enemy of (Owner of W2_d4_U[0])) Equal to True
              • ((Picked unit) is A structure) Equal to False
              • (Number of units in W2_d4_UG) Less than or equal to 14
            • Then - Actions
              • Unit Group - Add (Picked unit) to W2_d4_UG
            • Else - Actions
      • Lightning - Create a Healing Wave - Secondary lightning effect from source W2_d4_P[0] to target W2_d4_P[1]
      • Set W2_d4_L = (Last created lightning effect)
      • Unit - Move W2_d4_U[0] instantly to (W2_d4_P[1] offset by -100.00 towards (Facing of W2_d4_U[1]) degrees), facing (Facing of W2_d4_U[1]) degrees
      • Animation - Play W2_d4_U[0]'s attack animation
      • Special Effect - Create a special effect attached to the overhead of W2_d4_U[1] using Abilities\Spells\Human\Invisibility\InvisibilityTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Cause W2_d4_U[0] to damage W2_d4_U[1], dealing 75.00 damage of attack type Spells and damage type Magic
      • Game - Display to (All players) the text: (String((Number of units in W2_d4_UG)))
      • Unit Group - Remove W2_d4_U[1] from W2_d4_UG
      • Custom script: call RemoveLocation(udg_W2_d4_P[0])
      • Custom script: call RemoveLocation(udg_W2_d4_P[1])
      • Set W2_d4_U[1] = No unit
      • Trigger - Turn on W2 d4 b loop <gen>
      • Wait until ((W2 d4 b loop <gen> is on) Equal to False), checking every 0.10 seconds
      • Lightning - Destroy W2_d4_L
      • Unit - Turn collision for W2_d4_U[0] On
      • Set W2_d4_U[0] = No unit
      • Custom script: call RemoveLocation(udg_W2_d4_P[0])
      • Custom script: call RemoveLocation(udg_W2_d4_P[1])
      • Unit Group - Remove all units from W2_d4_UG
      • Custom script: call DestroyGroup(udg_W2_d4_UG)
Code 2 -loop:
  • W2 d4 b loop Copy
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Set W2_d4_P[0] = (Position of W2_d4_U[0])
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Number of units in W2_d4_UG) Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • Unit Group - Pick every unit in (Random 1 units from W2_d4_UG) and do (Actions)
            • Loop - Actions
              • Set W2_d4_P[1] = (Position of (Picked unit))
              • Lightning - Move W2_d4_L to source W2_d4_P[0] and target W2_d4_P[1]
              • Unit - Move W2_d4_U[0] instantly to (W2_d4_P[1] offset by -100.00 towards (Facing of (Picked unit)) degrees), facing (Facing of (Picked unit)) degrees
              • Animation - Play W2_d4_U[0]'s attack animation
              • Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Human\Invisibility\InvisibilityTarget.mdl
              • Special Effect - Destroy (Last created special effect)
              • Unit - Cause W2_d4_U[0] to damage (Picked unit), dealing 75.00 damage of attack type Spells and damage type Magic
              • Unit Group - Remove (Picked unit) from W2_d4_UG
      • Custom script: call RemoveLocation(udg_W2_d4_P[0])
      • Custom script: call RemoveLocation(udg_W2_d4_P[1])
Need advice.
 
Status
Not open for further replies.
Top