Tank Scripting Help!


(Darkix) #1

Ok, I have a tank and a tank barrier.
Let’s say… the spln right before the barrier is 21, and i have a spln in the barrier = 22, and the one after the barrrier is 23. So 21 "“B”“22"“B”” 23.
I was reading goldrush script, and I found something like this, (–>> & <<-- Being where I’m questioning):

trigger run_18
{
             trigger self tracks_forward

             accum 1 bit set 2
             followspline 0 spln 20 50 wait length 32
             accum 1 bitreset 2

           -------- >>>>> trigger tank stuck_check_barrier1_built_msg <<<<<<<-----

             trigger self run_continue
}

trigger run_19
{
             trigger self tracks_forward

             accum 1 bit set 2
             followspline 0 spln 21 50 wait length 32
             accum 1 bitreset 2

             trigger self run_continue
}

trigger run_20
{
             trigger self tracks_forward

             -------->>>>>>>>// Old location of defense1 remove<<<<<<<<--------

             accum 1 bit set 2
             followspline 0 spln 22 50 wait length 32
             accum 1 bitreset 2

             trigger self run_continue
}

trigger run_21
{
             trigger self tracks_forward

             accum 1 bit set 2
             followspline 0 spln 23 50 wait length 32
             accum 1 bitreset 2

             trigger self run_continue
}

trigger run_22
{
             trigger self tracks_forward

             accum 1 bit set 2
             followspline 0 spln 24 50 wait length 32
             accum 1 bitreset 2

             trigger self run_continue
}

trigger run_23
{
             trigger self tracks_forward

             // **************************
             -------->>>>>>>>trigger defense1 remove<<<<<<<<--------
             // ***************************
             
             accum 1 bit set 2
             followspline 0 spln 25 50 wait length 32
             accum 1 bitreset 2

             trigger self run_continue
}







Now how do I do that? And what does it do? I thought if i put something like “Remove barrier 1” at number 22, and “check Barrier 1” at 21, it would work. Do I need to put something 4 or 5 splns before it? If so, can someone help me out please?
Also, I notice it’s:


trigger run_21 <<<<<------ 21.
{
             trigger self tracks_forward

             accum 1 bit set 2
             followspline 0 spln 23 50 wait length 32 <<<<<------ Spln 23
             accum 1 bitreset 2

             trigger self run_continue
}

Is it ok to make it:


trigger run_21<<<<<<------ 21.
{
             trigger self tracks_forward

             accum 1 bit set 2
             followspline 0 spln 22 50 wait length 32 <<<<<<<<------ 22
             accum 1 bitreset 2

             trigger self run_continue
}

22 being where 23 was.
Thanks for all your help so far!
Working on my first map, just trying to get everything to work :slight_smile:
-Matthew<3


(-SSF-Sage) #2

Won’t take the time to read it now. But These aren’t 0k:

         --------&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;// Old location of defense1 remove&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;-------- , should have

   //      --------&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Old location of defense1 

remove //<<<<<<<<-------- , should have etc. IF you have these in your script, it won’t work… I’m on the lounch break, so not much time.


(murka) #3

the barrier checking comes at the stop check part of the tank script.
there are some triggers like stop_check_barrier1, just put the spline nr where to check for the corresponding barrier, and let the barrier change the accum value to mark it stuck/not stuck.