Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google Log In with Steam Sign In
  • Create Account
Photo

Lua Spawning an entity

- - - - -

  • Please log in to reply
2 replies to this topic

#1
OFFLINE   Zelly

Zelly

    Regular Member

  • Coders
  • PipPipPip
  • 141 posts
73
Getting Better

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:



#2
OFFLINE   Micha!

Micha!

    Newbie

  • Members
  • Pip
  • 2 posts
0
Unknown

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



#3
OFFLINE   Zelly

Zelly

    Regular Member

  • Coders
  • PipPipPip
  • 141 posts
73
Getting Better

I managed to spawn a medpack via command, after copying entity values of a medpack I dropped. However it does not heal, So I got stuck.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users