Jump to content

Lua Spawning an entity


Zelly

Recommended Posts

Hello would it be possible to spawn an entity with the et.G_Spawn() that other players could see and possibly interact with(for example an item_health)? - Maybe a simple example if so.
Or is that not what it is to be used for?

Kind of just learning what possibilitys I have access to with lua then work from there.

Thanks in advance :wub:

Link to comment
Share on other sites

  • 2 months later...

It's possible to remove stuff from map so maybe it is possible to add it :P

 

-------//--------------------remove map objects----------------------------
    for i = 64, 1021 do
        if et.gentity_get(i, "classname") == "misc_mg42" or et.gentity_get(i, "classname") == "team_CTF_redflag" or et.gentity_get(i, "classname") == "team_CTF_blueflag" then
            et.trap_UnlinkEntity( i )
        end

if et.gentity_get(i, "classname") == "trigger_ammo" or et.gentity_get(i, "classname") == "trigger_heal" then  --cabinets
                et.trap_UnlinkEntity( i )
            end
    end

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.

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...