Jump to content

Jak zrobić samorozpakowywującą się rzecz?


Recommended Posts

NAZWA: Jak zrobić samorozpakowywującą się rzecz?
AUTOR: timyrzazaza

 

LISTA PLIKÓW DO EDYCJI:

Spoiler

Pliki, które utworzymy:

  • use_item.script

SCRIPTS:

  • bind_stalker.script

 

ZMIANY W PLIKACH:

Spoiler

1. USE_ITEM.SCRIPT:

Spoiler

Tworzymy nowy plik o nazwie use_item.script. Dopisujemy do niego to co chcemy, to co poniżej:

function medkit(obj)
    if obj ~= nil then
        if obj:section() == "medkit" then
        alife():create("promedol",db.actor:position(),db.actor:level_vertex_id(),db.actor:game_vertex_id(),db.actor:id())
        alife():create("taren",db.actor:position(),db.actor:level_vertex_id(),db.actor:game_vertex_id(),db.actor:id())
        alife():create("iod",db.actor:position(),db.actor:level_vertex_id(),db.actor:game_vertex_id(),db.actor:id())
        alife():create("promedol",db.actor:position(),db.actor:level_vertex_id(),db.actor:game_vertex_id(),db.actor:id())
        end
    end
end

 

 

2. BIND_STALKER.SCRIPT:

Spoiler

Dopisujemy do funkcji actor_binder:on_item_drop (obj) :

        use_item.medkit(obj)

 

 

 

ŹRÓDŁO:

https://ap-pro.ru/forums/topic/4415-kak-sdelat-raspakovyvayushtiysya-vesht/

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.