trufun101 Posted September 23, 2023 Share Posted September 23, 2023 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? Quote Link to comment https://forums.atariage.com/topic/355091-active-property-stops-working-for-later-sprites/ Share on other sites More sharing options...
Clint Thompson Posted September 23, 2023 Share Posted September 23, 2023 (edited) 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 September 23, 2023 by Clint Thompson Quote Link to comment https://forums.atariage.com/topic/355091-active-property-stops-working-for-later-sprites/#findComment-5321750 Share on other sites More sharing options...
+CyranoJ Posted September 23, 2023 Share Posted September 23, 2023 Not encountered this outside of first/ last in a list. Would be to see code to answer further. Quote Link to comment https://forums.atariage.com/topic/355091-active-property-stops-working-for-later-sprites/#findComment-5321759 Share on other sites More sharing options...
trufun101 Posted September 23, 2023 Author Share Posted September 23, 2023 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. Quote Link to comment https://forums.atariage.com/topic/355091-active-property-stops-working-for-later-sprites/#findComment-5321964 Share on other sites More sharing options...
Sporadic Posted September 23, 2023 Share Posted September 23, 2023 The first and last objects in the list must always be active. So that's worth checking. Quote Link to comment https://forums.atariage.com/topic/355091-active-property-stops-working-for-later-sprites/#findComment-5321982 Share on other sites More sharing options...
Clint Thompson Posted September 23, 2023 Share Posted September 23, 2023 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. Quote Link to comment https://forums.atariage.com/topic/355091-active-property-stops-working-for-later-sprites/#findComment-5321983 Share on other sites More sharing options...
trufun101 Posted September 23, 2023 Author Share Posted September 23, 2023 (edited) 1 hour ago, Sporadic said: The first and last objects in the list must always be active. So that's worth checking. Ah-ha! That was the issue. My hit box was the last item in the list, so it wouldn’t allow it to be inactive. thanks! Edited September 23, 2023 by trufun101 4 Quote Link to comment https://forums.atariage.com/topic/355091-active-property-stops-working-for-later-sprites/#findComment-5322034 Share on other sites More sharing options...
Recommended Posts
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.