Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help on a code!
TheDavenia Offline
Member

Posts: 223
Threads: 38
Joined: Jun 2011
Reputation: 0
#1
Need help on a code!

I know how to do this with scripts, but not with items.
How do I make it that if I pick up an item things get disabled and some get enabled?
Please help!

Current Project: Nightmare's End(Project Director, Scripter, boss >:D)
(This post was last modified: 11-05-2011, 06:43 AM by TheDavenia.)
11-05-2011, 05:19 AM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#2
RE: Need help on a code!

Void OnStart()
{
SetEntityPlayerInteractCallback("nameofitem", "nameoffunction", false);
}


void nameoffunction(string &in asEntity)
{
SetEntityActive("nameofentitytodisable/enable", true); \\true means enable, false means disable
}


(This post was last modified: 11-05-2011, 05:27 AM by flamez3.)
11-05-2011, 05:27 AM
Find
TheDavenia Offline
Member

Posts: 223
Threads: 38
Joined: Jun 2011
Reputation: 0
#3
RE: Need help on a code!

(11-05-2011, 05:27 AM)flamez3 Wrote: Void OnStart()
{
SetEntityPlayerInteractCallback("nameofitem", "nameoffunction", false);
}


void nameoffunction(string &in asEntity)
{
SetEntityActive("nameofentitytodisable/enable", true); \\true means enable, false means disable
}
Yeah, only needed to know the VoidOnstart though
(11-05-2011, 05:28 AM)TheDavenia Wrote:
(11-05-2011, 05:27 AM)flamez3 Wrote: Void OnStart()
{
SetEntityPlayerInteractCallback("nameofitem", "nameoffunction", false);
}


void nameoffunction(string &in asEntity)
{
SetEntityActive("nameofentitytodisable/enable", true); \\true means enable, false means disable
}
Yeah, only needed to know the VoidOnstart though
Worked thanks Smile

Current Project: Nightmare's End(Project Director, Scripter, boss >:D)
(This post was last modified: 11-05-2011, 06:10 AM by TheDavenia.)
11-05-2011, 05:28 AM
Find




Users browsing this thread: 1 Guest(s)