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

Game crashes after using item ability, how can i solve it?

Status
Not open for further replies.
Level 2
Joined
Jan 6, 2020
Messages
12
  • Buzul Firtina Equip
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Buzul Fırtına'yı kullan
      • (Triggering unit) Equal to SelectedHero
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item carried by SelectedHero in slot 1)) Equal to Silah
          • SilahTakiliMi Equal to False
        • Then - Actions
          • Set SilahTakiliMi = True
          • Item - Make (Item carried by SelectedHero of type Silah) Droppable
          • Item - Remove (Item carried by SelectedHero of type Silah)
          • Item - Remove (Item carried by SelectedHero of type Buzul Fırtına (Envanterde))
          • For each (Integer A) from 0 to 8, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • BuzulFirtinaSVY Equal to (Integer A)
                • Then - Actions
                  • Hero - Create BFSilah[BuzulFirtinaSVY] and give it to (Triggering unit)
                  • Unit - Order SelectedHero to move (Last created item) to inventory slot 1
                  • Item - Make (Last created item) Undroppable
                • Else - Actions
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item carried by SelectedHero in slot 1)) Equal to BFSilah[BuzulFirtinaSVY]
              • SilahTakiliMi Equal to True
            • Then - Actions
              • Set SilahTakiliMi = False
              • Item - Remove (Item carried by SelectedHero of type BFSilah[BuzulFirtinaSVY])
              • Hero - Create Silah and give it to (Triggering unit)
              • Unit - Order SelectedHero to move (Last created item) to inventory slot 1
              • Item - Make (Last created item) Undroppable
              • Hero - Create Buzul Fırtına (Envanterde) and give it to (Triggering unit)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item carried by SelectedHero in slot 1)) Not equal to BFSilah[BuzulFirtinaSVY]
              • SilahTakiliMi Equal to True
            • Then - Actions
              • Game - Display to (All players) for 5.00 seconds the text: |cFFFFCC00Önce mev...
            • Else - Actions

Hello there. I have a problem with saved games. I tried to write a system. There is a weapon compartment in slot 1 in the inventory. When you use a weapon skill, the bonus version of the weapon gets stuck in this slot. Clicking on the weapon in the slot gives the weapon its normal state again. My goal is to use equipment such as a single type of weapon and armor. But while doing these, ensuring that the game can be saved and reloaded normally.
I don't know where I went wrong in the system I made. When I start the normal game, there is no problem.

When the game is saved and reloaded, if I put the weapon in and out, the game crashes.

The code above is the one I used to equip the weapon. I saved the weapon in a variable. I have determined the conditions to be made in case it is sold or left on the ground.
I do not know how to make a more practical version. For this reason, I arranged each item individually.

Weapon = Permanent
Armor = Charged
Gloves = Artifact
Boots = Purchasable I use in my map.


(All words translated to Google Translate. I'm sorry for my bad english.)
 
Status
Not open for further replies.
Top