Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • Need help?

    Create a topic in the appropriate section
    Don't write everything in the chat!
  • Take a look at the marketplace

    There you can buy
    everything related to game servers
  • Don't want a ban?

    Please read our rules
    Don't disturb the order!
  • Sell or buy?

    Use services of the guarantor
    We will make your deal safe
  • 0
NEMESIS-TLM

Заражение при лутании зомби

Подскажите, как прописать заражение при лутании зомби? Видел где-то на одном сервере.

 

Добавлю: суть состоит в том, что надо в перчатках лутать зомби, иначе получаешь мгновенно заражение.

Edited by NEMESIS-TLM (see edit history)

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Например можно заразить всю еду собранную с зомби салмонелой, тот кто её съест заразится

modded class Edible_Base extends ItemBase
{
    void EEOnCECreate()
    {
        super.EEOnCECreate();
        ZombieBase parent;
        if (CastTo(parent, GetParent()))
        {
            InsertAgent(eAgents.SALMONELLA, 1);
        }
    }
}

 


можно заразить снятую с зомби одежду, которая при одевании на игрока будет его заражать

 

modded class Clothing extends Clothing_Base
{
    override void OnWasDetached( EntityAI parent, int slot_id )
    {
        super.OnWasDetached(parent, slot_id);
        ZombieBase zombie;
        if (CastTo(zombie, parent))
        {
            InsertAgent(eAgents.SALMONELLA, 1);
        }
    }

    override void OnWasAttached( EntityAI parent, int slot_id )
    {
        super.OnWasAttached(parent, slot_id);
        PlayerBase player;
        if (CastTo(player, parent) && GetAgents() > 0 &&  ContainsAgent(eAgents.SALMONELLA))
        {
            player.InsertAgent(eAgents.SALMONELLA, 1);
            RemoveAgent(eAgents.SALMONELLA);
        }
    }
}

 

А вот с предметом при лутании немного сложнее, нужно думать
 

Edited by Archon7th (see edit history)

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

By using this site, you automaticly agree to our Guidelines and Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.