Seriously!
Go Back   Seriously! Forums > Gaming > Serious Sam HD

Serious Sam HD Discuss anything and everything about Serious Sam HD, the official remake of SS:FE on Serious Engine 3.

Reply
 
Thread Tools Search this Thread Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
Old 06-19-2013, 11:28 PM   #1   Add To Ignore List  
Kleer
 
xanaThaR's Avatar
 
Joined: May 2011
 
xanaThaR is offline
Default List of Default Player Commands

Here is a list with all the Default Player Commands that I could find:


Code:
plcmdSprint
plcmdFire
plcmdAltFire
plcmdReload
plcmdUse
plcmdThirdPersonView
plcmdToggleLastWeapon
plcmdNextWeapon
plcmdPrevWeapon
plcmdDisplayNetricsa
plcmdVoiceComm
plcmdTalk

plcmdX+  -- StrafeRight
plcmdX-  -- StrafeLeft
plcmdZ-  -- MoveForward
plcmdZ+  -- MoveBackward
plcmdY+  -- Jump
plcmdY-  -- Crouch

plcmdMouseH+  --  Move Mouse Left
plcmdMouseH-  --  Move Mouse Right
plcmdMouseP+  --  Move Mouse Up
plcmdMouseP-  --  Move Mouse Down

plcmdEnterVotingMode
plcmdVoteYes
plcmdVoteNo

plcmdMouseLook
plcmdH+
plcmdH-
plcmdP+
plcmdP-

plcmdWeaponSlot1
plcmdWeaponSlot2
plcmdWeaponSlot3
plcmdWeaponSlot4
plcmdWeaponSlot5
plcmdWeaponSlot6
plcmdWeaponSlot7
plcmdWeaponSlot8

plcmdSpectatorModeToggle
plcmdSpectatorNext
plcmdSpectatorPrevious
plcmdSpectatorBack
plcmdSpectatorZoomIn
plcmdSpectatorZoomOut

plcmdPlayerList
plcmdTogglePlayerList
plcmdTogglePlayerListLock
plcmdQuickLoadTogglePlayerList
plcmdPlayerListUp
plcmdPlayerListDown
plcmdPlayerListCommand1
plcmdPlayerListCommand2

plcmdActiveAlternativeWeaponAdjusting
plcmdCopySingleToDoubleWeaponParams
plcmdMoveWeaponLRUD
plcmdMoveWeaponInOut
plcmdActiveWeaponAdjusting
plcmdChangeWeaponFOV
plcmdScaleWeaponBobbing
Most of those should be self-explanatory, but with some of them I am not sure what they do.
There is also no guarantee for completeness or correctness, so I recommend testing before using them in a more complicated script.

How did you find these?
I searched sam3.exe with a texteditor for the keyword "plcmd".

We can just add new Player Commands, so why would we need these?
Sometimes you may want to add functionality to an existing player command instead of creating an entirely new Key Binding and that is when the above list comes in handy.
For example, lets say you want to make a script so that the player takes 50% less damage whenever he is sprinting. With the usage of "plcmdSprint" from the above list, this is an easy task and it would work without having to rebind any keys:

Code:
RunHandled(
  WaitForever,
  
  OnEvery(Event(worldInfo.PlayerBorn)),
  function(eePlayerBorn)
    -- player : CPlayerPuppetEntity
    local player = eePlayerBorn:GetBornPlayer()
    player:EnableReceiveDamageScriptEvent(true)
    local isSprinting = false
    
    RunHandled(
      function()
        Wait(Event(player.EntityDeleted))
      end,
      
      OnEvery(CustomEvent("OnStep")),
      -- eeOnStep : COnStepScriptEvent
      function(eeOnStep)
        if player:GetCommandValue("plcmdSprint") > 0 then
          isSprinting = true
        else
          isSprinting = false
        end
      end,       

      OnEvery(Event(player.ReceiveDamage)),
      -- eeDmg : CReceiveDamageScriptEvent
      function(eeDmg)
        local dmgAmount = eeDmg:GetDamageAmount()
        if isSprinting then
          dmgAmount = dmgAmount / 2
        end
        eeDmg:SetDamageAmount(dmgAmount)
        eeDmg:HandleDamage()
      end
    )
    
  end
)
You can test this script by copying it into a scriptentity in the editor or creating a new lua file under \Content\SeriousSam3\Scripts\CustomWorldScripts and putting it in there (it will then be executed for every map that is started in the editor or the moddable version)

Last edited by xanaThaR; 06-20-2013 at 07:24 PM.
  Reply With Quote
Old 01-15-2016, 08:06 PM   #2   Add To Ignore List  
Master of Kalamzoo
 
Captain_Russia's Avatar
 
Joined: Jun 2006
Location: Tropico
 
Captain_Russia is offline Youtube: IDGCaptainRussia
Default Re: Standard Player Commands

I have to revive this thread to say, Thank you so much! I been wanting to figure out this functions!
__________________
When marital law demands you can't be yourself, you simply go insane.
captainrussiacptnrss07@gmail.com
  Reply With Quote
Old 01-15-2016, 11:57 PM   #3   Add To Ignore List  
ah damnit
 
Squadala's Avatar
 
Seriously! Secret Agent
Joined: Dec 2009
 
Squadala is offline
Default Re: Standard Player Commands

The dude's avatar made me think this was written by Discy at first because of how similar it is to his old one.
  Reply With Quote
Old 01-16-2016, 06:52 AM   #4   Add To Ignore List  
Goodbye Moonmen
 
Discy's Avatar
 
Seriously! Khnum
Joined: Jul 2003
Location: The Netherlands
 
Discy is offline Steam ID: joey42
Default Re: Standard Player Commands

Quote:
Originally Posted by Squadala View Post
The dude's avatar made me think this was written by Discy at first because of how similar it is to his old one.
You kidding me? I wouldn't touch .gif with a 10-foot-pole unless it has to be animated.
__________________
"Is there any better Gerüstbaufirmenvorarbeiterschlüsselanhängerfarbenwasserlöslichkeitskontrollchemiker than discy? No!" -Shrinker
[22:30] Fiendian: Discy, Finzy and Louva shall merge into a superentity known as the Lickyfonz.
"Can we just move Discy's posts to the HOF automatically already? :P" -Jetty


Ir-Kalla: Serious Sam Classic map pack in development (Ir-Kalla: Egypt Demo)
  Reply With Quote
Old 01-17-2016, 06:35 PM   #5   Add To Ignore List  
Master of Kalamzoo
 
Captain_Russia's Avatar
 
Joined: Jun 2006
Location: Tropico
 
Captain_Russia is offline Youtube: IDGCaptainRussia
Default Re: Standard Player Commands

well, I hope you didn't mind me reviving this one, but it's very useful to SeD lua coders like me
__________________
When marital law demands you can't be yourself, you simply go insane.
captainrussiacptnrss07@gmail.com
  Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling for All for Fan Art Breedlove News & Announcements 42 06-26-2009 01:48 PM
Serious Reference Redshirt Serious Editor 14 11-16-2001 06:18 PM


All times are GMT -4. The time now is 02:04 AM.