由 S-22 发表的全部内容
-
资料备查
FOR LEARNING PURPOSES COPY AND PASTE THE FOLLOWING INTO YOUR MAPFIX FILE local.fix = spawn script_model local.fix model "static/vehicle_bmwbike.tik" //under bridge local.fix.origin = ( 228 474 384 ) local.fix.angles = ( 0 0 0 ) local.fix.scale = 1.0 local.fix ghost local.fix = spawn script_model local.fix model "static/vehicle_bmwbike.tik" //under bridge local.fix.origin = ( 228 474 384 ) local.fix.angles = ( 0 0 0 ) local.fix.scale = 1.0 local.fix ghost //========================= START OF TRIGGER1 ============================ //======================================================================= local.trig = spawn trigger_multiple local.trig.origin = ( 228 474 384 ) local.trig setsize ( -10 -10 -10 ) ( 10 10 10 ) local.trig setthread Trigger1 local.trig message "You are touching Trigger1" local.trig wait 1 local.trig delay 0 //========================= START OF TRIGGER2 ============================ //======================================================================= local.trig = spawn trigger_multiple local.trig.origin = ( 0 0 100 ) local.trig setsize ( -10 -10 -100 ) ( 10 10 100 ) local.trig setthread Trigger1 local.trig message "You are touching Trigger2" local.trig wait 1 local.trig delay 0 Trigger1: self waittill trigger local.player=parm.other if (local.player.isTrigger1==1) end local.player.isTrigger1=1 local.player tele 0 0 900 wait 10 local.player.scale .5 local.player.isTrigger1=0 end Trigger2: self waittill trigger local.player=parm.other if (local.player.isTrigger2==1) end local.player.isTrigger2=1 local.player wuss wait 5 local.player dog local.player.isTrigger2=0 end
-
资料备查
Adding Triggers A trigger is simply an invisible square you define that executes a command of your choosing onto a player who walks into that invisible box you made. Once you’ve learned how to edit maps, You’ll probably want to know how to add triggers to maps. With triggers you can make players taller, shorter, have god mode, play a sound, glow a color and many more things. Step 1: Open the map fix file that you made from the Map Modding Tutorial that you want the trigger in. Go to the very bottom of that file, make a blank line to separate items and triggers. Open the game, go to the exact spot you want the trigger to be on the map. Once in that spot open console and type in the word coord. It will give you a list of numbers, the only ones you are interested in are the first three. Ex: Location: -1864.26 944 12.03 Now with those three numbers go to the mapfix file, //======================================================================= //========================= START OF TRIGGER1 ============================ //======================================================================= local.trig = spawn trigger_multiple local.trig.origin = ( -1864.26 944 12.03 ) // This is where you place the cords you have. local.trig setsize ( -10 -10 -10 ) ( 10 10 10 ) //The way this works is it defines the box size. (the larger the numbers the larger the area) //Directions for the size(south east down) (north west up) I believe these are in inches local.trig setthread Trigger1 //Name of thread. local.trig message "You are touching Trigger1" //This is what flashes on the players screen when they are on the trigger. local.trig wait 1 // How often the trigger repeats itself. local.trig delay 0 // How long before trig acts. Trigger1: //This is the name of the thread you defined earlier in setthread. self waittill trigger //Tells it to wait until the trigger is set off and is something you will never change. local.player=parm.other //Something you will never change. if (local.player.isTrigger1==1) //Change this to the name of the thread, in this case Trigger1. end //This defines the end of this thread. local.player.isTrigger1=1 //Since we made the player turn on the trigger, this says what to do once it’s turned on. local.player tele 0 0 900 // This is where you execute the command. You never change the words “local.player”. wait 5 //If you want 2 commands to execute per trigger this is the pause between them. local.player kill // This is where you execute the 2nd command. You never change the words “local.player”. local.player.isTrigger1=0 //Again make sure this has the name of the thread above for it to work. end //This defines the end of this trigger. //======================== END OF TRIGGER1 ============================== Now that you have the trigger in your file, here are some options that I know work for the triggers local.player dog //Gives the player god mode local.player wuss //Gives the player all guns local.player noclip //This makes the player fly through anything like a ghost local.player.scale = .5 //This makes the player a midget local.player.scale = 2 //This makes the player a giant local.player light 1 0 0 200 // 1st number is red 2nd is green, 3rd is blue and 4th is size of circle local.player jumpxy 100 100 100 //Mess with these numbers for fun it makes the player jump local.player gravity .2 //This lowers gravity for the person local.player respawn //This makes the player respawn local.player stufftext “say I LIKE PINK FLOWERS” //This makes the player say what ever you want local.player kill //This kills the player local.player volumedamage 2 //This hurts the player 2 health points every time they touch the trigger Once you have the trigger in the map, save it and reload it and see if it works
- 资料备查
- 资料备查
- 资料备查
-
资料备查
Ok, im working on drivable vehicles. I can get all my other vehicles to work and fire perfectly, but when it comes to the sdkfz it can drive fine, it can fire on Primary fine, but when i do Secondary fire with the mg42 it crashes the game, does anyone know the problem? Im sure its ethier sdfkz.tik or something in global that controls the way vehicles think. Heres my sdfkz.tik TIKI setup { scale 0.52 // Set default scale to 16/30.5 since world is in 16 units per foot and model is in cm's path models/vehicles/sdkfz skelmodel sdkfz.skd surface sdkfz_tredz shader sdkfz_tredz surface sdkfz_i_cog shader sdkfz_i_cog surface sdkfz_rims shader sdkfz_rims surface sdkfz_f_cog shader sdkfz_f_cog surface sdkfz_o_cog shader sdkfz_o_cog surface sdkfz_w_tred shader sdkfz_w_tred surface sdkfz_wheel shader sdkfz_wheel surface sdkfz shader sdkfz } init { server { classname VehicleTankTandem setsize "-168 -72 12" "184 72 112"// vehicleWheelCorners "300 114 114" "0 0 -2"/ vehiclespeed 200 vehiclemass 1500 vehicletread 10 vehicleradius 0.33 vehiclerollingresistance 0.5 vehicledrag 0.00001 mass 1500 turnrate 18 health 500 AnimationSet "sdkfz_" SoundSet "sdkfz_" spawnturret 0 "vehicles/sdkfz_mg42.tik" spawnturret 1 "static/vehicle_sdkfz.tik" pitchcaps "-27 40 40" maxyawoffset 55.0 //spawnturret 1 "vehicles/UnknownWeapon.TIK" //spawnturret 2 "vehicles/UnknownWeapon.Tik" ////////////////////////////////////////// // Pitch-Mod Sound for vehicles by speed // // Linearly Interpolates from the minimum pitch when the vehicle is at the minimum speed to // the maximum pitch when the vehicle is at the maximum speed. // // Speed is in World Units. // // // +--------------- Minimum Speed // | +------------ Minimum Pitch // | | // | | +----- Maximum Speed // | | | +-- Maximum Pitch // V V V V setsoundparameters 0 0.95 200 1 } } animations { idle sdkfz.skc // //high sdkfz_high.skc // lean_back sdkfz_lean_back.skc // lean_forward sdkfz_lean_forward.skc // lean_left sdkfz_lean_left.skc // lean_right sdkfz_lean_right.skc // level sdkfz_level.skc // low sdkfz_low.skc skidding sdkfz.skc { client { entry stopaliaschannel snd_skid_stone entry sound snd_skid_stone first tagspawn "tire_spew_back_left" ( count 1 scale .7 model models/fx/snipesmoke.tik ) first tagspawn "tire_spew_back_right" ( count 1 scale .7 model models/fx/snipesmoke.tik ) first tagspawn "tire_spew_front_left" ( count 1 scale .25 model models/fx/snipesmoke.tik ) first tagspawn "tire_spew_front_right" ( count 1 scale .25 model models/fx/snipesmoke.tik ) } } } /*QUAKED vehicle_german_sdkfz (0.0 .0 0.0) (-168 -64 0) (184 72 112) SDKFZ Halftrack */[/code]
-
资料备查
steal SH bike Steal sh player animationa dn model glue player to new bike with bones and classname changes spawn and attach fake model unless u make a aplyer anim for the player sorted if u want a realisc movement without faking it to be the tank ur going to have to script it (hahaha goood luck) and then scripts above are not realistc i mean checking in front of u, chcking below u. checking high below and ground type and steapness etc to determin ur view.
- 资料备查
- 资料备查
- 资料备查
- 资料备查
- 资料备查
- 资料备查
- 资料备查
- 资料备查
- 资料备查
-
资料备查
local.trig = spawn trigger_multiple local.trig.origin = ( 375.51 78.53 386.29 ) local.trig setsize ( -50 -50 -10 ) ( 50 50 10 ) local.trig setthread bike local.trig message "You Are A Motor Bike For 60 Secsonds" local.trig wait 2 // How often the trig acts local.trig delay 0 // How long before trig acts bike: local.player=parm.other if (local.player.packon == 1) { end } while (local.player isalive) { local.player.packon = 1 } local.static = spawn script_model local.static model "static/vehicle_bmwbike.tik" local.static notsolid local.static.scale=1 local.static.origin = (local.player.origin + ( 100 190 100 )) local.static.angle = "-45" local.static glue local.player local.player.scale= .01 local.player stufftext "say w00t Im A Motor Bike" parm.other stopwatch 60 wait 60 local.player.packon = 0 local.player.scale=1 local.static remove end[/code] that should work
-
资料备查
Using Demon's idea i'm gonna make a script out of the blue here to wat i think would work the best...anyone who has any suggestions could post them below local.bike = spawn script_model targetname bike local.bike model "static/vehicle_bmwbike.tik" local.bike.origin = ( x y z ) local.bike.angles = ( a b c ) local.bike nodamage local.biketrig = spawn trigger_use targetname biketrig local.biketrig.origin = $bike.origin local.biketrig setsize = ( -30 -30 0 ) ( 30 30 100 ) local.biketrig setthread glue_bike glue_bike: local.player waittil $biketrig local.player = parm.other if(local.player.bike !=1) { local.player glue $bike local.player.origin = $bike + ( 0 15 0 ) //or whatever it takes to give the illusion that he is above the handlebars driving the bike local.player take weapon local.player iprint "You are now driving the motorcycle" local.player playsound motorbikesound1 local.player sv_runspeed 500 } end[/code] I'm not even sure this is gonna work any help appreciated!!!
-
资料备查
local.bike = spawn script_model targetname bike local.bike model "vehicles/bmw.tik" local.bike.origin = ( x y z ) local.bike.angles = ( a b c ) local.bike nodamage local.biketrig = spawn trigger_multiple targetname biketrig local.biketrig.origin = $bike.origin local.biketrig setsize = ( -30 -30 0 ) ( 30 30 100 ) local.biketrig setthread glue_bike gluebike: local.player = parm.other if(local.player.bike = 1) end local.gluemodel = spawn script_model targetname gluemodel local.gluemodel model $bike model local.gluemodel notsolid local.player.bike = 1 local.gluemodel glue local.player local.player stufftext "say I am driving." wait 10 local.player.bike = 0 $gluemodel delete end[/code] I just made that off the spot, I don't know if it works. But you get the idea.
- 资料备查
- 资料备查
-
资料备查
I know that cardevsan has managed to achieve drivable vehicles in his modding. I was wondering if anyone could summarize a script necessary to be able to drive a motorbike? I would like to please this into my upcoming Stadt mod as theirs not enough room for a tank or a truck...but their sure is enough room for a motorbike!!
- 资料备查
- 资料备查
- 资料备查