Mapping/Player Movement

From Sven Co-op
Jump to navigation Jump to search
This page is under construction!


1 Gravity Change

   The gravity change will affect only the player who touched the trigger. The effect will be applied globally, so even after leaving the trigger gravity won't switch to it's normal state.
   1. Turn the brush covered with "AAATRIGGER" texture into entity:  trigger_gravity.
   2. Edit some keyvalues if needed:
   allow tiny monsters --> allow tiny monsters to trigger this entity.
   gravity --> changing the gravity amount, where 1 is a normal gravity and values closer
   to 0 means less gravity. Can't be 0 itself. You can set gravity to higher than 1 to increase the gravity force!
   If you want to switch gravity back to normal, just place another trigger_gravity 
   in the location(s) where it's necessary. The picture below shows how to toggle gravity
   on entering and leaving specified area:




2 Push

   Push player or monster, prevent blocking teleport destination, jump pads, speed up player in certain areas, make a wind. Trigger_push can be used in the same way as regular trigger entity.
   1. Turn the brush covered with "AAATRIGGER" texture into entity: trigger_push.
   2. Change keyvalues:
   allow tiny monsters --> allow tiny monsters to trigger this entity.
   speed of push --> speed of the push. Half-life 1 jump pads uses 2000. Gravity "push" is 800.
   pitch yaw roll --> direction of the push. Use Yaw compass to determine in which direction
   (in x/y view) the push affects. Pitch values: -90 for up, 90 for down. 
   You can combine Pitch and Yaw e.g.:
   -45 180 0 ---> that means push goes:
   -45 - northwest in x/z view.
   -180 - west in x/y view.
   3. Set up some flags if needed:
   once only --> the push ends after first object leaves it, then push is removed from the map.
   start off --> start disables, triggering trigger_push enables pushing.
   pushables --> affect func_pushable entites.
   no clients --> don't affect player.
   no monsters --> don't affect monsters.
   fire on exit --> fire entity listed in target after leaving the trigger (normally activates target when entering trigger).
   force push --> players and monsters can't freely move inside the trigger_push volume. They are forced to move in the push direction.


3 Friction

   Warning! Wet floor!


   1. Friction brush is visible, so if you want a invisible friction, turn the brush 
   covered with "AAATRIGGER" texture into  func_friction entity. Or you can make 
   a puddle and then turn it into func_friction. Everyone who touches 
   func_friction will be affected.
   2. Change keyvalue:
   percentage of standard --> 100 is a normal friction. Less value for more slippery floor.


4 Global Player Speed

   Make sure your map have created and configured cfg file. The full guide how to make cfg file on Sven Co-op website:
   http://www.svencoop.com/mapmi.php
   1. Go into your map config file (yourmap.cfg in maps folder)
   2. Write a new command line into file: "sv_maxspeed X"
   Where X is player max movement speed. 270 is default.


5 Dynamically Change Player Speed

   Player speed can be changed temporary, by giving a name for each player. Next, you need to change a player speed value by triggering trigger_changevalue entity.
   1. Give players a name before changing their speed. The given name is virtual, and will not affect real player nickname. Create new trigger_multiple, and place trigger_renameplayer. Give trigger_renameplayer a name.


   2. In a target field of trigger_multiple write a trigger_renameplayer entity name.
   Set trigger multiple delay before reset to 0.
   3. Fill new player targetname field in trigger_renameplayer. You can write anything
   you want. Now the players will be renamed on entering trigger. This is a players name.
   4. Place trigger_changevalue on a map. Change keyvalues:
   name -->  it's required.
   destination entity --> the name of players after renaming (the same as new player target name value from trigger_renameplayer).
   destination key --> write a "maxspeed" to change player speed.
   source value --> new value for destination key, in this case for player speed.
   Keep in mind that 270 is default player speed.
   action --> leave it to "replace".
   Rest of keyvalues are for advanced user, and we don't need to use these. Leave flags
   tab as well.
   5. Place func_button or trigger_multiple or anything you like to activate trigger_changevalue, then write a trigger_changevalue name into target field.
   Remember to set delay before reset for multiple use.
   6. To switch player speed to normal, you need to place another trigger_changevalue (for source value 270 for default speed) and activate it.
   After dead, player speed is automatically switching back to normal, but not the name.
   To name all players on map start, place the trigger_multiple on all players spawners.
   Picking up and dropping weapon_minigun will remove the effect.