server side transporters
Moderator: Moderators
server side transporters
Okay, I've been searching for about 3 hours now- stumbling through scripting webpages, map making pages, and forums and none of what I'm reading makes any freaking sense.
My clan currently is running a spearhead server on our box so we have complete access to all the files. I am hoping to create a simple server side mod that adds in two transporters to the map remegan as a test. Eventually, I hope to add a couple to all of our stock maps, and maybe a box or two- nothing extreme.
How do I go about doing it? What tools do I need? Is this scripting or mapping? I am completely lost.
Thank you,
Pork.
My clan currently is running a spearhead server on our box so we have complete access to all the files. I am hoping to create a simple server side mod that adds in two transporters to the map remegan as a test. Eventually, I hope to add a couple to all of our stock maps, and maybe a box or two- nothing extreme.
How do I go about doing it? What tools do I need? Is this scripting or mapping? I am completely lost.
Thank you,
Pork.
Teleporter
I think you mean "teleporters", right?
You can add them to the map's script and all clients will be able to use them. This thread should help you out.
http://dynamic.gamespy.com/~map/mohaa/f ... t=teleport
You can add them to the map's script and all clients will be able to use them. This thread should help you out.
http://dynamic.gamespy.com/~map/mohaa/f ... t=teleport
or this one: http://dynamic.gamespy.com/~map/mohaa/f ... php?t=3084
but do a search for spawn + teleporter
but do a search for spawn + teleporter
Thanks for the replies without flames 
This is incredibly nubbishm, so bare with me. The extent of my coding knowledge is basic html.
Where to put the coding and what to do beyond that- I'm not completely sure. I know in my main directory there is a pak5.pk3 file that contains maps. the .bsp one, I think, if the one I need to edit? I'm not entirely sure where I should actually put the lines of code.
As for the code itself...
thread trigger_maker ( x x x ) ( x x x ) //(from) (to) 1
thread trigger_maker ( x x x ) ( x x x ) //(from) (to) 2
thread trigger_maker ( x x x ) ( x x x ) //(from) (to) 3
thread trigger_maker ( x x x ) ( x x x ) //(from) (to) 4
end
trigger_maker local.location local.dest:
local.marker = spawn script_model
local.marker model "static/corona_orange.tik"
local.marker.origin = (local.location)
local.trig = spawn trigger_multiple
local.trig.origin = (local.location)
local.trig setsize ( -20 -20 -20 ) ( 20 20 20 )
thread teleport local.trig local.dest
end
teleport local.trig local.dest:
local.trig waittill trigger
local.player = parm.other
local.player tele (local.dest)
thread teleport local.trig local.dest
end
Now, I'll need the exact coordinates from in game somehow, correct? I know by using fps 1 in the console I can get map coordinates. Is there an easier way to achieve this?
If anyone has a link to a tutorial designed to add server side items to the map- that may help too. But it needs to be very noobish
Thanks for the help.
This is incredibly nubbishm, so bare with me. The extent of my coding knowledge is basic html.
Where to put the coding and what to do beyond that- I'm not completely sure. I know in my main directory there is a pak5.pk3 file that contains maps. the .bsp one, I think, if the one I need to edit? I'm not entirely sure where I should actually put the lines of code.
As for the code itself...
thread trigger_maker ( x x x ) ( x x x ) //(from) (to) 1
thread trigger_maker ( x x x ) ( x x x ) //(from) (to) 2
thread trigger_maker ( x x x ) ( x x x ) //(from) (to) 3
thread trigger_maker ( x x x ) ( x x x ) //(from) (to) 4
end
trigger_maker local.location local.dest:
local.marker = spawn script_model
local.marker model "static/corona_orange.tik"
local.marker.origin = (local.location)
local.trig = spawn trigger_multiple
local.trig.origin = (local.location)
local.trig setsize ( -20 -20 -20 ) ( 20 20 20 )
thread teleport local.trig local.dest
end
teleport local.trig local.dest:
local.trig waittill trigger
local.player = parm.other
local.player tele (local.dest)
thread teleport local.trig local.dest
end
Now, I'll need the exact coordinates from in game somehow, correct? I know by using fps 1 in the console I can get map coordinates. Is there an easier way to achieve this?
If anyone has a link to a tutorial designed to add server side items to the map- that may help too. But it needs to be very noobish
Thanks for the help.
Ok, it's really easy to script(code) for MOHAA, it's a lot like C/C++ so if you have any experience with those you'll cruise right along.
You need to open Notepad and put your script in it, save it along with your map with the same name as your map but with a .scr extension.
Example: Your map is named water.map, your script needs to be named water.scr and in the same folder as the map file.
Hope this helps
Appendix A
Appendix B
Appendix C
EDIT: fps 1 does not return coordinates, it returns the refresh rate of your game. to get coordinates use coord, or location (?)
EDIT of the EDIT: No, do not modify anything that was installed with your game, simply make a new .zip folder, and name it what your mod will be. say your mod will be named couchPotato, then name that .zip file exactly like this
zzz_couchPotato.pk3
get rid of the .zip, ignore Windows telling you it may become unstable, it wont
You need to open Notepad and put your script in it, save it along with your map with the same name as your map but with a .scr extension.
Example: Your map is named water.map, your script needs to be named water.scr and in the same folder as the map file.
Hope this helps
Appendix A
Appendix B
Appendix C
EDIT: fps 1 does not return coordinates, it returns the refresh rate of your game. to get coordinates use coord, or location (?)
EDIT of the EDIT: No, do not modify anything that was installed with your game, simply make a new .zip folder, and name it what your mod will be. say your mod will be named couchPotato, then name that .zip file exactly like this
zzz_couchPotato.pk3
get rid of the .zip, ignore Windows telling you it may become unstable, it wont
Moderator
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
get coordinates by running to the location in your map, bring down console and enter viewpos or coord. these will return x y and z and an angle. you just need x y z for location and your destination.
put the thread trigger maker line above level waittill spawn. you only need one line per teleport. In the first () put your location and in the second put your destination.
put the trigger maker and teleport at the bottom of the script after end.
put the thread trigger maker line above level waittill spawn. you only need one line per teleport. In the first () put your location and in the second put your destination.
put the trigger maker and teleport at the bottom of the script after end.
lizardkid wrote:EDIT of the EDIT: No, do not modify anything that was installed with your game, simply make a new .zip folder, and name it what your mod will be. say your mod will be named couchPotato, then name that .zip file exactly like this
Okay... so, step by step because I'm a moron- I plan on doing this with remegen- adding two transporters in the spawns to enter the middle hotel.
Go onto remegan and find the exact coordinates for where I want the portal to be- and where I want them to drop at. For example, transport 1 would be at 123 456 789 (xyz) and I want it to go to 987 654 321 (xyz, again). We'll use one in this example.
So open notepad..
I put this in.
thread trigger_maker ( 123 456 789 ) ( 987 654 321 ) //(from) (to) 1
end
trigger_maker local.location local.dest:
local.marker = spawn script_model
local.marker model "static/corona_orange.tik"
local.marker.origin = (local.location)
local.trig = spawn trigger_multiple
local.trig.origin = (local.location)
local.trig setsize ( -20 -20 -20 ) ( 20 20 20 )
thread teleport local.trig local.dest
end
teleport local.trig local.dest:
local.trig waittill trigger
local.player = parm.other
local.player tele (local.dest)
thread teleport local.trig local.dest
end
save the notepadd as the remegan map name.. I'll have to look it up. Then, change the .txt to .scr ...
Then, grab the .bsp file, zip it together with my .scr and name it zzz_transporters.pk3
and upload?
-
Green Beret
- Major General
- Posts: 746
- Joined: Mon Apr 19, 2004 12:21 pm
- Contact:
This also would work.
main:
// set scoreboard messages
setcvar "g_gametypestring" ""
setcvar "g_obj_alliedtext1" ""
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" " "
setcvar "g_obj_axistext1" " "
setcvar "g_obj_axistext2" " "
setcvar "g_obj_axistext3" ""
setcvar "g_scoreboardpic" "none"
level waittill prespawn
//*** Precache Dm Stuff
exec global/DMprecache.scr
level.script = maps/dm/mohdm3.scr
exec global/ambient.scr mohdm3
level waittill spawn
thread teleporter
end
teleporter:
local.trigger = spawn trigger_multiple
local.trigger.origin = ( 00.00 000 00.00 ) //origin
local.trigger setsize ( -10 -10 -10 ) ( 10 10 10 )
local.trigger setthread teleport
local.trigger message "Teleporting"
local.trigger wait 1
local.trigger delay 0
teleport:
self waittill trigger
local.player=parm.other
if (local.player.isteleport==1)
end
local.player.isteleport=1
local.player tele 0 0 900
wait 1
local.player.isteleport=0
end
main:
// set scoreboard messages
setcvar "g_gametypestring" ""
setcvar "g_obj_alliedtext1" ""
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" " "
setcvar "g_obj_axistext1" " "
setcvar "g_obj_axistext2" " "
setcvar "g_obj_axistext3" ""
setcvar "g_scoreboardpic" "none"
level waittill prespawn
//*** Precache Dm Stuff
exec global/DMprecache.scr
level.script = maps/dm/mohdm3.scr
exec global/ambient.scr mohdm3
level waittill spawn
thread teleporter
end
teleporter:
local.trigger = spawn trigger_multiple
local.trigger.origin = ( 00.00 000 00.00 ) //origin
local.trigger setsize ( -10 -10 -10 ) ( 10 10 10 )
local.trigger setthread teleport
local.trigger message "Teleporting"
local.trigger wait 1
local.trigger delay 0
teleport:
self waittill trigger
local.player=parm.other
if (local.player.isteleport==1)
end
local.player.isteleport=1
local.player tele 0 0 900
wait 1
local.player.isteleport=0
end
Not exactly the .pk3 process, but close.Then, grab the .bsp file, zip it together with my .scr and name it zzz_transporters.pk3
and upload?
You've got the script part right, but don't copy the Remagen .bsp or anything liek that, people already have those with their game, they dont need a cpy
after you have the .scr:
make a new .zip file
rename it to .pk3
((sorry i forgot this part))=
place the .scr file in a folder named maps
make another folder named dm, put that inside maps, put the .scr in dm
place those folders in the new .pk3
save as zzz_transporters.pk3
upload
Sorry about that
Moderator
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
well, whenever i do stuff like this i allways start with as much stock info that i can. the script you want to edit is in your mohaa/mainta pak1.pk3 -
it is called mohdm3.scr and it is in maps/dm folder.
extract the mohdm3.scr into a new folder titled "dm" and put dm in a new folder called "maps". Put maps/dm/mohdm3.pk3 in your own pk.3 - title it something like zzz-porkchopmod.pk3
to edit the scr i use notepad (within the pk3 right click your file and press view). I am sure there are better ways it just the way i do it.
Every time you edit the scr. you need to repack it into your pk3. your newly saved scr will default to the root directory. extract it to your maps/dm and add maps/dm/mohdm3.scr (with your new changes) back to your zzz-porkchopmod.pk3
whew- place your pk3 in your pcs mohaa/mainta and restart to test it. when you are happy with the results then put it on your servers mainta and restart.
it is called mohdm3.scr and it is in maps/dm folder.
extract the mohdm3.scr into a new folder titled "dm" and put dm in a new folder called "maps". Put maps/dm/mohdm3.pk3 in your own pk.3 - title it something like zzz-porkchopmod.pk3
to edit the scr i use notepad (within the pk3 right click your file and press view). I am sure there are better ways it just the way i do it.
Every time you edit the scr. you need to repack it into your pk3. your newly saved scr will default to the root directory. extract it to your maps/dm and add maps/dm/mohdm3.scr (with your new changes) back to your zzz-porkchopmod.pk3
whew- place your pk3 in your pcs mohaa/mainta and restart to test it. when you are happy with the results then put it on your servers mainta and restart.
woot, ty guys. I'll be testing this out. I assume placement for boxes to provide just a little bit of cover in key places would be simular- in that script file, correct?
We don't want to go nuts- but we've been playing spearhead for so long we just wanna add some twists to the maps. I'm also interested in Lambon (I think that's his name) single player map conversions- or, if I get adept at this, attempting to create my own.
Anyway, thanks again for all the help. Tomorrow, I'll be testing and, hopefully, adding the mod to the server
We don't want to go nuts- but we've been playing spearhead for so long we just wanna add some twists to the maps. I'm also interested in Lambon (I think that's his name) single player map conversions- or, if I get adept at this, attempting to create my own.
Anyway, thanks again for all the help. Tomorrow, I'll be testing and, hopefully, adding the mod to the server


