- Joined
- Feb 20, 2007
- Messages
- 338
I have tried every combination of removing the points that these triggers are making - I assume that these are the leaks that are slowing things down for me.
Either I have misspelled, mis-spaced or used the wrong custom script.
However I have managed to make the triggers not work and even managed to "protect" my map with my custom scripts - and I have caused the game to crash.
Instead of posting what I did I'm just going to post the triggers without leak removals and see what you all have do to stop the leaks - maybe I will learn something.
Here are the triggers:
Spell one plants a field of corn. It is a targeted type spell (like volcano) it creates crop units which are building-type units - this gives me the pathing space between each unit.
That unit has a life span of about half a second - it dies and is replaced by a non-building unit called Corn New. Corn new has a life of about 75 seconds its regeneration is negative -1 always) it dies and is replaced with a Corn Ready t Harvest which has its 60 Hp capability set to 10 hp. It has received "damage" and will be a target of a "heal" spell which heals one point and causes a casting unit to either harvest or plant more crops (which goes back to the building crop).
The spells work - I can have either a computer player's units out there in the fields harvesting or a player's units. If I have a small village with several fields the villagers with the harvest and plant ability not only harvest and plant the scurry back and forth from farm to farm - this adds a bit of life to the village - villagers with a purpose not just wandering around randomly.
So I really do not want to change the functions that take place - I just want to remove leaks here.
Thanks for your patience, help and time.
Either I have misspelled, mis-spaced or used the wrong custom script.
However I have managed to make the triggers not work and even managed to "protect" my map with my custom scripts - and I have caused the game to crash.
Instead of posting what I did I'm just going to post the triggers without leak removals and see what you all have do to stop the leaks - maybe I will learn something.
Here are the triggers:
-
Plant field
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Plant Corn Field
-
Actions
- Player - Add (0 - 10) to (Owner of (Casting unit)) Current gold
-
For each (Integer A) from 1 to 25, do (Actions)
-
Loop - Actions
- Custom script: set bj_wantDestroyGroup = true
- Unit - Create 1 Corn -temp for (Owner of (Casting unit)) at (Target point of ability being cast) facing (Random angle) degrees
-
Loop - Actions
-
Events
-
Plant and Harvest
-
Events
- Unit - A unit Starts the effect of an ability
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Ability being cast) Equal to Harvest Crops
-
Then - Actions
- Unit - Order (Casting unit) to Attack (Random unit from (Units owned by (Owner of (Casting unit)) of type Corn ready for harvest))
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Ability being cast) Equal to Plant Crops
- ((Owner of (Casting unit)) Current gold) Greater than or equal to 10
-
Then - Actions
- Unit - Order (Casting unit) to Right-Click (Random unit from (Units owned by (Owner of (Casting unit)) of type Corn ready for harvest))
- Player - Add (0 - 1) to (Owner of (Casting unit)) Current gold
- Unit - Create 1 Corn new for (Owner of (Casting unit)) at (Position of (Casting unit)) facing (Random angle) degrees
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
Growing Corn
-
Events
- Unit - A unit Dies
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Dying unit)) Equal to Corn -temp
-
Then - Actions
- Unit - Replace (Dying unit) with a Corn new using The new unit's max life and mana
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Dying unit)) Equal to Corn new
-
Then - Actions
- Unit - Replace (Dying unit) with a Corn ready for harvest using The new unit's max life and mana
- Unit - Set life of (Last replaced unit) to 10.00
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Dying unit)) Equal to Corn ready for harvest
- ((Killing unit) belongs to an ally of (Owner of (Dying unit))) Equal to False
-
Then - Actions
- Player - Add 1 to (Owner of (Killing unit)) Food cap
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
Spell one plants a field of corn. It is a targeted type spell (like volcano) it creates crop units which are building-type units - this gives me the pathing space between each unit.
That unit has a life span of about half a second - it dies and is replaced by a non-building unit called Corn New. Corn new has a life of about 75 seconds its regeneration is negative -1 always) it dies and is replaced with a Corn Ready t Harvest which has its 60 Hp capability set to 10 hp. It has received "damage" and will be a target of a "heal" spell which heals one point and causes a casting unit to either harvest or plant more crops (which goes back to the building crop).
The spells work - I can have either a computer player's units out there in the fields harvesting or a player's units. If I have a small village with several fields the villagers with the harvest and plant ability not only harvest and plant the scurry back and forth from farm to farm - this adds a bit of life to the village - villagers with a purpose not just wandering around randomly.
So I really do not want to change the functions that take place - I just want to remove leaks here.
Thanks for your patience, help and time.