Leaderboard


Popular Content

Showing most liked content on 06/15/18 in all areas

  1. 2 likes
    Hi there! Figured I should probably rewrite this guide so people can make maps if they want. Prerequisites Latest Local Play/Developer Build: https://www.moddb.com/mods/cod4-surf-mod/downloads (once extracted, ignore the last line of the README.txt, as CoDScript is no longer up, simply run "Local Server.bat" and connect to the server using "Play Surf.bat") Alternatively, set up a local server using the source code: https://github.com/atrX/CoD4-Surf (Advised if you want to use newer developer features as the Developer Build is rarely updated, certainly not a requirement however) Mapping Making a surf map is relatively easy and requires no scripting if you keep it basic. Setting your map up to work with the mod relies heavily on the use of KVPs (key-value pairs) in Radiant. I'll go over all the necessary components first and then list any other things you can make use of. Spawns Surf makes use of regular mp_dm_spawn entities. You can place as many as you'd like, but you'll need at least 1. You can also provide a spectator point using an mp_global_intermission entity. Start Zone The start zone is required to know when to start the timer (it starts as soon as you leave this area). The start zone should be a trigger_multiple with the following KVP: targetname trigger_startmap You should only ever have ONE start zone! End Zone The end zone is required to know when to stop the timer (it stops as soon as you enter this area), and thus finish the map. The end zone should be a trigger_multiple with the following KVP: targetname trigger_endmap You should only ever have ONE end zone! Teleporters Teleporters are used to teleport players around the map (e.g. when they finish a stage or when they fail a section of the map and need to be respawned somewhere). Teleporters consist of two components: triggers (the area you enter) and script_origins (where you'll be teleported to). Generally your triggers will be of the type trigger_multiple, but any other type will also work. It depends on what you need. Every teleporter trigger should have the following KVP: targetname trigger_teleport As you can see, the teleporter in this screenshot has another KVP: target auto2 The target is the targetname of whatever script_origins are linked to this teleporter (thus, the places you'll be teleported to). You don't have to enter these manually, these will be automatically generated when we start adding script_origins and link them to the triggers. Next we'll add a place for this trigger to teleport us to. To do this, we spawn a script_origin. Now, to link this script origin to the trigger we made earlier, all you have to do is first select the trigger, then select the script_origin and then press W on the keyboard. This will automatically give the script_origin a generated targetname and give the trigger a target pointing to the script_origin. You can link as many script_origins to as many triggers as you'd like, there is no limit on either. Beware that an entity can only have one targetname and one target, meaning that you can only link multiple script_origins and triggers together if they actually belong to the same group that will teleport to the same places. Boosters (Incremental) Incremental boosters will add predefined amounts to the player's velocity in a certain direction, speeding him up (or slowing him down in the case of negative values). To make a booster, make a trigger_multiple and give it the following KVPs: targetname trigger_boost target x y z The target values, x, y and z, should be replaced with the desired speeds in the desired directions (you'll have to play around with these to find a value you like). Boosters (Scaling) Scaling boosters are made in the exact same way as incremental boosters (except for the targetname used). However, unlike incremental boosters, they multiply the player's velocity with the amounts defined. targetname trigger_speed target x y z Using this, you can make a trigger that, for example, simply doubles a player's horizontal speed using: target 2 2 1 No-Hop Zones A no-hop zone is an area in which bunny hopping is limited to speeds <= 320 (going above 320 will put your speed back to 280). These can be useful in case you want people to start your map (or stages) from a standstill. To create a no-hop zone you simply make a trigger_multiple covering the area you want and give it the following KVP: targetname trigger_nohop Scripting Making a basic surf map requires practically no scripting. All you really need is this basic template: main() { maps\mp\_load::main(); level.surfDifficulty = "easy"; // Options are: easy, intermediate, hard } You can add much more if you'd like, but make sure your maps runs without a hitch and always test using developer 1! Maps with bad quality scripts will not be added to the official server as they can cause server hitches resulting in lag (which would be detrimental to the user experience as movement is entirely server-sided and thus suffers badly from lag spikes). Functions exposed by the mod for use in your maps can be found here: https://docs.raid-gaming.net/ I will update this topic if any new features are ever added that you can take advantage of as a mapper. Regards, atrX.
  2. 1 like
    It was kinda meh, dunno if I still have it somewhere. I'll check. https://docs.raid-gaming.net/cod4u/Player/setGravity Edit: I found the old database with all the tutorials, let's see if they're worth reposting.