- Joined
- Dec 31, 2014
- Messages
- 68
Hi all, long post Warning so sorry about that. Basically I have reached another impasse with my level in terms of memory leakage and I'd like to post a few of my triggers here for you all to take a look at. I'll try to be as descriptive as I can, I'll also include how many of each trigger type I have and If some of you can suggest fixes, or know how to merge a few of them down please let me know.
I have read up on Memory leaking thoroughly on various posts so please don't just direct me to one of them
My Level is a Single/Multiplayer RPG map and a typical playthrough is around 8-10 hours, at around the 7:30h mark (without assigning more Virtual Memory) the game usually crashes.
In the task manager, when first booting up the level the memory reads 430,000k and at the 7:30h mark it reaches approx 930,000k (Gradually rising 500,000k for that period). Ideally I want to keep the memory nearer the starting mark, but if not and I get another 5 hours or so safe playtime before it crashes that would be acceptable.
When suggesting things, even though I have experience in triggers can you please include examples. At a rough count I have 724 Triggers and 73 Variables.
I think for this thread I'll limit the triggers to 15, may make a new thread for other triggers also.
1.Enemies which come alive if you go too close to them (5 Triggers)
10. A Unit enters a region (which isn't owned by player 12) takes damage - I have already condensed this down to 1 Trigger for the Entire level, Here is a short sample..
11.Fake AI triggers (8 Triggers)
A trigger turns these on when a unit enters certain regions, they are Off at Map initialisation.
I have read up on Memory leaking thoroughly on various posts so please don't just direct me to one of them
My Level is a Single/Multiplayer RPG map and a typical playthrough is around 8-10 hours, at around the 7:30h mark (without assigning more Virtual Memory) the game usually crashes.
In the task manager, when first booting up the level the memory reads 430,000k and at the 7:30h mark it reaches approx 930,000k (Gradually rising 500,000k for that period). Ideally I want to keep the memory nearer the starting mark, but if not and I get another 5 hours or so safe playtime before it crashes that would be acceptable.
When suggesting things, even though I have experience in triggers can you please include examples. At a rough count I have 724 Triggers and 73 Variables.
I think for this thread I'll limit the triggers to 15, may make a new thread for other triggers also.
------------------------
Ok here goes..1.Enemies which come alive if you go too close to them (5 Triggers)
-
Events
-
Unit - A unit enters AliveEnemy1<gen>
-
-
Conditions
-
((Triggering unit) is A Hero) Equal to True
-
-
Actions
-
Sound - Play It'sAlive<gen>
-
Unit - Replace Sleeper 557 <gen> with a Awakened using The new unit's default life and mana
-
Unit - Cause (Last replaced unit) to damage (Triggering unit), dealing 200.00 damage of attack type Normal and damage type Magic
-
Custom script: call DestroyTrigger( GetTriggeringTrigger() )
-
-
Events
-
Unit - A unit enters ShakeCamera1 <gen>
-
-
Conditions
-
((Triggering unit) is A Hero) Equal to True
-
-
Actions
-
Sound - Play Rumble<gen>
-
Trigger - Turn off (This trigger)
-
Game - Display to Team1 for 10.00 seconds the text: Shake!
-
Camera - Shake the camera for Player 1 (Red) with magnitude 8.00
-
Camera - Shake the camera for Player 2 (Blue) with magnitude 8.00
-
Camera - Shake the camera for Player 3 (Teal) with magnitude 8.00
-
Wait 1.00 seconds
-
Camera - Stop swaying/shaking the camera for Player 1 (Red)
-
Camera - Stop swaying/shaking the camera for Player 2 (Blue)
-
Camera - Stop swaying/shaking the camera for Player 3 (Teal)
-
Custom script: call DestroyTrigger(GetTriggeringTrigger())
-
-
Events
-
Unit - A unit enters NPCDialog1 <gen>
-
-
Conditions
-
((Entering unit) is A Hero) Equal to True
-
-
Actions
-
Trigger - Turn off (This trigger)
-
Cinematic - Turn subtitle display override On
-
Player Group - Remove all players from TempplayerGroup
-
Player Group - Add (Owner of (Triggering unit)) to TempplayerGroup
-
Cinematic - Send transmission to TempplayerGroup from Merchant (NPC) 0450 <gen> named Merchant: Play No sound and display Hello! Modify duration: Add 5.00 seconds and Wait
-
Player Group - Remove all players from TempplayerGroup
-
Wait 10.00 seconds
-
Trigger - Turn on (This trigger)
-
-
Events
-
Unit - A unit enters Tele1<gen>
-
-
Conditions
-
Actions
-
Set Point = (Center of X <gen>)
-
Unit - Move (Triggering unit) instantly to Point
-
Custom script: call RemoveLocation(udg_Point)
-
-
Events
-
Unit - A unit enters FirstMessage <gen>
-
-
Conditions
-
((Entering unit) is A Hero) Equal to True
-
-
Actions
-
Player Group - Remove all players from TempplayerGroup
-
Player Group - Add (Owner of (Triggering unit)) to TempplayerGroup
-
Game - Display to TempplayerGroup for 5.00 seconds the text: Welcome...
-
Player Group - Remove all players from TempplayerGroup
-
-
Events
-
Unit - A unit enters Lumber1 Trigger <gen>
-
-
Conditions
-
(((Triggering unit) is A Hero) Equal to True) and ((Owner of (Triggering unit)) Not equal to Player 12 (Brown))
-
-
Actions
-
Sound - Play Lumber<gen>
-
Player - Add 300 to Player 1 (Red) Current lumber
-
Player - Add 300 to Player 2 (Blue) Current lumber
-
Player - Add 300 to Player 3 (Teal) Current lumber
-
Game - Display to Team1 for 10.00 seconds the text: Lumber!
-
Trigger - Turn off (This trigger)
-
Custom script: call DestroyTrigger(GetTriggeringTrigger())
-
-
Events
-
Unit - A unit owned by Player 1 (Red) Finishes reviving
-
-
Conditions
-
(Owner of (Triggering unit)) Equal to Player 1 (Red)
-
-
Actions
-
Camera - Lock camera target for Player 1 (Red) to (Reviving Hero), offset by (0.00, 0.00) using Default rotation
-
Game - Display to (All players matching ((Owner of (Triggering unit)) Not equal to Player 1 (Red))) the text: Player 1 has been r...
-
Sound - Play Revived<gen>
-
Camera - Set (Triggering player)'s camera Distance to target to 1500.00 over 0.00 seconds
-
-
Events
-
Unit - A unit enters Respawnatstartifdie <gen>
-
-
Conditions
-
(((Triggering unit) is A Hero) Equal to True) and ((Owner of (Triggering unit)) Equal to Player 1 (Red))
-
-
Actions
-
Trigger - Turn on p1 Respawn at Area1 <gen>
-
-------- Turnoff --------
-
Trigger - Turn off p1 Respawn at Area2 <gen>
-
Trigger - Turn off p1 Respawn at Area3 <gen>
-
Trigger - Turn off p1 Respawn at Area4 <gen>
-
Trigger - Turn off p1 Respawn at Area5 <gen>
-
Trigger - Turn off p1 Respawn at Area6 <gen>
-
Trigger - Turn off p1 Respawn at Area7 <gen>
-
Trigger - Turn off p1 Respawn at Area8 <gen>
-
Trigger - Turn off p1 Respawn at Area9 <gen>
-
Trigger - Turn off p1 Respawn at Area10 <gen>
-
Trigger - Turn off p1 Respawn at Area11 <gen>
-
Trigger - Turn off p1 Respawn at Area12 <gen>
-
Trigger - Turn off p1 Respawn at Area13 <gen>
-
Trigger - Turn off p1 Respawn at Area14 <gen>
-
Trigger - Turn off p1 Respawn at Area15 <gen>
-
Trigger - Turn off p1 Respawn at Area16 <gen>
-
-
Events
-
Unit - A unit owned by Player 1 (Red) Dies
-
-
Conditions
-
((Triggering unit) is A Hero) Equal to True
-
-
Actions
-
Wait 10.00 seconds
-
Set RevivalPoint = (Center of Area1 <gen>)
-
Hero - Instantly revive (Dying unit) at RevivalPoint, Hide revival graphics
-
Custom script: call RemoveLocation(udg_RevivalPoint)
-
-----------------------------------------------------------------------
10. A Unit enters a region (which isn't owned by player 12) takes damage - I have already condensed this down to 1 Trigger for the Entire level, Here is a short sample..
-
Events
-
Time - Every 0.30 seconds of game time
-
-
Conditions
-
Actions
-
-------- ------------------PoisonArea1------------------- --------
-
-------- Poison1 --------
-
Set PoisonGround = (Units in Poison1 <gen>)
-
Unit Group - Pick every unit in PoisonGround and do (Actions)
-
Loop - Actions
-
Set Temp_Pickedunit = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of Temp_Pickedunit) Not equal to Player 12 (Brown)
-
-
Then - Actions
-
Unit - Cause (Picked unit) to damage Temp_Pickedunit, dealing 50.00 damage of attack type Pierce and damage type Normal
-
-
Else - Actions
-
-------- Do Nothing --------
-
-
-
-
-
Custom script: call DestroyGroup (udg_PoisonGround)
-
-------- Poison2 --------
-
Set PoisonGround = (Units in Poison2 <gen>)
-
Unit Group - Pick every unit in PoisonGround and do (Actions)
-
Loop - Actions
-
Set Temp_Pickedunit = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of Temp_Pickedunit) Not equal to Player 12 (Brown)
-
-
Then - Actions
-
Unit - Cause (Picked unit) to damage Temp_Pickedunit, dealing 50.00 damage of attack type Pierce and damage type Normal
-
-
Else - Actions
-
-------- Do Nothing --------
-
-
-
-
-
Custom script: call DestroyGroup (udg_PoisonGround)
-
11.Fake AI triggers (8 Triggers)
A trigger turns these on when a unit enters certain regions, they are Off at Map initialisation.
-
Events
-
Time - Every 40.00 seconds of game time
-
-
Conditions
-
Actions
-
Unit - Boss1 <gen> to Night Elf Priestess Of The Moon - Starfall
-
-
Events
-
Unit - A unit enters (Playable map area)
-
-
Conditions
-
(Owner of (Entering unit)) Equal to Player 1 (Red)
-
-
Actions
-
Game - Display to Player Group - Player 1 (Red) the text: View the Quest's Me...
-
Quest - Flash the quest dialog button
-
Game - Display to Player Group - Player 1 (Red) the text: Add your first hero...
-
Custom script: call DestroyTrigger(GetTriggeringTrigger())
-
-
Events
-
Player - Player 1 (Red) leaves the game
-
Player - Player 2 (Blue) leaves the game
-
Player - Player 3 (Teal) leaves the game
-
-
Conditions
-
Actions
-
Game - Display to Team1 the text: A player has left t...
-
-
Manual
-
Events
-
Time - Elapsed game time is 0.20 seconds
-
-
Conditions
-
Actions
-
Player - Change color of Player 1 (Red) to Gray, Changing color of existing units
-
Player - Change color of Player 2 (Blue) to Orange, Changing color of existing units
-
Player - Change color of Player 3 (Teal) to Green, Changing color of existing units
-
Quest - Create a Optional quest titled Movement & Abilitie... with the description Movement Standard ..., using icon path war3mapImported\HeroAttritubes.tga
-
Quest - Create a Optional quest titled NPC's & Enemies with the description Non Player Characte..., using icon path ReplaceableTextures\CommandButtons\BTNHeroMountainKing.blp
-
Quest - Create a Optional quest titled Attributes/Stats with the description Intelligence - Addi..., using icon path ReplaceableTextures\CommandButtons\BTN_Levelup.tga
-
Quest - Create a Optional quest titled Weapons with the description Weapons can be foun..., using icon path ReplaceableTextures\CommandButtons\BTN_Axe.tga
-
Quest - Create a Optional quest titled Armor and Shields with the description Both raise your def..., using icon path ReplaceableTextures\CommandButtons\BTN_knightshield.tga
-
Quest - Create a Optional quest titled Magic with the description There are 3 types o..., using icon path ReplaceableTextures\CommandButtons\BTN_SoulArrow.tga
-
Trigger - Turn off (This trigger)
-
Custom script: call DestroyTrigger( gg_trg_Manual )
-
-
-
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 Enemy1
-
-
Then - Actions
-
Player - Add 100 to Player 1 (Red) Current gold
-
Player - Add 100 to Player 2 (Blue) Current gold
-
Player - Add 100 to Player 3 (Teal) Current gold
-
Game - Display to Team1 the text: You Win 100 Gold
-
Wait 0.50 seconds
-
Sound - Play Gold <gen>
-
-
Else - Actions
-
-------- Do Nothing --------
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Dying unit)) Equal to Enemy2
-
-
Then - Actions
-
Player - Add 200 to Player 1 (Red) Current gold
-
Player - Add 200 to Player 2 (Blue) Current gold
-
Player - Add 200 to Player 3 (Teal) Current gold
-
Game - Display to Team1 the text: You Win 200 Gold
-
Wait 0.50 seconds
-
Sound - Play Gold <gen>
-
-
Else - Actions
-
-------- Do Nothing --------
-
-
-