• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] What is wrong?

Status
Not open for further replies.
Level 6
Joined
Jan 29, 2011
Messages
46
I create my own missile system. It must be MUI and I use the indexing. But when one caster throws a missile just (1-5 sec) after other. The missile only stands. If you don't understand the triggers download the map.

  • MS Variables
    • Acontecimientos
    • Condiciones
    • Acciones
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • Si: Condiciones
          • MSA_Integer[1] Igual a 0
        • Entonces: Acciones
          • Detonador - Turn on MS Loop <gen>
        • Otros: Acciones
      • Set MSA_Integer[1] = (MSA_Integer[1] + 1)
      • Set MSA_Integer[2] = (MSA_Integer[2] + 1)
      • Set MSA_Caster[MSA_Integer[2]] = MS_Caster
      • -------- Touch Settings --------
      • Set MSA_AllyTouch[MSA_Integer[2]] = MS_AllyTouch
      • Set MSA_EnemyTouch[MSA_Integer[2]] = MS_EnemyTouch
      • Set MSA_DestructibleTouch[MSA_Integer[2]] = MS_DestructibleTouch
      • Set MSA_MaxTouched[MSA_Integer[2]] = MS_MaxTouched
      • Set MSA_MaxTouchBoleean[MSA_Integer[3]] = MS_MaxTouchBoleean
      • Set MSA_TouchArea[MSA_Integer[2]] = MS_TouchArea
      • -------- ---------------------------- --------
      • -------- Homing Settings --------
      • Set MSA_HomingBoleean[MSA_Integer[2]] = MS_HomingBoleean
      • Set MSA_HomingDistance[MSA_Integer[2]] = MS_HomingDistance
      • -------- ---------------------------- --------
      • -------- Missile Settings --------
      • Set MSA_MissileType[MSA_Integer[2]] = MS_MissileType
      • Set MSA_Damage[MSA_Integer[2]] = MS_Damage
      • Set MSA_RepeatDamage[MSA_Integer[2]] = MS_RepeatDamage
      • Set MSA_FrontAngle[MSA_Integer[2]] = MS_FrontAngle
      • -------- ---------------------------- --------
      • -------- Velocity Settings --------
      • Set MSA_Velocity[MSA_Integer[2]] = MS_Velocity
      • Set MSA_IncreaseBoleean[MSA_Integer[2]] = MS_IncreaseBoleean
      • Set MSA_DecreaseBoleean[MSA_Integer[2]] = MS_DecreaseBoleean
      • Set MSA_MaxDistance[MSA_Integer[2]] = MS_MaxDistance
      • Set MSA_DecreaseVelocity[MSA_Integer[2]] = MS_DecreaseVelocity
      • Set MSA_IncreaseVelocity[MSA_Integer[2]] = MS_IncreaseVelocity
      • -------- ---------------------------- --------
      • -------- Special Settings --------
      • Set MSA_FreezeBoleean[MSA_Integer[2]] = MS_FreezeBoleean
      • Set MSA_FreezeLimit[MSA_Integer[2]] = MS_FreezeLimit
      • Set MSA_FreezeEffect[MSA_Integer[2]] = MS_FreezeEffect
      • -------- ---------------------------- --------
      • Set MSA_Angle = (MSA_FrontAngle[MSA_Integer[2]] / (Real(MS_MissileNumber)))
      • Set MSA_AngleAdd = MSA_Angle
      • Set MSA_Angle = (MSA_Angle / (Real(MS_MissileNumber)))
      • For each (Integer A) from 1 to MS_MissileNumber, do (Actions)
        • Bucle: Acciones
          • Set MSA_MissilePosition = (Position of MSA_Caster[MSA_Integer[2]])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • Si: Condiciones
              • MS_MissileNumber No igual a 1
            • Entonces: Acciones
              • Unidad - Create 1 MSA_MissileType[MSA_Integer[2]] for Neutral pasivo at MSA_MissilePosition facing (((Facing of MSA_Caster[MSA_Integer[2]]) - MSA_AngleAdd) + MSA_Angle) degrees
            • Otros: Acciones
              • Unidad - Create 1 MSA_MissileType[MSA_Integer[2]] for Neutral pasivo at MSA_MissilePosition facing (Facing of MSA_Caster[MSA_Integer[2]]) degrees
          • Set MSA_Angle = (MSA_Angle + MSA_AngleAdd)
          • Grupo de unidad - Add (Last created unit) to MSA_Missiles[MSA_Integer[2]]
          • Custom script: call RemoveLocation (udg_MSA_MissilePosition)


  • MS Loop
    • Acontecimientos
      • Tiempo - Every 0.01 seconds of game time
    • Condiciones
    • Acciones
      • For each (Integer MSA_Integer[3]) from 1 to MSA_Integer[2], do (Actions)
        • Bucle: Acciones
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • Si: Condiciones
              • (MSA_Missiles[MSA_Integer[3]] is empty) Igual a True
            • Entonces: Acciones
              • Set MSA_Integer[1] = (MSA_Integer[1] - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • Si: Condiciones
                  • MSA_Integer[1] Igual a 0
                • Entonces: Acciones
                  • Set MSA_Integer[2] = 0
                  • Detonador - Turn off (This trigger)
                • Otros: Acciones
            • Otros: Acciones
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • Si: Condiciones
                  • MSA_MaxDistance[MSA_Integer[3]] Mayor que 0.50
                  • MSA_Velocity[MSA_Integer[3]] Mayor que 0.50
                • Entonces: Acciones
                  • Grupo de unidad - Pick every unit in MSA_Missiles[MSA_Integer[3]] and do (Actions)
                    • Bucle: Acciones
                      • Set MSA_Missile = (Picked unit)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • Si: Condiciones
                          • (Custom value of MSA_Missile) Menor que MSA_MaxTouched[MSA_Integer[3]]
                        • Entonces: Acciones
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • Si: Condiciones
                              • MSA_RepeatDamage[MSA_Integer[3]] Igual a True
                            • Entonces: Acciones
                              • -------- Simple --------
                              • Grupo de unidad - Remove all units from MSA_UnitsTouched[MSA_Integer[3]]
                            • Otros: Acciones
                          • -------- Check the Homing Boleean --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • Si: Condiciones
                              • MSA_HomingBoleean[MSA_Integer[3]] Igual a False
                            • Entonces: Acciones
                              • Set MSA_MissilePosition = (Position of MSA_Missile)
                              • Set MSA_PointToMove = (MSA_MissilePosition offset by MSA_Velocity[MSA_Integer[3]] towards (Facing of MSA_Missile) degrees)
                              • Unidad - Move MSA_Missile instantly to MSA_PointToMove
                              • Custom script: call RemoveLocation (udg_MSA_MissilePosition)
                            • Otros: Acciones
                              • Set MSA_MissilePosition = (Position of MSA_Missile)
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • Si: Condiciones
                                  • (MSA_PursuitedUnit is alive) Igual a True
                                • Entonces: Acciones
                                  • Set MSA_PursuitedPoint = (Position of MSA_PursuitedUnit)
                                  • Set MSA_PointToMove = (MSA_MissilePosition offset by MSA_Velocity[MSA_Integer[3]] towards (Angle from MSA_MissilePosition to MSA_PursuitedPoint) degrees)
                                  • Unidad - Move MSA_Missile instantly to MSA_PointToMove
                                  • Custom script: call RemoveLocation (udg_MSA_PursuitedPoint)
                                • Otros: Acciones
                                  • Custom script: set bj_wantDestroyGroup=true
                                  • Grupo de unidad - Pick every unit in (Units within MSA_HomingDistance[MSA_Integer[3]] of MSA_MissilePosition matching (((Matching unit) is alive) Igual a True)) and do (Actions)
                                    • Bucle: Acciones
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • Si: Condiciones
                                          • (Picked unit) No igual a Ninguna unidad
                                          • (Picked unit) No igual a MSA_Caster[MSA_Integer[3]]
                                          • ((Picked unit) is in MSA_UnitsTouched[MSA_Integer[3]]) Igual a False
                                          • ((Picked unit) is Una unidad voladora) Igual a False
                                        • Entonces: Acciones
                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            • Si: Condiciones
                                              • MSA_AllyTouch[MSA_Integer[3]] Igual a True
                                              • ((Picked unit) belongs to an ally of (Owner of MSA_Caster[MSA_Integer[3]])) Igual a True
                                            • Entonces: Acciones
                                              • Set MSA_PursuitedUnit = (Picked unit)
                                              • Set MSA_PursuitedPoint = (Position of MSA_PursuitedUnit)
                                              • Set MSA_PointToMove = (MSA_MissilePosition offset by MSA_Velocity[MSA_Integer[3]] towards (Angle from MSA_MissilePosition to MSA_PursuitedPoint) degrees)
                                              • Unidad - Move MSA_Missile instantly to MSA_PointToMove
                                              • Custom script: call RemoveLocation (udg_MSA_PursuitedPoint)
                                            • Otros: Acciones
                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            • Si: Condiciones
                                              • MSA_EnemyTouch[MSA_Integer[3]] Igual a True
                                              • ((Picked unit) belongs to an enemy of (Owner of MSA_Caster[MSA_Integer[3]])) Igual a True
                                            • Entonces: Acciones
                                              • Set MSA_PursuitedUnit = (Picked unit)
                                              • Set MSA_PursuitedPoint = (Position of MSA_PursuitedUnit)
                                              • Set MSA_PointToMove = (MSA_MissilePosition offset by MSA_Velocity[MSA_Integer[3]] towards (Angle from MSA_MissilePosition to MSA_PursuitedPoint) degrees)
                                              • Unidad - Move MSA_Missile instantly to MSA_PointToMove
                                              • Custom script: call RemoveLocation (udg_MSA_PursuitedPoint)
                                            • Otros: Acciones
                                        • Otros: Acciones
                                          • Set MSA_MissilePosition = (Position of (Picked unit))
                                          • Set MSA_PointToMove = (MSA_MissilePosition offset by MSA_Velocity[MSA_Integer[3]] towards (Facing of (Picked unit)) degrees)
                                          • Unidad - Move MSA_Missile instantly to MSA_PointToMove
                                          • Custom script: call RemoveLocation (udg_MSA_MissilePosition)
                              • Custom script: call RemoveLocation (udg_MSA_MissilePosition)
                          • -------- Damages --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • Si: Condiciones
                              • MSA_AllyTouch[MSA_Integer[3]] Igual a True
                            • Entonces: Acciones
                              • Custom script: set bj_wantDestroyGroup=true
                              • Grupo de unidad - Pick every unit in (Units within MSA_TouchArea[MSA_Integer[3]] of MSA_PointToMove matching (((Matching unit) belongs to an ally of (Owner of MSA_Caster[MSA_Integer[3]])) Igual a True)) and do (Actions)
                                • Bucle: Acciones
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • Si: Condiciones
                                      • (Picked unit) No igual a Ninguna unidad
                                      • (Picked unit) No igual a MSA_Caster[MSA_Integer[3]]
                                      • ((Picked unit) is in MSA_UnitsTouched[MSA_Integer[3]]) Igual a False
                                      • ((Picked unit) is alive) Igual a True
                                      • ((Picked unit) is Una unidad voladora) Igual a False
                                    • Entonces: Acciones
                                      • Unidad - Cause MSA_Caster[MSA_Integer[3]] to damage (Picked unit), dealing MSA_Damage[MSA_Integer[3]] damage of attack type Conjuros and damage type Sónico
                                      • Grupo de unidad - Add (Picked unit) to MSA_UnitsTouched[MSA_Integer[3]]
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • Si: Condiciones
                                          • MSA_MaxTouchBoleean[MSA_Integer[3]] Igual a True
                                        • Entonces: Acciones
                                          • Unidad - Set the custom value of MSA_Missile to ((Custom value of MSA_Missile) + 1)
                                        • Otros: Acciones
                                      • -------- Special --------
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • Si: Condiciones
                                          • MSA_PoisonBoleean[MSA_Integer[3]] Igual a True
                                        • Entonces: Acciones
                                          • Set MSP_Source = MSA_Caster[MSA_Integer[3]]
                                          • Set MSP_Unit1 = (Picked unit)
                                          • Set MSP_Damage2 = (MSA_Damage[MSA_Integer[3]] / 2.00)
                                          • Set MSP_Limit2 = MSA_PoisonLimit[MSA_Integer[3]]
                                          • Set MSP_SpecialEffect = MSA_PoisonEffect[MSA_Integer[3]]
                                          • Detonador - Run MS DOT Init <gen> (checking conditions)
                                        • Otros: Acciones
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • Si: Condiciones
                                          • MSA_FreezeBoleean[MSA_Integer[3]] Igual a True
                                        • Entonces: Acciones
                                          • Set MSS_Source1 = MSA_Caster[MSA_Integer[3]]
                                          • Set MSS_Unit1 = (Picked unit)
                                          • Set MSS_Limit1 = MSA_FreezeLimit[MSA_Integer[3]]
                                          • Set MSS_SpecialEffect = MSA_FreezeEffect[MSA_Integer[3]]
                                          • Detonador - Run MS Stop Init <gen> (checking conditions)
                                        • Otros: Acciones
                                    • Otros: Acciones
                            • Otros: Acciones
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • Si: Condiciones
                              • MSA_EnemyTouch[MSA_Integer[3]] Igual a True
                            • Entonces: Acciones
                              • Custom script: set bj_wantDestroyGroup=true
                              • Grupo de unidad - Pick every unit in (Units within MSA_TouchArea[MSA_Integer[3]] of MSA_PointToMove matching (((Matching unit) belongs to an enemy of (Owner of MSA_Caster[MSA_Integer[3]])) Igual a True)) and do (Actions)
                                • Bucle: Acciones
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • Si: Condiciones
                                      • (Picked unit) No igual a Ninguna unidad
                                      • ((Picked unit) is in MSA_UnitsTouched[MSA_Integer[3]]) Igual a False
                                      • ((Picked unit) is alive) Igual a True
                                      • ((Picked unit) is Una unidad voladora) Igual a False
                                    • Entonces: Acciones
                                      • Unidad - Cause MSA_Caster[MSA_Integer[3]] to damage (Picked unit), dealing MSA_Damage[MSA_Integer[3]] damage of attack type Conjuros and damage type Sónico
                                      • Grupo de unidad - Add (Picked unit) to MSA_UnitsTouched[MSA_Integer[3]]
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • Si: Condiciones
                                          • MSA_MaxTouchBoleean[MSA_Integer[3]] Igual a True
                                        • Entonces: Acciones
                                          • Unidad - Set the custom value of MSA_Missile to ((Custom value of MSA_Missile) + 1)
                                        • Otros: Acciones
                                      • -------- Special --------
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • Si: Condiciones
                                          • MSA_PoisonBoleean[MSA_Integer[3]] Igual a True
                                        • Entonces: Acciones
                                          • Set MSP_Source = MSA_Caster[MSA_Integer[3]]
                                          • Set MSP_Unit1 = (Picked unit)
                                          • Set MSP_Damage2 = (MSA_Damage[MSA_Integer[3]] / 2.00)
                                          • Set MSP_Limit2 = MSA_PoisonLimit[MSA_Integer[3]]
                                          • Set MSP_SpecialEffect = MSA_PoisonEffect[MSA_Integer[3]]
                                          • Detonador - Run MS DOT Init <gen> (checking conditions)
                                        • Otros: Acciones
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • Si: Condiciones
                                          • MSA_FreezeBoleean[MSA_Integer[3]] Igual a True
                                        • Entonces: Acciones
                                          • Set MSS_Source1 = MSA_Caster[MSA_Integer[3]]
                                          • Set MSS_Unit1 = (Picked unit)
                                          • Set MSS_Limit1 = MSA_FreezeLimit[MSA_Integer[3]]
                                          • Set MSS_SpecialEffect = MSA_FreezeEffect[MSA_Integer[3]]
                                          • Detonador - Run MS Stop Init <gen> (checking conditions)
                                        • Otros: Acciones
                                    • Otros: Acciones
                            • Otros: Acciones
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • Si: Condiciones
                              • MSA_DestructibleTouch[MSA_Integer[3]] Igual a True
                            • Entonces: Acciones
                              • Destructible - Pick every destructible within MSA_TouchArea[MSA_Integer[3]] of MSA_PointToMove and do (Actions)
                                • Bucle: Acciones
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • Si: Condiciones
                                      • (Picked destructible) No igual a No destructible
                                      • ((Picked destructible) is dead) Igual a False
                                    • Entonces: Acciones
                                      • Destructible - Kill (Picked destructible)
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • Si: Condiciones
                                          • MSA_MaxTouchBoleean[MSA_Integer[3]] Igual a True
                                        • Entonces: Acciones
                                          • Unidad - Set the custom value of MSA_Missile to ((Custom value of MSA_Missile) + 1)
                                        • Otros: Acciones
                                    • Otros: Acciones
                            • Otros: Acciones
                          • Custom script: call RemoveLocation (udg_MSA_PointToMove)
                        • Otros: Acciones
                          • Unidad - Kill MSA_Missile
                          • Grupo de unidad - Remove MSA_Missile from MSA_Missiles[MSA_Integer[3]]
                  • Set MSA_MaxDistance[MSA_Integer[3]] = (MSA_MaxDistance[MSA_Integer[3]] - MSA_Velocity[MSA_Integer[3]])
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • Si: Condiciones
                      • MSA_DecreaseBoleean[MSA_Integer[3]] Igual a True
                      • MSA_IncreaseBoleean[MSA_Integer[3]] Igual a False
                    • Entonces: Acciones
                      • Set MSA_Velocity[MSA_Integer[3]] = (MSA_Velocity[MSA_Integer[3]] - MSA_DecreaseVelocity[MSA_Integer[3]])
                    • Otros: Acciones
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • Si: Condiciones
                      • MSA_DecreaseBoleean[MSA_Integer[3]] Igual a False
                      • MSA_IncreaseBoleean[MSA_Integer[3]] Igual a True
                    • Entonces: Acciones
                      • Set MSA_Velocity[MSA_Integer[3]] = (MSA_Velocity[MSA_Integer[3]] + MSA_IncreaseVelocity[MSA_Integer[3]])
                    • Otros: Acciones
                • Otros: Acciones
                  • Grupo de unidad - Pick every unit in MSA_Missiles[MSA_Integer[3]] and do (Unidad - Kill (Picked unit))
                  • Grupo de unidad - Remove all units from MSA_UnitsTouched[MSA_Integer[3]]


Note: I hope that you can understand something. (I haven't any time to translate)
 

Attachments

  • Philipe's Systems - Shoot System.w3x
    74.1 KB · Views: 50
Last edited:
Status
Not open for further replies.
Top