DoubleDragon Posted July 12, 2019 Posted July 12, 2019 It's been a while sense I updated my prefabs folder So this was a little bit of refreshing from thought but I had a difficult time with GTK Radiant 1.6.6 that just came out when I used a plugin sunplug et-map coordinator in 1.5 it converted the prefab only workable with 1.5 cause I think 1.6.6 is not matching sources it worked in 1.6.5 will have to revert back to that when I have time don't like this bug. Well to keep it short this is just a script mover setup for a objective which is doable for a team wolf objective if wanted but simply just a null objective to open close a garage door etc you can get it from my prefab gdrive directory https://drive.google.com/open?id=1jBEeerew_h2jPw7JCcORWlLrlWBEyCFl It's in a pk3 so you can look and see what it does before actually trying to make your own includes specified scripts and such to be a clean pk3 Looks like this dropped it right in with my normal et game and tested it but can be changed to what ever just extract the files it includes all that is required for GTK Radiant Also the file is around 140kbs it can be reduced it only has a cm_ marker for the generator that is all the rest is default from pak0.pk3 The sounds are default as well also want to point out there is a sps file for a speaker drop from in game located at sound\maps\generator.sps if you change location of the prefab in the axis you will need to update the origins of the script movers and speaker you don't have to delete them in 1.6.6 its fixed for moving but everything below the newest has to be done manually if you do just drop a path_corner beside the entities that were moved and it will give you location origin This was also tested on ETLegacy 2.76 for any specific errors there is one based on the sound not loading from sound\scripts\gererator technically it is there but because the file is empty it presumes it is not works fine in W:ET tho This is just a good example of creating movers from script and trying to avoid paths this would be the easiest way. generator_pump is the targetname of the speaker in the sps file Spoiler speakerScript { speakerDef { noise "sound/movers/motors/motor_loop_03.wav" origin -38.79 106.57 79.49 targetname "generator_pump" looped "on" broadcast "no" volume 125 range 1250 } } In total there is 4 triggers and two Stages with the trigger events the top two are the stages the bottom two are the triggers hope this helps understand scripting with sounds some Spoiler game_manager { spawn { // Game rules wm_axis_respawntime 10 wm_allied_respawntime 10 wm_number_of_objectives 1 wm_set_round_timelimit 30 wait 500 disablespeaker generator_pump } } generator_controls { spawn { setstate generator_controls_trigger default setstate generator_controls_switch invisible } trigger on { setstate generator_controls_trigger invisible } } generator_controls_switch { spawn { wait 200 constructible_class 2 setstate generator_construct invisible } buildstart { setstate generator_construct default } built { setstate generator_controls_switch default setstate generator_construct invisible wm_announce "^2Generator Repired!" trigger generator start enablespeaker generator_pump trigger door move_up } decayed { setstate generator_controls_switch invisible } death { setstate generator_controls_switch invisible setstate generator_construct invisible wm_announce "^2Generator Damaged" trigger generator stop disablespeaker generator_pump trigger door move_down } } generator { spawn { wait 500 } trigger start { setrotation 100 0 0 } trigger stop { stoprotation } } door { spawn { wait 200 gotomarker door_path1 1000 } trigger move_up { wm_announce "^2The Doors are Opening!!" wait 500 playsound sound/movers/misc/garage_door_start_01.wav wait 400 playsound sound/movers/misc/garage_door_loop_01.wav looping forever gotomarker door_path2 80 wait stopsound playsound sound/movers/misc/garage_door_end_01.wav } trigger move_down { wm_announce "^2The Doors are closing!!" wait 500 playsound sound/movers/misc/garage_door_start_01.wav wait 400 playsound sound/movers/misc/garage_door_loop_01.wav looping forever gotomarker door_path1 80 wait stopsound playsound sound/movers/misc/garage_door_end_01.wav } } 1 1 1
Recommended Posts