script_movers


(Thej) #1

Hello.

Ok heres the question.

i made the rocket into a scriptmover and wanted it to be in an invisible state when the game starts, that all worked well, but i forgot to add something to the rocket, so i selected the rocket as a script_mover and then the missing parts and turned it into a new scriptmover with the same name.
But for some reason the rocket isnt invisiblw anymore, while i didnt change anything in the script.
So dunno if anyone knows the answer to this one.


(lennyballa) #2

uhm, make the rocket worldspawn again, add those extra parts, save as prefab, load prefab, scriptmover mayeb this works


(Thej) #3

Sorry to say, but that didnt solve the problem :frowning:

ok here are big parts of the script, cause i have the feeling now, that something is fucked up :expressionless:

this is for starting the crane and other stuff

built final
{
	setstate allied_compost_built_model default
	setstate neutral_compost_closed_clip invisible
	setstate neutral_compost_closed_model invisible
	trigger allied_compost_built_model enable_allied_features
        trigger crane_controller2 startcrane2
        setstate cart default
      setstate crane2 default
        setstate crane_hook2 default
        setstate the_beam default
        setstate de_raket default
        enablespeaker allies_compost_sound
}

here is the crane script(huge!!!)

//=======================================================================
//Crane//
//=======================================================================

crane_controller2
{
spawn
{
setstate crane2 invisible
setstate crane_hook2 invisible
setstate the_beam invisible
setstate de_raket invisible
accum 1 set 0
}

trigger startcrane2
{
	wait 200
	accum 1 abort_if_not_equal 0
	trigger crane_hook2 shift_down_2

	accum 1 set 1
}

}

crane2
{

trigger crane_start
{
	stopsound
	playsound sound/movers/motors/motor_start_02.wav volume 96
}

trigger crane_loop
{
	playsound sound/movers/motors/motor_loop_02.wav looping
}

trigger crane_stop
{
	stopsound
	playsound sound/movers/motors/motor_end_02.wav volume 96
}

trigger hook_start
{
	stopsound
	playsound sound/movers/motors/motor_start_01.wav volume 96
}

trigger hook_loop
{
	playsound sound/movers/motors/motor_loop_01.wav looping
}

trigger hook_stop
{
	stopsound
	playsound sound/movers/motors/motor_end_01.wav volume 96
}

}

crane_hook2
{
trigger shift_down_2
{
trigger the_beam beam_down1
trigger de_raket rocket_down1
trigger crane crane_start
trigger crane crane_loop
trigger crane hook_start
trigger crane hook_loop
gotomarker rocket_path_12 200 wait
trigger crane_hook2 shift_up2

  }

trigger shift_up2
  {
        trigger crane crane_loop
        trigger crane hook_loop
	gotomarker crane2_path_1 50 wait
      trigger de_raket rocket_forward1
        trigger the_beam beam_forward1
        trigger cart cart_forward
 }

}

crane_sound
{
trigger crane_start
{
trigger crane crane_start
wait 250
trigger crane crane_loop
}

trigger crane_stop
{
	trigger crane crane_stop
}

trigger hook_start
{
	trigger crane hook_start
	wait 700
	trigger crane hook_loop
}

trigger hook_stop
{
	trigger crane hook_stop
}

}
crane_controller
{
spawn
{
accum 1 set 0

}

trigger startcrane
{
	wait 200
	accum 1 abort_if_not_equal 0

	trigger crane_hook shift_down

	accum 1 set 1
}

}

crane
{
trigger shift_forward
{
trigger crane_sound crane_start

	gotomarker crane_path_7 50 wait

}

trigger crane_start
{
	stopsound
	playsound sound/movers/motors/motor_start_02.wav volume 96
}

trigger crane_loop
{
	playsound sound/movers/motors/motor_loop_02.wav looping
}

trigger crane_stop
{
	stopsound
	playsound sound/movers/motors/motor_end_02.wav volume 96
}

trigger hook_start
{
	stopsound
	playsound sound/movers/motors/motor_start_01.wav volume 96
}

trigger hook_loop
{
	playsound sound/movers/motors/motor_loop_01.wav looping
}

trigger hook_stop
{
	stopsound
	playsound sound/movers/motors/motor_end_01.wav volume 96
}

}

crane_hook
{
trigger shift_down
{
trigger crane crane_start
trigger crane crane_loop
trigger crane hook_start
trigger crane hook_loop
gotomarker crane_path_2 200 wait
trigger crane_hook shift_up

  }

trigger shift_up
  {
        trigger the_beam beam_up 
        trigger de_raket rocket_up
        trigger crane crane_loop
        trigger crane hook_loop
	gotomarker crane_path_3 50 wait
        trigger crane_hook shift_forward
      
  }

trigger shift_forward
{
        trigger the_beam beam_forward
        trigger de_raket rocket_forward
	trigger crane shift_forward
        gotomarker crane_path_4 50 wait
        trigger crane_hook shift_down2

}
  trigger shift_down2
{
        trigger the_beam beam_down
        trigger de_raket rocket_down 
      gotomarker crane_path_5 50 wait
        trigger crane hook_stop
        trigger crane crane_stop
        
}

}

de_raket

{

  trigger rocket_down1
{
      gotomarker rocket_path_12 50 wait
        trigger crane crane_stop
}

trigger rocket_forward1
{
	trigger crane crane_loop
	gotomarker crane_path_2 50 wait
        trigger crane_controller startcrane
        
}



trigger rocket_up
{
	
	gotomarker crane_path_3 50 wait

}

trigger rocket_forward
{
	
	gotomarker crane_path_4 50 wait

}
  trigger rocket_down
{
      gotomarker crane_path_5 50 wait
        trigger crane crane_stop
}

}

the_beam

{

  trigger beam_down1
{
      gotomarker rocket_path_12 50 wait
}

trigger beam_forward1
{
	
	gotomarker crane_path_2 50 wait
        

}

trigger beam_up
{
	
	gotomarker crane_path_3 50 wait

}

trigger beam_forward
{
	
	gotomarker crane_path_4 50 wait

}
  trigger beam_down
{
      gotomarker crane_path_5 50 wait
        trigger crane crane_stop 
}

}

cart

{

trigger cart_forward
{
	
	gotomarker crane_path_2 50 wait
        

}

}

I cant see the problem, but maybe someone else can.
Im trying to get the rocket(de_raket) invisible for starters, but even that wont work anymore, while i got it working perfectly the other day :expressionless:

Any help is as usual much appreciated

Grts Thej


(DeAtHmAsTeR) #4

Post your entities from the .map file (open it up in notepad and use CTRL + F to find the appropriate stuff)


(Thej) #5

ok here are the entities

I always use Wordpad, easier to find stuff :smiley:

{
“model” “*14”
“origin” “-4471 6279 939”
“classname” “script_mover”
“spawnflags” “2”
“targetname” “crane”
“scriptname” “crane”
}
{
“model” “*15”
“origin” “-4471 6279 731”
“scriptname” “crane_hook”
“classname” “script_mover”
“spawnflags” “2”
“targetname” “crane_hook”
}

{
“classname” “path_corner_2”
“origin” “-4471 6279 731”
“targetname” “crane_path_1”
}
{
“targetname” “crane_path_2”
“origin” “-4471 6279 112”
“classname” “path_corner_2”
}
{
“classname” “path_corner_2”
“origin” “-4471 6279 859”
“targetname” “crane_path_3”
}
{
“classname” “path_corner_2”
“origin” “-3975 6279 731”
“targetname” “crane_path_5”
}
{
“targetname” “crane_path_6”
“origin” “-4471 6279 940”
“classname” “path_corner_2”
“target” “crane”
}
{
“classname” “path_corner_2”
“origin” “-3975 6279 940”
“targetname” “crane_path_7”
}
{
“classname” “path_corner_2”
“origin” “-3271 6279 112”
“targetname” “rocket_path_12”
}
{
“targetname” “crane_start”
“scriptname” “crane_controller”
“origin” “-4314 6584 686”
“classname” “target_script_trigger”
}
{
“targetname” “crane_path_4”
“origin” “-3975 6279 859”
“classname” “path_corner_2”
}
{
“model” “*16”
“origin” “-3270 6279 135”
“scriptname” “crane2”
“targetname” “crane2”
“spawnflags” “2”
“classname” “script_mover”
}
{
“model” “*17”
“origin” “-3270 6279 135”
“targetname” “crane_hook2”
“spawnflags” “2”
“classname” “script_mover”
“scriptname” “crane_hook2”
}

{
“classname” “path_corner_2”
“origin” “-3271 6279 123”
“targetname” “crane2_path_1”
}

{
“classname” “target_script_trigger”
“origin” “-4314 6607 686”
“scriptname” “crane_controller2”
“targetname” “crane_start”
}
{
“model” “*18”
“origin” “-3271 6279 134”
“classname” “script_mover”
“targetname” “the_beam”
“spawnflags” “2”
“scriptname” “the_beam”
}
{
“model” “*19”
“origin” “-3271 6279 112”
“classname” “script_mover”
“spawnflags” “2”
“scriptname” “cart”
“targetname” “cart”
}
{
“classname” “script_multiplayer”
“origin” “-3616 6496 64”
}
{
“model” “*20”
“origin” “-3271 6279 134”
“classname” “script_mover”
“spawnflags” “2”
“targetname” “de_raket”
“scriptname” “de_raket”
}


(DeAtHmAsTeR) #6

{
“model” “*14”
“origin” “-4471 6279 939”
“classname” “script_mover”
“spawnflags” “2”
“targetname” “crane”
“scriptname” “crane”
}
{
“model” “*15”
“origin” “-4471 6279 731”
“scriptname” “crane_hook”
“classname” “script_mover”
“spawnflags” “2”
“targetname” “crane_hook”
}

??? model is *15??? shouldnt a model key lead to a value of an etmain directory?


(DeAtHmAsTeR) #7

or is that a model key for a script_mover brush entity?


(Thej) #8

Well thats what i get when i read the bsp in wordpad.
And i think all the scriptmovers are “seen” as models by the game-engine.


(DeAtHmAsTeR) #9

hmm :S lol that could be the reason my script_movers didnt work, didnt hav a model key,

ok just going to run over your script.


(DeAtHmAsTeR) #10

hmm i think what has happened is after you made the script_mover again of the already script_mover, it added a new entities, and did not replace the old.

:???: but i aint too sure, the best i can tell you to do is too remake the entites from start.


(Thej) #11

well, i exported the ungrouped rocket as a prefab and imported again, so that shouldnt be the problem, but im confused now :eek3:


(DeAtHmAsTeR) #12

:eek: me too, thats why i am trying to stay away from a script mover in my map which should be hard to over come right at this point in time.


(Thej) #13

Well the script works fine except the entities are not invisible :frowning:


(red_mamba) #14

try adding targetname key with a value that is the same for all your rocket brushes that you want to make invisible

targetname = rocket

or something like that


(Thej) #15

and where do i add that targetname?


(red_mamba) #16

select all brushes (script_mover) press N key
enter targetname as Key
and rocket as value


(Thej) #17

ah, like the ones i already made, see scriptmover de_raket, the rest is other stuff i want invisible and doesnt belong to the rocket.


(DeAtHmAsTeR) #18

I think he knows how to make a script_mover mate

ffs stop explaining how to add targetnames to him,
he aint stupid


(red_mamba) #19

He asked how to add them so I told him, WTF.
I never called any body stupid BTW. Never will. Noobs don’t bother me (BTW not saying that Thej is one!). If I know the answer (or I think I do) I explain what I think is the solution. I don’t call people names! It would not KILL you if others would do the same. If you don’t have something usefull to answer next time bite your tongue and don’t spam the forums.

here the state I’m in at the moment :angry:
few seconds later :smiley:

I don’t see a spawn part

spawn
{
wait 200
setstate de_raket invisible
}

this should make the whole script invisible until you make it visible
if you have this than I realy don’t know what’s wrong


(Thej) #20

Ok stop arguing girls :smiley:

well that last bit solved the problem, but i dont understand cause i have the setstate to invisible in an earlier stage, must be skipping that part :<

thx Mamba and Death for helping me solve the problem :smiley: