Post: Objects-related question
08-05-2016, 08:10 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); I was scrolling through some BO2 functions and found something that drawn my attention:

I found a piece of code that creates a spawnStruct() which, as I am aware, is designed to create objects information, like .something:

     myStruct = spawnStruct(); 


Now, my question is, how does one goes to knowing what to call that myStruct outside of that scope.

For instance, the game created an struct and now I want to retrieve it's name so I can use it somewhere else, since it was not a level. or self. type of variable I can't just use myStruct, so I was wondering if I re-created that thread, what would I have to do to print out it's name, so I can work with it outside the game, and applying it to my own function.
(adsbygoogle = window.adsbygoogle || []).push({});
08-05-2016, 09:41 PM #11
itsSorrow
In my man cave
Originally posted by Conditional View Post
Every video is there, I just unlisted my first bo2 azza one, please, stop commenting here if you don't know what I'm requesting, if you want to chit-chat dm me on twitter @lowkeynho


u blocked me lel
08-05-2016, 09:46 PM #12
Originally posted by Gentle View Post
u blocked me lel


You must login or register to view this content.
08-05-2016, 09:48 PM #13
anthonything
Space Ninja
Originally posted by Conditional View Post
Like, I can use level.piece, and it works, but I can't print the name, my main goal is to know the entity name so I can use it somewhere else, outside this thread. but first I need to know how to get it's name.


It doesnt have a name... Do you understand what i am telling you? Structs are just reserved memory spots.... They arent physical entities, nor can you just get them. You must either get it from the level superobject or get it on return. There is a getstructarray method, but that does not apply to local structs.
08-05-2016, 09:50 PM #14
itsSorrow
In my man cave
Originally posted by Conditional View Post
You must login or register to view this content.


u used 2 have me blocked lmao
08-05-2016, 11:26 PM #15
Originally posted by Conditional View Post
I was scrolling through some BO2 functions and found something that drawn my attention:

I found a piece of code that creates a spawnStruct() which, as I am aware, is designed to create objects information, like .something:

     myStruct = spawnStruct(); 


Now, my question is, how does one goes to knowing what to call that myStruct outside of that scope.

For instance, the game created an struct and now I want to retrieve it's name so I can use it somewhere else, since it was not a level. or self. type of variable I can't just use myStruct, so I was wondering if I re-created that thread, what would I have to do to print out it's name, so I can work with it outside the game, and applying it to my own function.


What do you mean name?
Like myStruct.name?

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo