Frictional Games Forum (read-only)
Why wouldn't this script work? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Why wouldn't this script work? (/thread-15705.html)

Pages: 1 2


RE: Why wouldn't this script work? - SilentStriker - 05-30-2012

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);


RE: Why wouldn't this script work? - Your Computer - 05-30-2012

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


RE: Why wouldn't this script work? - Battlefield3142 - 05-30-2012

(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


RE: Why wouldn't this script work? - Your Computer - 05-30-2012

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


RE: Why wouldn't this script work? - Battlefield3142 - 05-30-2012

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


RE: Why wouldn't this script work? - Battlefield3142 - 05-31-2012

(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)


RE: Why wouldn't this script work? - Prelauncher - 05-31-2012

No, SetEntityActive looks like this:
Code:
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
Code:
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.
}



RE: Why wouldn't this script work? - Battlefield3142 - 06-01-2012

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!