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
Script Help (Request) Moving Shelf using Secrets Books
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#10
RE: (Request) Moving Shelf using Secrets Books

If it starts with 2 forward slashes, then it's a comment and has no effect on the script. But that's not what you asked, eh?

This part is used inside the parameters of a function. The first part specifies the data type of the parameter, the second part is optional but has to do with AngelScript and how it copies and transfers information between the input and output values (you don't necessarily need to know what this means), and the last part is the given name of the parameter.

Have an example:

PHP Code: (Select All)
void MyFunc(int value) {
    
DoSomething(value);


This function named MyFunc takes an integer parameter. Therefore if you want to call this function, you must satisfy that.

PHP Code: (Select All)
void OnStart() {
    
MyFunc(5);


Here we give MyFunc an int with the value of 5. What happens is that MyFunc now takes that value of 5 and does something with it.

The &in part I can't really explain because I don't properly understand it myself, but I've read about it on the AngelScript wiki, and it seems to be specific to this language. It can be &in, &out or &inout for input, output or both, respectively. I believe it handles the scope of the variables given to the function.

05-07-2017, 09:33 PM
Find


Messages In This Thread
RE: (Request) Moving Shelf using Secrets Books - by Mudbill - 05-07-2017, 09:33 PM



Users browsing this thread: 1 Guest(s)