• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[Trigger] Fire Dragon Needs more FPS

Status
Not open for further replies.
Level 16
Joined
Oct 12, 2008
Messages
1,570
Hi guys,,

i am currently working on a spell in which you summon a dragon that you control with the arrow keys,, (the same one i requested a model for)

As it is currently i like the movement,, the length of the dragon is nice,, and the speed is ok,, but it seems laggy due to too low Frames Per Second,,
It has 10 FPS currently, but when i try to turn that up, the speed rises!
My next action was to decrease the length it moves every step,, but then,, the length of teh dragon is too short =(

Here are my triggers:
  • Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Dragon
    • Actions
      • Set D_Caster[(Player number of (Owner of (Triggering unit)))] = No unit
      • Set D_Integer[(Player number of (Owner of (Triggering unit)))] = 0
      • Set D_Integer[(Player number of (Owner of (Triggering unit)))] = 0
      • Set D_Down[(Player number of (Owner of (Triggering unit)))] = False
      • Set D_Left[(Player number of (Owner of (Triggering unit)))] = False
      • Set D_Right[(Player number of (Owner of (Triggering unit)))] = False
      • Set D_Up[(Player number of (Owner of (Triggering unit)))] = False
      • Unit - Remove D_Head[(Player number of (Owner of (Triggering unit)))] from the game
      • Custom script: call RemoveLocation(udg_D_Point1[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
      • Custom script: call RemoveLocation(udg_D_Point2[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
      • Custom script: call RemoveLocation(udg_D_Point3[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
      • Custom script: call RemoveLocation(udg_D_Point4[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
      • Custom script: call RemoveLocation(udg_D_Point5[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
      • Custom script: call RemoveLocation(udg_D_Point6[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
      • Custom script: call RemoveLocation(udg_D_Point7[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
      • Custom script: call RemoveLocation(udg_D_Point8[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
      • Custom script: call RemoveLocation(udg_D_Point9[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
      • Custom script: call RemoveLocation(udg_D_Point10[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
      • Set D_Caster[(Player number of (Owner of (Casting unit)))] = (Casting unit)
      • Set D_Point1[(Player number of (Owner of (Casting unit)))] = ((Position of (Casting unit)) offset by 50.00 towards (Facing of (Casting unit)) degrees)
      • Unit - Create 1 Dragon Head for Neutral Passive at D_Point1[(Player number of (Owner of (Triggering unit)))] facing (Facing of (Triggering unit)) degrees
      • Set D_Head[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
  • Move
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • D_Caster[(Integer A)] Not equal to No unit
            • Then - Actions
              • Visibility - Destroy D_Visibility[(Integer A)]
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • D_Up[(Integer A)] Equal to False
                  • D_Left[(Integer A)] Equal to False
                  • D_Down[(Integer A)] Equal to False
                  • D_Right[(Integer A)] Equal to False
                • Then - Actions
                • Else - Actions
                  • Set D_Point10[(Integer A)] = D_Point9[(Integer A)]
                  • Set D_Point9[(Integer A)] = D_Point8[(Integer A)]
                  • Set D_Point8[(Integer A)] = D_Point7[(Integer A)]
                  • Set D_Point7[(Integer A)] = D_Point6[(Integer A)]
                  • Set D_Point6[(Integer A)] = D_Point5[(Integer A)]
                  • Set D_Point5[(Integer A)] = D_Point4[(Integer A)]
                  • Set D_Point4[(Integer A)] = D_Point3[(Integer A)]
                  • Set D_Point3[(Integer A)] = D_Point2[(Integer A)]
                  • Set D_Point2[(Integer A)] = D_Point1[(Integer A)]
              • -------- Up --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • D_Up[(Integer A)] Equal to True
                  • D_Left[(Integer A)] Equal to False
                  • D_Down[(Integer A)] Equal to False
                  • D_Right[(Integer A)] Equal to False
                • Then - Actions
                  • Set D_Point1[(Integer A)] = (D_Point2[(Integer A)] offset by 60.00 towards 90.00 degrees)
                  • Unit - Move D_Head[(Integer A)] instantly to D_Point1[(Integer A)], facing 90.00 degrees
                • Else - Actions
              • -------- Left --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • D_Left[(Integer A)] Equal to True
                  • D_Up[(Integer A)] Equal to False
                  • D_Down[(Integer A)] Equal to False
                  • D_Right[(Integer A)] Equal to False
                • Then - Actions
                  • Set D_Point1[(Integer A)] = (D_Point2[(Integer A)] offset by 60.00 towards 180.00 degrees)
                  • Unit - Move D_Head[(Integer A)] instantly to D_Point1[(Integer A)], facing 180.00 degrees
                • Else - Actions
              • -------- Down --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • D_Down[(Integer A)] Equal to True
                  • D_Up[(Integer A)] Equal to False
                  • D_Left[(Integer A)] Equal to False
                  • D_Right[(Integer A)] Equal to False
                • Then - Actions
                  • Set D_Point1[(Integer A)] = (D_Point2[(Integer A)] offset by 60.00 towards 270.00 degrees)
                  • Unit - Move D_Head[(Integer A)] instantly to D_Point1[(Integer A)], facing 270.00 degrees
                • Else - Actions
              • -------- Right --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • D_Right[(Integer A)] Equal to True
                  • D_Up[(Integer A)] Equal to False
                  • D_Left[(Integer A)] Equal to False
                  • D_Down[(Integer A)] Equal to False
                • Then - Actions
                  • Set D_Point1[(Integer A)] = (D_Point2[(Integer A)] offset by 60.00 towards 0.00 degrees)
                  • Unit - Move D_Head[(Integer A)] instantly to D_Point1[(Integer A)], facing 0.00 degrees
                • Else - Actions
              • -------- Up Left --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • D_Up[(Integer A)] Equal to True
                  • D_Left[(Integer A)] Equal to True
                  • D_Down[(Integer A)] Equal to False
                  • D_Right[(Integer A)] Equal to False
                • Then - Actions
                  • Set D_Point1[(Integer A)] = (D_Point2[(Integer A)] offset by 40.00 towards 135.00 degrees)
                  • Unit - Move D_Head[(Integer A)] instantly to D_Point1[(Integer A)], facing 135.00 degrees
                • Else - Actions
              • -------- Down Left --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • D_Down[(Integer A)] Equal to True
                  • D_Left[(Integer A)] Equal to True
                  • D_Up[(Integer A)] Equal to False
                  • D_Right[(Integer A)] Equal to False
                • Then - Actions
                  • Set D_Point1[(Integer A)] = (D_Point2[(Integer A)] offset by 40.00 towards 225.00 degrees)
                  • Unit - Move D_Head[(Integer A)] instantly to D_Point1[(Integer A)], facing 225.00 degrees
                • Else - Actions
              • -------- Down Right --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • D_Down[(Integer A)] Equal to True
                  • D_Right[(Integer A)] Equal to True
                  • D_Up[(Integer A)] Equal to False
                  • D_Left[(Integer A)] Equal to False
                • Then - Actions
                  • Set D_Point1[(Integer A)] = (D_Point2[(Integer A)] offset by 40.00 towards 315.00 degrees)
                  • Unit - Move D_Head[(Integer A)] instantly to D_Point1[(Integer A)], facing 315.00 degrees
                • Else - Actions
              • -------- Up Right --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • D_Up[(Integer A)] Equal to True
                  • D_Right[(Integer A)] Equal to True
                  • D_Left[(Integer A)] Equal to False
                  • D_Down[(Integer A)] Equal to False
                • Then - Actions
                  • Set D_Point1[(Integer A)] = (D_Point2[(Integer A)] offset by 40.00 towards 45.00 degrees)
                  • Unit - Move D_Head[(Integer A)] instantly to D_Point1[(Integer A)], facing 45.00 degrees
                • Else - Actions
              • Visibility - Create an initially Enabled visibility modifier for (Owner of D_Caster[(Integer A)]) emitting Visibility from D_Point1[(Integer A)] to a radius of 400.00
              • Set D_Visibility[(Integer A)] = (Last created visibility modifier)
              • Camera - Pan camera for (Owner of D_Caster[(Integer A)]) to D_Point1[(Integer A)] over 0.10 seconds
              • Special Effect - Create a special effect at D_Point2[(Integer A)] using Abilities\Weapons\FireBallMissile\FireBallMissile.mdl
              • Special Effect - Destroy (Last created special effect)
              • Special Effect - Create a special effect at D_Point3[(Integer A)] using Abilities\Weapons\FireBallMissile\FireBallMissile.mdl
              • Special Effect - Destroy (Last created special effect)
              • Special Effect - Create a special effect at D_Point4[(Integer A)] using Abilities\Weapons\FireBallMissile\FireBallMissile.mdl
              • Special Effect - Destroy (Last created special effect)
              • Special Effect - Create a special effect at D_Point5[(Integer A)] using Abilities\Weapons\FireBallMissile\FireBallMissile.mdl
              • Special Effect - Destroy (Last created special effect)
              • Special Effect - Create a special effect at D_Point6[(Integer A)] using Abilities\Weapons\FireBallMissile\FireBallMissile.mdl
              • Special Effect - Destroy (Last created special effect)
              • Special Effect - Create a special effect at D_Point7[(Integer A)] using Abilities\Weapons\FireBallMissile\FireBallMissile.mdl
              • Special Effect - Destroy (Last created special effect)
              • Special Effect - Create a special effect at D_Point8[(Integer A)] using Abilities\Weapons\FireBallMissile\FireBallMissile.mdl
              • Special Effect - Destroy (Last created special effect)
              • Special Effect - Create a special effect at D_Point9[(Integer A)] using Abilities\Weapons\FireBallMissile\FireBallMissile.mdl
              • Special Effect - Destroy (Last created special effect)
              • Special Effect - Create a special effect at D_Point10[(Integer A)] using Abilities\Weapons\FireBallMissile\FireBallMissile.mdl
              • Special Effect - Destroy (Last created special effect)
              • Set D_Integer[(Integer A)] = (D_Integer[(Integer A)] + 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • D_Integer[(Integer A)] Greater than or equal to 200
                • Then - Actions
                  • Set D_Caster[(Integer A)] = No unit
                  • Set D_Integer[(Integer A)] = 0
                  • Set D_Integer[(Integer A)] = 0
                  • Set D_Down[(Integer A)] = False
                  • Set D_Left[(Integer A)] = False
                  • Set D_Right[(Integer A)] = False
                  • Set D_Up[(Integer A)] = False
                  • Unit - Remove D_Head[(Integer A)] from the game
                  • Custom script: call RemoveLocation(udg_D_Point1[GetForLoopIndexA()])
                  • Custom script: call RemoveLocation(udg_D_Point2[GetForLoopIndexA()])
                  • Custom script: call RemoveLocation(udg_D_Point3[GetForLoopIndexA()])
                  • Custom script: call RemoveLocation(udg_D_Point4[GetForLoopIndexA()])
                  • Custom script: call RemoveLocation(udg_D_Point5[GetForLoopIndexA()])
                  • Custom script: call RemoveLocation(udg_D_Point6[GetForLoopIndexA()])
                  • Custom script: call RemoveLocation(udg_D_Point7[GetForLoopIndexA()])
                  • Custom script: call RemoveLocation(udg_D_Point8[GetForLoopIndexA()])
                  • Custom script: call RemoveLocation(udg_D_Point9[GetForLoopIndexA()])
                  • Custom script: call RemoveLocation(udg_D_Point10[GetForLoopIndexA()])
                  • Visibility - Destroy D_Visibility[(Integer A)]
                • Else - Actions
            • Else - Actions
There are more triggers,, but all they do is turn the booleans true or false,,
(If you need them,, say please!)

Anyone can think of something to make it move nicer, but with the same speed, and the same dragon length???

Every help is welcome and will be awarded with +rep!!

Yixx,,


EDIT: Please post a reply if you are even THINKING about the problem =)
cause i would like to know if anyone is even trying,,
 
Last edited:
Level 29
Joined
Jul 29, 2007
Messages
5,174
Why must the user press only one one key? If you remove all those unneeded conditions you would be able to walk diagonally.

I recommend you to put 25 FPS (0.04). Since you say the 'dragon' is shorter... why the hell don't you simply raise the distance between each point?
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
Look likely,, there are 9 if/then/elses,,
4 for North, East, South and West
and 4 for NorthEast Northwest SouthEast and SouthWest,,
(and one for not making it shorter if you do nothing)
If you read what i said ( and if you think about it) if i raise the distance,, it will become Faster,, and that is Not what I need,,

Dont get me wrong,, I appreciate your help,, but it hasnt been helpfull YET,,
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
Yes there is,, cause i once put them in the wrong order,,
Left and Up was true,, So it set the point1 to left-up
but the IF THEN ELSE behind that one only needed Left to be true,, so that one moved the head to left,, instead of left-up,,
But that isn't the point,, that all works fine,, i just want it not to look Laggy

And it WILL move faster,, cause the distance between the points is also the distance it moves every X secs
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
Ok,, i will have to make a variable for the move distance,, and for the distance between points distance?? But where should i use which one?
I will make D_PointDist and D_MoveDist,,
Where should i use which? Cause that is the solution to the problem,,

Credits and +rep if you can give me the answer to this =D

(Need the map? i can send it to you,,)
 

Attachments

  • (1) Dragon!! 10 FPS.w3x
    26.8 KB · Views: 30
Last edited:
Status
Not open for further replies.
Top