OverbounD Posted September 29, 2008 Author Report Share Posted September 29, 2008 Question 1 Another question after the monitor is destroyed using scrPlayerHandleObjectsMonitor. Where is it decided which action to perform by this I mean where is the code that decides whether to create a shield, add 10 rings, or hurt Sonic? Where is the code that determines this? Question 2 What does consAnimationsSubAnimation do? The reason I'm asking is because I have an animation that I want to stay on one frame unless I'm moving left or right. I thought SubAnimation might be a second set of frames I could call on. Link to comment Share on other sites More sharing options...
VectorSatyr Posted September 29, 2008 Report Share Posted September 29, 2008 It does however shake a bit any idea why its doing that? Because the player's x and y are floor'd when the sprite is drawn to the screen. You'll have to fiddle with the platform offsets using rounding functions for a while. Question 1Another question after the monitor is destroyed using scrPlayerHandleObjectsMonitor. Where is it decided which action to perform by this I mean where is the code that decides whether to create a shield, add 10 rings, or hurt Sonic? Where is the code that determines this? objMonitorIcons. Question 2What does consAnimationsSubAnimation do? The reason I'm asking is because I have an animation that I want to stay on one frame unless I'm moving left or right. I thought SubAnimation might be a second set of frames I could call on. SubAnimation is for special frames played at the same time as another animation. By default, Tail's tails are a SubAnimation. If you want an animation to stay on a certain frame, use AnimationFrame. Link to comment Share on other sites More sharing options...
OverbounD Posted September 29, 2008 Author Report Share Posted September 29, 2008 Thanks that answered my two question, I'm actually getting somewhere now, I've added time travel, a few badniks, a peelout, a hang gimmick, background graphics, and a swing gimmick. The engine is so smoooooth. One thing though I'm not quite sure what platform offset is could you explain what it is and where I can edit it. Stupid question I know. Link to comment Share on other sites More sharing options...
OverbounD Posted October 2, 2008 Author Report Share Posted October 2, 2008 Got another question of course. I'm having a bit of trouble with my hanging object. What happens is if the player is at either edge of the poll and jumps on to grab on the Action Variable switches back and forth between Normal and the Hanging Action making the character jiggle. Because its only happening at the edges of the poll this leads me to believe its a problem with the collision checking. I have yet to be able to figure this out myself. Here's the code and a screen shot for reference. // ==== FUNCTION ====================================================================// scrPlayerHandleObjectsShimmy()// ==================================================================================//_ObjectHandle = instance_nearest(x, y, objShimmy);if(_ObjectHandle = noone) {exit}if (scrPlayerPresiseCollisionCheck(x, y, objShimmy) && Action != consActionHurt) { Action = consActionHang; } else if(Action == consActionHang){ FlagsAllowY = true; Action = consActionNormal; }[/CODE] Link to comment Share on other sites More sharing options...
Damizean Posted October 2, 2008 Report Share Posted October 2, 2008 The piece of code somewhat goes against how the Action states machine should go. All actions should be internally managed by them so all the flags and values are treated correctly when doing a transition between states. Only very exceptional cases should be used to exit from a state. Anyway, the problem with the edges is probably caused due the fact the precise collision check tests the Skin against the selected object. Once the action state changes, the animation does so, and it may detect a new collision with the edge. You should instead use the top sensor, and not the skin. Link to comment Share on other sites More sharing options...
ZFG Posted October 3, 2008 Report Share Posted October 3, 2008 By the love of god, thats a amazing background. Link to comment Share on other sites More sharing options...
OverbounD Posted October 3, 2008 Author Report Share Posted October 3, 2008 Dami Thanks that fixed it. ZGF thanks, I was hoping not many people were looking at this thread I didn't want anyone to see it really yet but was too lazy to do anything about it heh. Link to comment Share on other sites More sharing options...
OverbounD Posted October 10, 2008 Author Report Share Posted October 10, 2008 Hey guys I'm having a bit of trouble with collisons lots of times I think that's because I'm not 100% on what the difference is between each one. Could someone give me a round down of each collision function and how they check for collisions. Link to comment Share on other sites More sharing options...
VectorSatyr Posted October 10, 2008 Report Share Posted October 10, 2008 Here's what I wrote about that: Collision ("Global Objects/Player/Collision")Circular collision around the player is simulated using circular sprite masks and x/y positioning with sine and cosine. The player's angle is calculated by pushing two seperate points out until they both return a collision, then obtaining the angle between the two points. "Limiters" serve as a pre-check, in order to avoid defaulting or crashing when determining the player's angle - either limiter returning false signifies that there isn't enough ground beneath to correctly form an angle, usually meaning you're at an edge or in the air. scrPlayerCollisionCheck holds all possible solid objects the player can collide with, which are used for the "normal" version of the collision scripts (the "Object" version checks for collision with a user-specified instance). By default, there is solid terrain, layered terrain (collision only occurs if objPlayer shares the same layer), and "platforms" which can only be collided with directly from the top (the same as a tile solidity of "01" in a Genesis Sonic game). Link to comment Share on other sites More sharing options...
OverbounD Posted October 12, 2008 Author Report Share Posted October 12, 2008 Thanks that will help me make sense of a few things I've been working on. Link to comment Share on other sites More sharing options...
OverbounD Posted November 1, 2008 Author Report Share Posted November 1, 2008 This should be a simple one. For some reason with my peelout I can change direction while its charging. I cannot find where the direction changes takes place or how the spindash charge stops it. Can someone let me know so I can fix it in my peelout? Thanks Link to comment Share on other sites More sharing options...
Recommended Posts