1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

action_play_synced how it works?

Discussion in 'Get Help/Troubleshooting' started by Henry08, May 17, 2018.

  1. This is official documentation, on first look it's simle but then i set attacker as LOCAL_PLAYER, victim as FOLLOWER1 and anim name from anim_synced.xtbl I get nothing
    Code (Lua):

    -- Make a pair of humans play an animation.  This function blocks
    -- attacker:            (string) name of attacker
    -- victim:                 (string) name of victim
    -- anim_name:            (string) name of synced animation
    -- start_nav_name:      (string, optional) name of the nav point with which to orient the synced animation
    -- sync_type:            (integer, optional) synchronization type (SYNC_LOCAL = affects local player, SYNC_REMOTE = affects remote player, or SYNC_ALL = affects both players; defaults to SYNC_ALL)
    -- NB: This function will still block until the animation actually starts playing.
    function action_play_synced(attacker, victim, anim_name, start_nav, warp_to_nav, sync_type, percentage)
  2. Have you tried 2 npcs?
  3. How to get nps's name? I did't find any code that get pedestrian's names and then use them as argument. I worked with some engines, pedestrian there had constant name + dynamic index so I simply don't know how to get it in SR4.
    I found something but as I understand this function get some nearest pedestrians and gives them names: NPC1, NPC2, NPC3
    Code (Lua):

    -- Add members to the player's party.
    -- names:    (one or more strings) names of NPCs to add to the player's party
    -- player:    (string, optional) name of the player to add party members to (defaults to closest player)
    -- This function will automatically dismiss followers to make room for the specified NPCs.
    -- Example:
    --        party_add("NPC1", "NPC2", "NPC3")
    -- Adds three NPCs to the closeset player’s party, "NPC1", "NPC2", and "NPC3".
    function party_add(...)
    In the mission all characters has some variable that was prescribed in chz files and lua code simply use this variables in fuctions.
  4. Maybe it's not for basic npcs but named npcs like shaundi, pierce etc.