Script_mover puzzles me!


(Drakir) #1

Im trying to get a simple script_mover to run. But there is a thing that puzzles me.

The mover moves as it should when i start it, but after a stop it wont start moving again. Only the sound moves, i cannot find anything wrong…but there is prolly a small thing i missed somewhere.

bus
{
	spawn
	{
		wait 400
		accum 1 set 0
	}
	
	trigger run
	{
		stopsound
		playsound sound/vehicles/truck/truck_revup.wav volume 196
		wait 3400
		playsound sound/vehicles/truck/truck_move.wav looping
		//trigger bus_trigger kill
		followspline 0 bus01 50 wait length 32
		followspline 0 bus02 50 wait length 32
		followspline 0 bus03 50 wait length 32
		stopsound
		playsound sound/vehicles/tank/tank_revdown.wav volume 196
		trigger self run2
	}

	trigger run2
	{
	}

	trigger run3
	{
		wm_announce "Triggered, moving on!"
		stopsound
		playsound sound/vehicles/truck/truck_revup.wav volume 196
		wait 3400
		playsound sound/vehicles/truck/truck_move.wav looping
		followspline 0 bus04 50 wait length 32
		followspline 0 bus05 50 wait length 32
	}
}

I get the announce and the sound after triggering run3, but the damn mover stands still!


(Dr.Diode) #2

I hope i can helped…I think the Problem is you must treating the sound separated.

Thats my code

bus_sound ////with a info_notnull
{
	trigger start
	{
		trigger bus sound_start
		wait 3400
		trigger bus sound_move
	}

	trigger stop
	{
		trigger bus sound_stop
	}
}



bus
{ 
   spawn 
   { 
      wait 400 
      accum 1 set 0 
   }
   
   trigger sound_start
   {
	   stopsound
	   playsound sound/vehicles/truck/truck_revup.wav volume 196 
   }
   
   trigger sound_move
   {
	   stopsound
	   playsound sound/vehicles/truck/truck_move.wav looping 
   }
	   
   
   trigger sound_stop
   {
	   stopsound
	   playsound sound/vehicles/tank/tank_revdown.wav volume 196 
   }
	    
    
   trigger run 
   { 
	  trigger bus_sound start
	  wait 3000
      followspline 0 bus01 50 wait length 32 
      followspline 0 bus02 50 wait length 32 
      followspline 0 bus03 50 wait length 32
      trigger bus_sound stop 
      trigger self run2 
   } 

   trigger run2 
   { 
   } 

   trigger run3 
   { 
	  trigger bus_sound start
	  wait 3000 
      wm_announce "Triggered, moving on!" 
      followspline 0 bus04 50 wait length 32 
      followspline 0 bus05 50 wait length 32
      trigger bus_sound stop 
   } 
}

I hope thats right or you can send me a Mapfile and i will see what i can do

Greetings Diode


(Drakir) #3

Thanks for your effort, but the mover doesnt move even if i only have the followspline stuff in there.
I must be missing something here…feels like i tried everything!
Seems like the simplest moving script in the world using a splinepath, but somthing happens when the mover stops. Dunno if its a bug in the mover code or if i am doing something wrong here.

The only difference i can see from my script and the SD mover scripts is that i use more than 1 followspline in a single trigger. But i cant understand the problem with that.


(Drakir) #4

Found a solution, had to trigger the trigger from another trigger within the scriptblock.

So the solution was:




bus_starter
{
	spawn
	{
	}

	trigger bus_start2 // triggered via a func_explosive triggering a target_script_trigger
	{
		wm_announce "Script trigger!"
		trigger bus run2
	}
}

bus
{
	spawn
	{
		wait 400
		accum 1 set 0
	}
	
	trigger run
	{
		followspline 0 bus01 50 wait length 32
		followspline 0 bus02 50 wait length 32
		followspline 0 bus03 50 wait length 32

	}

	trigger run2
	{
		wm_announce "Triggered, moving on!"
		wait 2000
		trigger bus run3
	}

	trigger run3
	{
		followspline 0 bus04 50 wait length 32
		followspline 0 bus05 50 wait length 32
	}
}


(Loffy) #5

I was going to ask if the bus had fuel in the tank, but you fixed the problem.
When can i ride the tram to schloss Adler?
// L.


(Drakir) #6

Hi Loffy! Well i am working on the busride as you understand from the above questions. So im getting near the end. Alot of details left to do, but as long as the objectives are done i will have an internal Alpha test. I will contact you when its time!