need small script help


(Pukedukem) #1

just about done with my map now, but one problem still exists.
heres my problem in detail.

allies open door truck goes forward, but when the door is fully open you can hit the door lever again and the door will pass through the back half of the truck.

What do I need to put in my script to keep that door open till the truck is clear of it?

Thanks :bash:


(Mean Mr. Mustard) #2

This should work…

When the truck starts the run from point a to point b (outside gate to inside) have it trigger a routine in the door section. This trigger will set an accum. Then add an accum abort_if_equal in the door close trigger. This should stop the door from closing. Don’t forget to initialize the accum toi some value that lets the door close before the truck is going through it.

If my explanation wasn’t too clear, post your script and I’ll write the section you need.


(=DaRk=CrAzY-NuTTeR) #3

try having another model of your door where it stops (after its opened) once the truck starts to go to point b, in script call setstate door (or whaver your actual door is) invisible

setstate door invisible

and then make the static appear

setstate door_static full (i dont know what the command is to make it reapear so bare with me
and then once done just go

setstate door visible
setstate door_static invisible

do you understand?


(Pukedukem) #4
////////////////////////////////////TRUCK DOOR//////////////////////////////////////////////////
glever_controller 
{ 
   activate 
   { 
      trigger glever use 
   } 
} 
glever 
{ 
   trigger use 
   { 
      trigger glever open 
      trigger glever close 
   } 
   trigger open 
   { 
      accum 1 abort_if_equal 1 
      accum 0 abort_if_equal 1 
      accum 1 set 1 
      accum 0 set 1 
      wait 60 
      // playsound sound/effects/open_door.wav  //  
      playsound sound/movers/switches/switch.wav
      trigger gdoor open
      faceangles 0 0 -270 1000
      wait 3000
      accum 0 set 0
      wm_announce "Truck door closed!" 
      trigger truck stuck_check_glever_close_msg
      trigger truck disable_stage1 

   } 
   trigger close 
   { 

      accum 1 abort_if_equal 0 
      accum 0 abort_if_equal 1 
      accum 1 set 0 
      accum 0 set 1 
      wait 60 
      // playsound sound/effects/close_door.wav   //
      playsound sound/movers/switches/switch.wav
      trigger gdoor close
      faceangles 0 0 0 1000
      wait 3000
      accum 0 set 0 
      wm_announce "Truck door open!" 
      trigger truck stuck_check_glever
      trigger truck enable_stage1 

    } 
   
} 

gdoor_controller 
{ 
   activate 
   { 
      trigger gdoor use 
   } 
} 
gdoor 
{ 
   trigger use 
   { 
      trigger gdoor open 
      trigger gdoor close
   } 
   trigger open 
   { 
      accum 1 abort_if_equal 1 
      accum 0 abort_if_equal 1 
      accum 1 set 1 
      accum 0 set 1 
      wait 60 
      playsound sound/movers/misc/garage_door_loop_01.wav looping volume 512
      faceangles 0 0 -270 4000
      playsound sound/movers/misc/garage_door_end_01.wav volume 96
      stopsound
      accum 0 set 0

   }

   trigger close   
   { 
      accum 1 abort_if_equal 0 
      accum 0 abort_if_equal 1 
      accum 1 set 0 
      accum 0 set 1 
      wait 50 
      
      playsound sound/movers/misc/garage_door_loop_01.wav looping volume 512
      faceangles 0 0 0 4000
      playsound sound/movers/misc/garage_door_end_01.wav volume 96
      stopsound
      accum 0 set 0
   } 
} 
/////////////////////////////////////////////////////////////////////////////////////////

here is the Truck door script. trying to fix my door problem now. Would like to see what you can come up with in case i cant get it to work, but I think I should be alright.

Thanks


(Pukedukem) #5

sorry but some things may appear wrong such as close actually being open. I have two doors and was lazy and didnt fix the script and just changed it in game.


(Pukedukem) #6

still cant get it to work right.


(Pukedukem) #7

this has been fixed long ago. Message me for help or mean mr mustard I think he’s nice enough to help you out.

Seeya in the field :bump: