The problem with the script. Help me please.

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
correctmushroom2013
Second Lance Corporal
Second Lance Corporal
Posts: 102
Joined: Fri Jul 19, 2013 11:10 am
Projects :: Droid Factory Conquest
Games I'm Playing :: SWBF2 BDO
xbox live or psn: No gamertag set
Location: Russian Federation

The problem with the script. Help me please.

Post by correctmushroom2013 »

I did turbine, as on map Tantive 4. Set deathregion. If you destroy the turbine region is removed.
I need to put the damageregion. When I set the damageregion, it is not removed as a deathregion. Why? :( The script is the same, I just replaced the region. Please help :bowdown:
User avatar
Kingpin
Jedi
Jedi
Posts: 1096
Joined: Fri Sep 13, 2013 7:09 pm
Projects :: The Sith Wars II
Location: Denver, CO
Contact:

Re: The problem with the script. Help me please.

Post by Kingpin »

Post your LUA and scripts?
correctmushroom2013
Second Lance Corporal
Second Lance Corporal
Posts: 102
Joined: Fri Jul 19, 2013 11:10 am
Projects :: Droid Factory Conquest
Games I'm Playing :: SWBF2 BDO
xbox live or psn: No gamertag set
Location: Russian Federation

Re: The problem with the script. Help me please.

Post by correctmushroom2013 »

Code: Select all

animateobja = OnObjectKill(
   function(object, killer)
      if GetEntityName(object) == "pnl" then
         PauseAnimation("turbo")
         RemoveRegion("Damageregion1")
      end
   end
)


OnObjectRespawn(
      function (object)
            if GetEntityName(object) == "pnl" then
                  PlayAnimation("turbo")
                  AddDamageRegion("Damageregion1")
            end   
      end
)
User avatar
Kingpin
Jedi
Jedi
Posts: 1096
Joined: Fri Sep 13, 2013 7:09 pm
Projects :: The Sith Wars II
Location: Denver, CO
Contact:

Re: The problem with the script. Help me please.

Post by Kingpin »

Try changing the ( to { for the main two.
User avatar
Locutus
1st Lieutenant
1st Lieutenant
Posts: 420
Joined: Fri Jun 04, 2010 10:08 am
Projects :: Stargate Battlefront Pegasus
Location: Germany
Contact:

Re: The problem with the script. Help me please.

Post by Locutus »

Try DeactivateRegion("Damageregion1").

PS: Gently ignore Kingpins advice unless you want to work with filled lists;)
Post Reply