Jump to content
Korean Random
kmarchenko

Взрыв БК

Recommended Posts

markersDeadNormal.xc

      // Текст при взрыве боеукладки (см. описание макросов в macros.txt).
      "blowupMessage": "{{l10n:blownUp}}\n{{dmg}}"

 

Share this post


Link to post

Short link
Share on other sites
3 минуты назад, H_E_K_P_O_M_A_H_T_ сказал:

markersDeadNormal.xc


      // Текст при взрыве боеукладки (см. описание макросов в macros.txt).
      "blowupMessage": "{{l10n:blownUp}}\n{{dmg}}"

 

Спасибо, вот только мне нужно это определить без xvm :)

Share this post


Link to post

Short link
Share on other sites
from Vehicle import Vehicle
def NewVehicleInit(self):
    self.effectsMode = 0
    OldVehicleInit(self)
    
    
OldVehicleInit = Vehicle.__init__
Vehicle.__init__ = NewVehicleInit   
    
def showBlowUpSound(self, mode, attackerID):
    if attackerID == BigWorld.player().playerVehicleID:
         if mode == 1:
              взрыв бк  
    self.effectsMode = 0 
    
    
Vehicle.showBlowUpSound = showBlowUpSound

def NewshowAmmoBayEffect(self, mode, fireballVolume, projectedTurretSpeed):
    OldshowAmmoBayEffect(self, mode, fireballVolume, projectedTurretSpeed)
    self.effectsMode = mode


OldshowAmmoBayEffect = Vehicle.showAmmoBayEffect
Vehicle.showAmmoBayEffect = NewshowAmmoBayEffect
        
def new_Vehicle_onHealthChanged(self, newHealth, attackerID, attackReasonID):
    old_Vehicle_onHealthChanged(self, newHealth, attackerID, attackReasonID)
    self.showBlowUpSound(self.effectsMode, attackerID)
        

old_Vehicle_onHealthChanged = Vehicle.onHealthChanged
Vehicle.onHealthChanged = new_Vehicle_onHealthChanged

 

  • Upvote 1

Share this post


Link to post

Short link
Share on other sites
1 минуту назад, Ekspoint сказал:

from Vehicle import Vehicle
def NewVehicleInit(self):
    self.effectsMode = 0
    OldVehicleInit(self)
    
    
OldVehicleInit = Vehicle.__init__
Vehicle.__init__ = NewVehicleInit   
    
def showBlowUpSound(self, mode, attackerID):
    if attackerID == BigWorld.player().playerVehicleID:
         if mode == 1:
              взрыв бк  
    self.effectsMode = 0 
    
    
Vehicle.showBlowUpSound = showBlowUpSound

def NewshowAmmoBayEffect(self, mode, fireballVolume, projectedTurretSpeed):
    OldshowAmmoBayEffect(self, mode, fireballVolume, projectedTurretSpeed)
    self.effectsMode = mode


OldshowAmmoBayEffect = Vehicle.showAmmoBayEffect
Vehicle.showAmmoBayEffect = NewshowAmmoBayEffect
        
def new_Vehicle_onHealthChanged(self, newHealth, attackerID, attackReasonID):
    old_Vehicle_onHealthChanged(self, newHealth, attackerID, attackReasonID)
    self.showBlowUpSound(self.effectsMode, attackerID)
        

old_Vehicle_onHealthChanged = Vehicle.onHealthChanged
Vehicle.onHealthChanged = new_Vehicle_onHealthChanged

 

Спасибки)

Share this post


Link to post

Short link
Share on other sites
1 минуту назад, kmarchenko сказал:

Спасибки)

код старый, но рабочий

может уже есть более компактный вид......

Share this post


Link to post

Short link
Share on other sites
import constants
if SPECIAL_VEHICLE_HEALTH.IS_AMMO_BAY_DESTROYED(vehicle.health):
	# Твой код

Если ивентом нужно - просто вешаешь на FEEDBACK_EVENT_ID.VEHICLE_HEALTH, ну или хуком в Vehicle.onHealthChanged.

Edited by IzeBerg

Share this post


Link to post

Short link
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...