Posts
17
Respect
Forum Rank
Legless Crawler
Primary Group
Member
Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!level thread item_pickup();
function item_pickup_init()
{
thread item_pickup();
//thread item_pickup1();
/*
If you want to add more items, copy the item_pickup function and paste it
but add a 1 to it. Then uncomment //thread item_pickup1();
*/
}
/*
Copy below function and change targetnames to add more items.
obviously add the items in radiant if you do.
*/
function item_pickup()
{
item_model = GetEnt("item_pickup1", "targetname");
item_pickup_trig = GetEnt("item_pickup_trig1", "targetname");
item_pickup_trig sethintstring("Press and hold &&1 to pickup item"); // Set hintstring text here
item_pickup_trig setcursorhint("HINT_NOICON"); // You can comment this out if this line gives you an error
item_pickup_trig waittill("trigger", player;
item_model delete();
item_pickup_trig delete();
// Code for what you want item to do once picked up goes here.
}