- Joined
- Aug 1, 2007
- Messages
- 535
I think my map is pretty cool, but every time someone shoots a bullet the average framerate goes down anywhere from .3 to 1.0
Something is clearly leaking, and leaking bad.
Here are the triggers that have to do with the bullets.
Something is clearly leaking, and leaking bad.
Here are the triggers that have to do with the bullets.
CreateBullet
CreateBullet
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Attack (rifle)
Actions
Set TEMPunit0 = (Casting unit)
Set TEMPplayer0 = (Owner of TEMPunit0)
Set TEMPpoint0 = (Position of TEMPunit0)
Set TEMPpoint1 = (Target point of ability being cast)
Set TEMPreal0 = (Angle from TEMPpoint0 to TEMPpoint1)
Unit - Create 1 Bullet (base) for TEMPplayer0 at TEMPpoint0 facing TEMPreal0 degrees
Set TEMPunit1 = (Last created unit)
Set TEMPinteger0 = (Terrain cliff level at TEMPpoint0)
Set TEMPinteger1 = (Terrain cliff level at TEMPpoint1)
-------- width --------
Set TEMPreal1 = (Distance between TEMPpoint0 and TEMPpoint1)
-------- height --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TEMPinteger0 Not equal to TEMPinteger1
Then - Actions
Set TEMPreal2 = (((Abs(((Real(TEMPinteger0)) - (Real(TEMPinteger1))))) x CliffHeights) + GunHeight)
Else - Actions
Set TEMPreal2 = 0.00
-------- speed --------
Set TEMPreal3 = (Current movement speed of TEMPunit1)
Set TEMPreal4 = ((Current movement speed of TEMPunit1) x BmovePeriod)
-------- hypotenuse --------
Set TEMPreal5 = (Square root(((Power(TEMPreal2, 2.00)) + (Power(TEMPreal1, 2.00)))))
Set TEMPreal6 = ((TEMPreal5 x BmovePeriod) / TEMPreal4)
Set TEMPreal0 = (TEMPreal4 x (TEMPreal2 / TEMPreal5))
Unit - Set life of TEMPunit1 to (STATplayerRange[(Player number of TEMPplayer0)] / 100.00)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TEMPinteger0 Greater than TEMPinteger1
Then - Actions
Set TEMPreal0 = (TEMPreal0 x -1.00)
Else - Actions
Cinematic - Clear the screen of text messages for (All players)
Unit - Add Crow Form to TEMPunit1
Animation - Change TEMPunit1 flying height to GunHeight at 0.00
Custom script: call AssignSlot( udg_TEMPunit1, udg_TEMPreal0, udg_TEMPplayer0 )
Custom script: call RemoveLocation( udg_TEMPpoint0 )
Custom script: call RemoveLocation( udg_TEMPpoint1 )
Alert
Alert
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Attack (rifle)
Actions
Set TEMPunit0 = (Casting unit)
Set TEMPplayer0 = (Owner of TEMPunit0)
Set TEMPpoint0 = (Position of TEMPunit0)
Set TEMPgroup0 = (Units within 3000.00 of TEMPpoint0 matching ((Unit-type of (Matching unit)) Equal to Ghoul))
Unit Group - Add all units of TEMPgroup0 to TEMPgroup1
Set TEMPgroup0 = (Units within 3000.00 of TEMPpoint0 matching ((Unit-type of (Matching unit)) Equal to Zombie))
Unit Group - Add all units of TEMPgroup0 to TEMPgroup1
Set TEMPgroup0 = (Units within 3000.00 of TEMPpoint0 matching ((Unit-type of (Matching unit)) Equal to Zombie (wanderer)))
Unit Group - Add all units of TEMPgroup0 to TEMPgroup1
Set TEMPgroup0 = (Units within 3000.00 of TEMPpoint0 matching ((Unit-type of (Matching unit)) Equal to Flesh Giant))
Unit Group - Pick every unit in TEMPgroup0 and do (Actions)
Loop - Actions
Set TEMPplayer1 = (Owner of (Picked unit))
Set TEMPforce0 = (Player group(TEMPplayer1))
Cinematic - Ping minimap for TEMPforce0 at TEMPpoint0 for 1.00 seconds
Set TEMPgroup2 = (Units owned by TEMPplayer1)
Unit Group - Remove all units of TEMPgroup2 from TEMPgroup0
Unit Group - Pick every unit in TEMPgroup1 and do (Actions)
Loop - Actions
Unit - Order (Picked unit) to Attack TEMPunit0
Custom script: call RemoveLocation( udg_TEMPpoint0 )
Custom script: call DestroyGroup( udg_TEMPgroup1 )
Custom script: call DestroyGroup( udg_TEMPgroup0 )
Custom script: call DestroyGroup( udg_TEMPgroup2 )
Custom script: call DestroyForce( udg_TEMPforce0 )
BulletDies
BulletDies
Events
Unit - A unit Dies
Conditions
(Unit-type of (Triggering unit)) Equal to Bullet (base)
Actions
Set TEMPunit0 = (Dying unit)
For each (Integer A) from 0 to 120, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TEMPunit0 Equal to Bullets[(Integer A)]
Then - Actions
Set TEMPinteger0 = (Integer A)
Set BulletSlots[TEMPinteger0] = False
Unit - Remove TEMPunit0 from the game
Custom script: set bj_forLoopAIndex = 121
Else - Actions
Custom script: if (bj_forLoopAIndex == 120) then
Unit - Remove TEMPunit0 from the game
Custom script: endif
MoveBullets
MoveBullets
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
Set TEMPgroup0 = (Units of type Bullet (base))
Unit Group - Pick every unit in TEMPgroup0 and do (Actions)
Loop - Actions
Set TEMPunit0 = (Picked unit)
For each (Integer A) from 0 to 120, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TEMPunit0 Equal to Bullets[(Integer A)]
Then - Actions
Set TEMPinteger2 = (Integer A)
Custom script: set bj_forLoopAIndex = 121
Else - Actions
Custom script: if (bj_forLoopAIndex == 120) then
Unit - Remove TEMPunit0 from the game
Set BulletSlots[TEMPinteger2] = False
Custom script: endif
Set TEMPplayer0 = (Owner of TEMPunit0)
Set TEMPpoint0 = (Position of TEMPunit0)
Set TEMPinteger0 = (Terrain cliff level at TEMPpoint0)
Set TEMPreal0 = (Facing of TEMPunit0)
-------- RoC --------
Set TEMPreal1 = BulletAltChange[(Integer A)]
-------- speed --------
Set TEMPreal2 = 100.00
Set TEMPreal3 = (Current flying height of TEMPunit0)
Set TEMPpoint1 = (TEMPpoint0 offset by TEMPreal2 towards TEMPreal0 degrees)
Set TEMPinteger1 = (Terrain cliff level at TEMPpoint1)
Set TEMPinteger3 = (Abs((TEMPinteger0 - TEMPinteger1)))
Set TEMPreal4 = (TEMPreal3 + TEMPreal1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TEMPinteger0 Greater than TEMPinteger1
Then - Actions
Set TEMPreal4 = (TEMPreal4 + (CliffHeights x (Real(TEMPinteger3))))
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TEMPinteger0 Less than TEMPinteger1
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TEMPreal4 Greater than or equal to (CliffHeights x (Real(TEMPinteger3)))
Then - Actions
Set TEMPreal4 = (TEMPreal4 - (CliffHeights x (Real(TEMPinteger3))))
Else - Actions
Unit - Remove TEMPunit0 from the game
Set BulletSlots[TEMPinteger2] = False
Custom script: call DestroyEffectBJ( AddSpecialEffectLocBJ( udg_TEMPpoint1, "Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl" ) )
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TEMPreal4 Less than 0.00
Then - Actions
Unit - Remove TEMPunit0 from the game
Set BulletSlots[TEMPinteger2] = False
Else - Actions
Set TEMPgroup1 = (Units within 50.00 of TEMPpoint1 matching ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) is an enemy of TEMPplayer0) Equal to True)))
Unit Group - Pick every unit in TEMPgroup1 and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TEMPgroup1 is empty) Equal to False
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TEMPreal4 Less than 128.00
Then - Actions
Custom script: call DestroyEffectBJ( AddSpecialEffectTargetUnitBJ( "chest", GetEnumUnit(), "Objects\\Spawnmodels\\Critters\\Albatross\\CritterBloodAlbatross.mdl" ) )
Unit - Cause Rifles[(Player number of TEMPplayer0)] to damage (Picked unit), dealing 200.00 damage of attack type Chaos and damage type Normal
Custom script: call DestroyGroup( udg_TEMPgroup1 )
Unit - Remove TEMPunit0 from the game
Set BulletSlots[TEMPinteger2] = False
Else - Actions
Else - Actions
Custom script: call DestroyGroup( udg_TEMPgroup1 )
Destructible - Pick every destructible within 50.00 of TEMPpoint1 and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Destructible-type of (Picked destructible)) Equal to Summer Tree Wall
(Destructible-type of (Picked destructible)) Equal to Pathing Blocker (Ground)
(Destructible-type of (Picked destructible)) Equal to Pathing Blocker (Ground)
Then - Actions
Custom script: call DestroyEffectBJ( AddSpecialEffectLocBJ( udg_TEMPpoint1, "Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl" ) )
Unit - Remove TEMPunit0 from the game
Set BulletSlots[TEMPinteger2] = False
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Playable map area) contains TEMPpoint1) Equal to True
Then - Actions
Unit - Move TEMPunit0 instantly to TEMPpoint1
Else - Actions
Unit - Remove TEMPunit0 from the game
Set BulletSlots[TEMPinteger2] = False
Game - Display to (All players) the text: (LastRec FlyHeight: + (String(TEMPreal4)))
Animation - Change TEMPunit1 flying height to TEMPreal4 at 0.00
Set BulletLife[(Integer A)] = (BulletLife[(Integer A)] - TEMPreal2)
Custom script: call RemoveLocation( udg_TEMPpoint0 )
Custom script: call RemoveLocation( udg_TEMPpoint1 )
Custom script: call RemoveLocation( udg_TEMPpoint0 )
Custom script: call RemoveLocation( udg_TEMPpoint1 )
Custom script: call DestroyGroup( udg_TEMPgroup0 )