UGX-Mods

Call of Duty 5: World at War => Help Desk => Scripting => Topic started by: DeletedUser on January 06, 2018, 03:32:30 pm

Title: Where these "Default" functions come from?
Post by: DeletedUser on January 06, 2018, 03:32:30 pm
I donĀ“t know exactly where this things are scripted, I look up to the .gsc files and these functions are called very usually, but I don't find any code that tell me what thing they do, I don't want to know the fact of what they do because these examples I have it clear,  just need to know where I can find the core of these functions, I don't even know if "functions" is what they are, anyway I'll show you what I'm talking about:

Code Snippet
Plaintext
UseTriggerRequireLookAt();

Code Snippet
Plaintext
Hide();

I'm pretty sure that are more of these kind of default functions.





Title: Re: Where these "Default" functions come from?
Post by: buttkicker845 on January 06, 2018, 04:36:36 pm
Any call to a function will require a parameter () included in it, that is the easiest way to tell if something is a function or if its some kind of variable/data manipulation.

Function call:
Code Snippet
Plaintext
nodeOccupied = ai IsNodeOccupied(node); //determines if a pathnode is occupied by an AI and stores the result in nodeOccupied
variable manipulation:
Code Snippet
Plaintext
ai.ignoreSuppression = true; //makes the AI suppression from weapons

As for the definition of these functions specifically. I dont remember if both are engine functions but i do know that Hide() is, I have included a small description of each function for you
Code Snippet
Plaintext
trigger UseTriggerRequireLookAt();//makes it so the player must look directly at the trigger to use it
Code Snippet
Plaintext
model Hide();//makes any world entity invisible to the player, don't know if it removes collision of the entity
The best place to find information on a lot of the engine functions and some of the standard .gsc utility functions is to look at the script reference here: https://www.ugx-mods.com/script/# (https://www.ugx-mods.com/script/#)

Most of the utility functions found in the _utility.gsc and _zombiemode_utility.gsc has documentation on each of the functions and how to use them

I hope this helps!
Title: Re: Where these "Default" functions come from?
Post by: DeletedUser on January 06, 2018, 05:14:41 pm
Thanks you, finally I understand it :)