SonicProject Posted June 29, 2006 Report Share Posted June 29, 2006 I started working on my engine and I want it to be as precise as it possibly can be. So please... will someone tell me how to fix this issue I'm having? Pintar's sprite and all other sensors are set relative to the x and y position of my main sensor (displayed as a ball) using the Always event. I figured that was enough. But when running the game using any kind of movement, the ball and everything else won't stay together. Pintar and the sensors drag slowly behind (although THEY stay perfectly together for some odd reason). I've ALWAYS had this problem. Just ignored it. Now I want it fixed. If your suggestion is an extension of some sort, please explain how to use it properly. And any extensions out of an official bonus pack are out of the question. If my explanation isn't good enough (I prefer you to try it for yourself anyway), here's a debug release so that you can see it for yourself. Read the debugcontrols.txt in the zip first. http://spexperience.brpxqzme.net/pintar.zip This was posted on another forum. Perhaps I can find better/faster results here? Link to comment Share on other sites More sharing options...
Asuma Posted June 30, 2006 Report Share Posted June 30, 2006 You the X and Y Positions. I'll fix it for you. X( "Left Sensor" )+ X( "Mask" ) Ie X( "Left Sensor" )-16 + X( "Mask" ) Y( "Left Sensor" )+ Y( "Mask" ) X( "Right Sensor" )+16 + X( "Mask" ) Y( "Right Sensor" )+ Y( "Mask" ) X( "Down Sensor" )+ X( "Mask" ) Y( "Down Sensor" )+ 16 + Y( "Mask" ) X( "Top Sensor" )+ X( "Mask" ) Y( "Top Sensor" )- 16 -Y( "Mask" ) It would be something like that. Link to comment Share on other sites More sharing options...
SonicProject Posted June 30, 2006 Author Report Share Posted June 30, 2006 I don't understand. How is that supposed to work? If anything that'd throw the positioning completely out of whack, if not sending the objects zooming off screen. Clarification would be nice, if you don't mind. =o If it'd help, my actions within the Always event are actually like: "Set SPR_Pintar to X,Y of MAS_Pintar (the ball object)" "Set TOP_Pintar to X of MAS_Pintar, Y of MAS_Pintar - 8" etc. Link to comment Share on other sites More sharing options...
someone2040 Posted June 30, 2006 Report Share Posted June 30, 2006 Use a fastloop. If you're using a static engine, always won't cut it. What you do, is you make a loop called position, where you position everything. Then when moving the mask around by pixels, you run the position loop. This way, every single pixel that is moved, it automatically repositions the sensors and stuff. 1 Link to comment Share on other sites More sharing options...
Asuma Posted June 30, 2006 Report Share Posted June 30, 2006 Let me see your engine. Link to comment Share on other sites More sharing options...
SonicProject Posted July 1, 2006 Author Report Share Posted July 1, 2006 Use a fastloop. If you're using a static engine, always won't cut it. What you do, is you make a loop called position, where you position everything. Then when moving the mask around by pixels, you run the position loop. This way, every single pixel that is moved, it automatically repositions the sensors and stuff. Sounds like a winner. I'll give it a shot later. Link to comment Share on other sites More sharing options...
hRook Posted July 1, 2006 Report Share Posted July 1, 2006 I think Always is the same as Every 00"01. Combine Fast Loop with Every 00"00 for better results. Also do what he said and run the loop everytime position is recalculated. 1 Link to comment Share on other sites More sharing options...
SonicProject Posted July 2, 2006 Author Report Share Posted July 2, 2006 Uhh how many times do you run the loop? Start loop asks for a number of loops. Nevermind, figured it out. Thanks. Link to comment Share on other sites More sharing options...
hRook Posted July 3, 2006 Report Share Posted July 3, 2006 Sometimes it's really helpful just to set up a Fast Loop case to use like a void function, so you can have big blocks of actions executed with one action, and you don't have to copy and paste. Link to comment Share on other sites More sharing options...
Recommended Posts