- Joined
- Oct 12, 2016
- Messages
- 769
I've got a fatal error happening after about 2 hours of gameplay for my map. I suspect it to be some form of memory leak, and I suspect it to be in the following periodic triggers. I am not sure if any of them leak, or if there's a more efficient way to do this.
Older post, no longer an issue:
Can anyone look over these for me?
1) Fishing Boat Auto-fish trigger:
Simply put, a fishing boat enters the map and gets put into a unit group.
If it dies, it gets removed from the group.
My goal with this trigger is to make the fishing boat automatically "fish" the fishing spots with an ability based of Finger of Death.
2) Backpack follow system with auto-loot function:
Basically, the backpack unit constantly gets moved to the position of a specific hero.
The backpack unit counts as a flying hero structure, to avoid certain complications with shops and pathing. It is also an invisible, invulnerable dummy unit with zero movement speed and pathing.
The backpack is a hero that uses an autocast ability based on "replenish" to add the backpack unit to an auto-loot unit group, and automatically moves around while auto-loot is functioning.
HERO(player#) is created and assigned at game startup, same with BAG(player#).
EDIT:
I have pinpointed the source of my crash. It is the AI scripts themselves.
For some reason, whenever a player moves a unit near an computer player's base when it has a blacksmith, it crashes the game.
Older post, no longer an issue:
Can anyone look over these for me?
1) Fishing Boat Auto-fish trigger:
Simply put, a fishing boat enters the map and gets put into a unit group.
If it dies, it gets removed from the group.
My goal with this trigger is to make the fishing boat automatically "fish" the fishing spots with an ability based of Finger of Death.
2) Backpack follow system with auto-loot function:
Basically, the backpack unit constantly gets moved to the position of a specific hero.
The backpack unit counts as a flying hero structure, to avoid certain complications with shops and pathing. It is also an invisible, invulnerable dummy unit with zero movement speed and pathing.
The backpack is a hero that uses an autocast ability based on "replenish" to add the backpack unit to an auto-loot unit group, and automatically moves around while auto-loot is functioning.
HERO(player#) is created and assigned at game startup, same with BAG(player#).
EDIT:
I have pinpointed the source of my crash. It is the AI scripts themselves.
For some reason, whenever a player moves a unit near an computer player's base when it has a blacksmith, it crashes the game.
Last edited: