Author Topic: Click! ... nothing  (Read 324 times)

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Click! ... nothing
« on: February 06, 2012, 10:38:15 pm »


                <antici....>

Ok, next problem: Rubies improved traps.

I have the mdls/textures and she sent replacements for the nw_t1_spike... scripts. But, that didn't work. There was no change. So I tried it a *little* differently - I changed the scripts to "cc_t1_spike..." and pointed the spike traps at them in traps.2da:

0          MinorSpike          cc_t1_spikeminoc   5       10            22            6846       NW_IT_TRAP001   iit_trap_009
1          AverageSpike        cc_t1_spikeavgc    20      10            22            6847       NW_IT_TRAP002   iit_trap_009
2          StrongSpike         cc_t1_spikestrc    25      10            22            6848       NW_IT_TRAP003   iit_trap_009
3          DeadlySpike         cc_t1_spikedeadc   35      22            36            6849       NW_IT_TRAP004   iit_trap_009

The script references the improved spike VFX in visualeffects.2da:

781        VFX_IMP_TRAP_MSPIKE                    F       0                ****             ****             ****            ccc_trapsp1    ...
782        VFX_IMP_TRAP_ASPIKE                    F       0                ****             ****             ****            ccc_trapsp2     ...
783        VFX_IMP_TRAP_SSPIKE                    F       0                ****             ****             ****            ccc_trapsp3     ...
784        VFX_IMP_TRAP_DSPIKE                    F       0                ****             ****             ****            ccc_trapsp4     ...
So, when I lay down a spike trap trigger, it should call the cc_t1... script and that script calls the vfx...

But all I get is Click! and the notice that I've "Triggered a trap!".
'Image

What am I missing?

<...pation!>
               
               

               


                     Modifié par Rolo Kipp, 06 février 2012 - 10:39 .
                     
                  


            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Click! ... nothing
« Reply #1 on: February 06, 2012, 11:12:02 pm »


               Umm, I know this is not the scripting forum, But what does the script look like.

EDIT: Oh and another question,   Did you set new traps after changing the 2da.   Or where you using traps that where made with the old 2da line?
               
               

               


                     Modifié par Lightfoot8, 06 février 2012 - 11:23 .
                     
                  


            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Click! ... nothing
« Reply #2 on: February 06, 2012, 11:35:47 pm »


               <tasting the stew...>

Well, it's more than a script problem, I think. Though that is certainly in the mix. *None* of the script fires... Not the effectdamage, not the visual effect.

Let's see if this will paste nice the *first* time (sometimes I hate these forums...)


//::///////////////////////////////////////////////
//:: DoTrapSpike
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
 Does a spike trap. Reflex save allowed. 2d6
*/
//:://////////////////////////////////////////////
//:: Created By:
//:: Created On:
//:://////////////////////////////////////////////
// apply effects of spike trap on entering object

void TrapSpike()
{
   //Declare major variables
   int nDamage = d6(2);
   object oTarget = GetEnteringObject();

   int nRealDamage = GetReflexAdjustedDamage(nDamage, oTarget, 15, SAVING_THROW_TYPE_TRAP, OBJECT_SELF);
   if (nDamage > 0)
   {
      effect eDam = EffectDamage(nRealDamage, DAMAGE_TYPE_PIERCING);
      effect eVis = EffectVisualEffect(781);
      ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(oTarget));
      ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
   }
}

Edit: So, I assumed the script listed in the traps.2da is the script called when the trap is triggered. But it's not getting that far.

<...and adding a pinch, a *big* pinch, of cayenne>
               
               

               


                     Modifié par Rolo Kipp, 06 février 2012 - 11:47 .
                     
                  


            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Click! ... nothing
« Reply #3 on: February 06, 2012, 11:57:10 pm »


               <face...>

*reading PM from Rubies*
Oh.
Rename function to "main".
Works like a charm.

Thank's Rubies :-)
*checks another thing off his Really Long list*

<...palm>