Getting parent of Sprite_Enemy returns nulls

masterlobo

Veteran
Veteran
Joined
Mar 14, 2012
Messages
187
Reaction score
131
Primarily Uses
Hello!

If I log within Sprite_Enemy

Code:
console.log(this);
I can see it has a parent object.
upload_2017-2-16_16-3-43.png

But when I try to access it, it returns null!

Code:
console.log(this.parent);
That logs null.

Any idea why?
 
Last edited:

masterlobo

Veteran
Veteran
Joined
Mar 14, 2012
Messages
187
Reaction score
131
Primarily Uses
This is driving me crazy... I need another pair of eyes on this to help me :(

Therefore...

Here's a sample project demonstrating my case.

Just open the project in the editor, Test, then open console with F8.

Talk to the only NPC on the map and pay attention to the console when the battle starts.

You will see I log the Sprite_Enemy object, which includes a Parent property that is not null, but when I log just the parent object it returns null.

For more info dive into the u.js plugin file in the project.

Here's the sample project: https://dl.dropboxusercontent.com/u/46654731/NullParentLog.zip
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,354
Reaction score
8,533
First Language
English
Primarily Uses
RMMV

Member, please do not bump your topic unless it has been 72 hours later since your last post. You can review our forum rules here. Thank you.

 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,045
Members
137,569
Latest member
Shtelsky
Top