搜索结果: *

  • 用户:alkaiq
  • 按日期排序
  1. alkaiq

    Modding Q&A [For Quick Questions and Answers]

    YAY! It worked! Thank you so much!

    Vornne 说:
    alkaiq 说:
    I just started modding and I have been trying to figure out how to find out the correct <slot_no> of multiplayer players' equipement.

    E.g. we all have 4 inventory slots for melee/ranged items. How do I know what is the <slot_no> of a particular item (for example, the most top slot)?
    If you are trying to change player equipment while they are spawned into the scene, you need to change the agent's equipment, not the player's: the player object is created when they join the server, and remains to store related data until they disconnect, but the agent object is created only when the visible character is spawned, and is destroyed soon after the character dies (about 30 seconds). To change what the player will have instantly, you need to use the agent_equip_item and agent_unequip_item operations: note that the optional third parameter to the operations (slot number) when equipping weapon items uses different values to the ek_item_* constants noted above, slots 1 - 4 rather than 0 - 3; and armor items are automatically put in the correct slot, but only the stats for combat calculations on the server is updated automatically, so you need to manually send messages to all connected clients to run agent_equip_item to update the visible armor mesh. From memory, I think that if an agent equip slot already has a weapon in it, trying to equip another one on top might do nothing, so you have to unequip it first to replace it.

    To make items equipped with agent_equip_item persist into the next round correctly with multiplayer game modes, you would need to carefully check all the scripts and mission template triggers that use player_add_spawn_item to ensure the correct items are kept; I would guess items equipped to the agent would work like for weapons picked up during the round. To get the agent id from the player id, use player_get_agent_id, and then check with agent_is_active to ensure the player is not spectating or just joined (which could cause errors with operations on the returned agent id, if so).
  2. alkaiq

    Modding Q&A [For Quick Questions and Answers]

    This again. :sad:
    The previous replys did not help. :sad:

    alkaiq 说:
    Hello!

    I just started modding and I have been trying to figure out how to find out the correct <slot_no> of multiplayer players' equipement.

    E.g. we all have 4 inventory slots for melee/ranged items. How do I know what is the <slot_no> of a particular item (for example, the most top slot)?

    Thanks in advance,
    Carpra

    Edit: I'm trying to change a particular slot's contents with a script. If it is even possible...

    Namakan 说:
    Could just try using this(obviously before the players agent is spawned):

    插入代码块:
    player_add_spawn_item                        =  410  # (player_add_spawn_item, <player_id>, <item_slot_no>, <item_id>),
                                                         #
    with item_slot_no being one of these:
    插入代码块:
    ek_item_0 = 0
    ek_item_1 = 1
    ek_item_2 = 2
    ek_item_3 = 3
    ek_head   = 4
    ek_body   = 5
    ek_foot   = 6
    ek_gloves = 7
    ek_horse  = 8
    ek_food   = 9
  3. alkaiq

    Modding Q&A [For Quick Questions and Answers]

    Namakan 说:
    插入代码块:
    player_add_spawn_item                        =  410  # (player_add_spawn_item, <player_id>, <item_slot_no>, <item_id>),
                                                         #

    Yeah, tried that but it doesn't change automatically, but does it during respawn cycle. :/
  4. alkaiq

    Modding Q&A [For Quick Questions and Answers]

    Hello!

    I just started modding and I have been trying to figure out how to find out the correct <slot_no> of multiplayer players' equipement.

    E.g. we all have 4 inventory slots for melee/ranged items. How do I know what is the <slot_no> of a particular item (for example, the most top slot)?

    Thanks in advance,
    Carpra

    Edit: I'm trying to change a particular slot's contents with a script. If it is even possible...
  5. alkaiq

    EU_A_PW_RP Town Watch application thread [OPEN]

    Why do you want to be a townguard?
    I want to stop randoming in the server because it's sick how people kill each other just for killing!  :cry:
    On a scale of 1-10 how mature are you?
    I think 6.
    Are you willing to use a teamspeak channel we have setup for you?
    Yes!
    Do you see yourself as an admin in the future?
    I don't think so.
    What is you're in Game Name?
    Alizen
    How good are you at speaking English? (scale of 1-10)
    7
后退
顶部 底部