Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why wouldn't this script work?
Author Message
SilentStriker Offline
Posting Freak

Posts: 939
Joined: Jul 2011
Reputation: 39
Post: #11
RE: Why wouldn't this script work?
if you want the jesus to spawn when the player has the key it should look like this

if(HasItem("scary_key_1")) SetEntityActive("jesus", true);

(This post was last modified: 05-30-2012 07:15 AM by SilentStriker.)
05-30-2012 07:14 AM
Find all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,242
Joined: Jul 2011
Reputation: 216
Post: #12
RE: Why wouldn't this script work?
(05-30-2012 04:24 AM)Battlefield3142 Wrote:  And Computer, what do you mean SetEntityAcitve has no (string) it does in the functions page.

Look again and you'll see it has (string, bool), not (string).

Tutorials: From Noob to Pro
05-30-2012 11:49 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Battlefield3142 Offline
Junior Member

Posts: 13
Joined: May 2012
Reputation: 0
Post: #13
RE: Why wouldn't this script work?
(05-30-2012 11:49 AM)Your Computer Wrote:  
(05-30-2012 04:24 AM)Battlefield3142 Wrote:  And Computer, what do you mean SetEntityAcitve has no (string) it does in the functions page.

Look again and you'll see it has (string, bool), not (string).
hhmmm seems are are right on that one.

void SetEntityActive(string &in asParent, string &in asChild, int alState)


is what I am using for the collide callback. When I use "(string& asName, bool abActive);" it doesnt work. It gives an error.






And what you will tell me will probably make me seems like the biggest R-tard on this forum XD
05-30-2012 12:49 PM
Find all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,242
Joined: Jul 2011
Reputation: 216
Post: #14
RE: Why wouldn't this script work?
(05-30-2012 12:49 PM)Battlefield3142 Wrote:  void SetEntityActive(string &in asParent, string &in asChild, int alState)


is what I am using for the collide callback. When I use "(string& asName, bool abActive);" it doesnt work. It gives an error.

And what you will tell me will probably make me seems like the biggest R-tard on this forum XD

You're confusing yourself by taking things out of context.

Tutorials: From Noob to Pro
05-30-2012 01:18 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Battlefield3142 Offline
Junior Member

Posts: 13
Joined: May 2012
Reputation: 0
Post: #15
RE: Why wouldn't this script work?
ok, so how would you write this?

(05-30-2012 08:39 PM)Battlefield3142 Wrote:  ok, so how would you write this?
and if Im coming off a douche I dont mean too Blush
(This post was last modified: 05-30-2012 08:44 PM by Battlefield3142.)
05-30-2012 08:39 PM
Find all posts by this user Quote this message in a reply
Battlefield3142 Offline
Junior Member

Posts: 13
Joined: May 2012
Reputation: 0
Post: #16
RE: Why wouldn't this script work?
(05-30-2012 01:18 PM)Your Computer Wrote:  
(05-30-2012 12:49 PM)Battlefield3142 Wrote:  void SetEntityActive(string &in asParent, string &in asChild, int alState)


is what I am using for the collide callback. When I use "(string& asName, bool abActive);" it doesnt work. It gives an error.

And what you will tell me will probably make me seems like the biggest R-tard on this forum XD

You're confusing yourself by taking things out of context.
oh my god I think I see it.

something like this?

void SetEntityActive(string &in asParent, string &in asChild, bool abActive, int alStates)
05-31-2012 02:01 AM
Find all posts by this user Quote this message in a reply
Prelauncher Offline
Senior Member

Posts: 393
Joined: May 2011
Reputation: 11
Post: #17
RE: Why wouldn't this script work?
No, SetEntityActive looks like this:
SetEntityActive(string& asName, bool abActive);


I think that you have confused your functions, You don't have to name the function to what you want to use:
Example
AddEntityCollideCallback("Player", "scriptarea", "MYFUNC", true, 1); //This is placed under void OnStart or OnEnter
void MYFUNC(string &in asParent, string &in asChild, int alState)
{    
SetEntityActive("Item1", true); //True means that you want the entity to be active, if you want it to be inactive you use false.
}

Calories (noun): Tiny creatures that live in your closet and sew your clothes a little bit tighter every night.
(This post was last modified: 05-31-2012 09:25 AM by Prelauncher.)
05-31-2012 09:24 AM
Find all posts by this user Quote this message in a reply
Battlefield3142 Offline
Junior Member

Posts: 13
Joined: May 2012
Reputation: 0
Post: #18
RE: Why wouldn't this script work?
yeah yeah guys. I get it! OMG!!! Smile))))))))))


im uber confusing my self with other funcs

thanks alot guys!!!!

Smile

i got it to work. thanks!
06-01-2012 04:22 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)