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
#12
RE: (Request) Moving Shelf using Secrets Books

Here are the docs for it: http://www.angelcode.com/angelscript/sdk...c_ref.html

What &in means is that it only acts as input (as you'd expect) and it cannot be modified back out. It basically makes a copy of the original value and lets you play with it locally. It says that it has little benefit other than slight performance improvements in certain cases, especially while also using const.

&out on the other hand is a little more interesting. It lets you modify the direct value that was given. From what I understand, you can do this:

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

    
process(value);

    print(
value);
}

void process(int &out value) {
    
value 10;


Running this would print out 10, whereas if it were &in, it would give you 5. Do you see why?

Also, apologies for going off-topic. OP, you can respond whenever if you got your issue resolved.

(This post was last modified: 05-08-2017, 01:38 PM by Mudbill.)
05-08-2017, 01:29 PM
Find


Messages In This Thread
RE: (Request) Moving Shelf using Secrets Books - by Mudbill - 05-08-2017, 01:29 PM



Users browsing this thread: 1 Guest(s)