Jump to content
IGNORED

"active" property stops working for later sprites


trufun101

Recommended Posts

Hey guys,

 

I'm new to the world of JagStudio and Raptor.  I've run into a strange issue where the "active" property of a sprite stops working after a particular sprite index.

 

For example, this works, and the sprite hides as it should:
sprite[16].active = R_is_inactive;

 

However, this does not work, and the sprite does not hide:

sprite[17].active = R_is_inactive;

 

Basically, everything beyond the 18th sprite stops respecting the "active" flag.  However, I can still change other properties, such as "x_" and "trans", and they work fine.

 

Has anyone else run into this issue?  Any proposed work-arounds?  Is there a better way to hide/show sprites on screen?

Link to comment
Share on other sites

If you are able to hide sprite x through x but not beyond x, then it sounds like something else is amiss or funky elsewhere. Like you’ve accidentally left an active as on in the main loop by accident.

 

how many sprites are you working with, sizes, etc? Also, are you running it on real hardware?

Edited by Clint Thompson
Link to comment
Share on other sites

10 hours ago, Clint Thompson said:

If you are able to hide sprite x through x but not beyond x, then it sounds like something else is amiss or funky elsewhere. Like you’ve accidentally left an active as on in the main loop by accident.

 

how many sprites are you working with, sizes, etc? Also, are you running it on real hardware?

No, I'm not running on real hardware, just the Virtual Jaguar v2.1.2 emulator.

 

I found a work-around, but I still don't understand what's going on.  I've attached a screenshot of the game.  (For fun, I'm trying to port Mortal Kombat.)  Basically, I want to enable a debug mode to show the hitboxes and Raptor debug window.

 

The root of the issue has something to do with the "KANO" healthbar sprite.  Basically, everything AFTER that sprite doesn't respect the "active" property when it's toggled via the code.  So, moving the "KANO" sprite to the last in the sprite list fixed the issue...but I still don't know why.

MKJag.png

Link to comment
Share on other sites

Try it on BIGPEMU and if that doesn’t resolve it,

find someone to try it on real hardware. I can test it for you if you want to send it. 
 

As long as you’re not turning off the first and/or last object in the list, it’s either VJ related or most likely something wonk in your code but as CJ mentioned, the only way to know for sure is to see it. The code that is. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...