Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - hankster112

Pages: 1
1
Ask a Question / Slope issues
« on: November 21, 2021, 04:43:47 pm »
Continuing from https://community.stencyl.com/index.php/topic,61751.msg317666.html since it got buried.
I've figured out movement a bit better, but I still have two major issues. When traveling down a slope, the player will constantly go on/off the slope, which I assume is due to the X movement carrying the player into the air by made 1-2 pixels only to have gravity bring them back down onto the slope, repeated ad infinitum.
The other issue is that when the player reaches the top of the slope, they do a small hop before returning to normal movement. What are some ways I could go about fixing this?

2
Ask a Question / Video files as a background
« on: November 09, 2021, 06:00:16 pm »
Basically what the title says, would it would be possible to import a video file (MP4, MKV, etc.) as a background, including maintaining a parallax effect and possibly changing its resolution? I'm still working out many ideas in my head and this one seemed interesting. The few threads I've seen on it recommend exporting the video as individual frames, however that seems like a waste of performance and I wanted to check if there was a better way of doing so.

3
Ask a Question / Normalizing movement on slopes
« on: October 26, 2021, 06:47:48 pm »
I've developed a movement system for a 2D Metroidvania that up until now has worked fairly well. However I was only testing it on flat surfaces, and now that I have remembered that sloped tiles exist it's thrown everything out of whack. When trying to walk up a slope, the player's movement is reduced to a crawl and they will slide back down if the button is released. The movement system in this game was built from the ground up (no extensions/starter packs) and probably has a lot of inherent flaws that need to be worked out. Would anyone be able to give me some pointers in the right direction? I can post specific segments/explain other parts if needed.

4
Normally, the hitbox around the player characters stays just that, around the player in a single box. However, when switching to certain animations (specifically when jumping and aiming to the left), the hitbox is placed at a fixed location away from the player (attached image). Any ideas what could be causing this?

5
Ask a Question / Raycasting Help
« on: January 16, 2021, 09:07:46 pm »
I have been using the raycast extension provided here (http://community.stencyl.com/index.php/topic,16734.0.html) to provide coordinates for an instant-traveling projectile. It should be able to detect actors and terrain as well as their current x/y location. However, the coordinates it provides seems to be nonsensical.
It will detect regions correctly, and the debug line I have been drawing to determine where it starts/stops ends in the correct location when it first makes contact with it.
Code: [Select]
Source/scripts/ActorEvents_14.hx:473: [[B2Fixture,[Actor 0,LoadParkourTest],10,896,10,0,0.966777408637874],[B2Fixture,[Actor 0,LoadParkourTest],10,896,10,0,0.966777408637874]]
However, colliding with tiles is a tossup. Sometimes it will travel through several tiles, come out on the other side, and then provide the coordinates it exited the tile from...
Code: [Select]
Source/scripts/ActorEvents_14.hx:473: [[B2Fixture,[Actor 100000000,Terrain],704,639,10,0,0.366336633663366],[B2Fixture,[Actor 100000000,Terrain],0,639,10,0,1]]
...or just ignore all the tiles outright until it hits the edge of the screen, despite being adjacent to the tiles it just collided with and having no difference whatsoever in what type of tile it is.
Code: [Select]
Source/scripts/ActorEvents_14.hx:473: [[B2Fixture,[Actor 100000000,Terrain],620,0,0,10,1],[B2Fixture,[Actor 100000000,Terrain],620,256,0,10,0.666666666666667]]
If the raycast goes offscreen, the game crashes, even though it's set to end at the edge of the screen.
None of this is making any sense to me. This extension is several years old, so is it possible that it's too deprecated to work properly with modern Stencyl?

6
Ask a Question / Pulling data from nested lists(?)
« on: January 16, 2021, 07:26:55 am »
I am currently working with the raycast extension provided here (http://community.stencyl.com/index.php/topic,16734.0.html), and so far it is returning the values I need from it (the x and y coordinates of the first object it hits). However, I am unable to properly access these values from the list it creates.
Here is an example of the raycast making contact with a tile:
Code: [Select]
Source/scripts/ActorEvents_14.hx:465: [B2Fixture,[Actor 100000000,Terrain],491.692307692308,256,0,10,0.692307692307692]
This is what it prints out when it makes contact with multiple tiles/actors:
Code: [Select]
Source/scripts/ActorEvents_14.hx:239: [[B2Fixture,[Actor 30,Corner Detection],576.5,896,10,0,0.559587471352177],[B2Fixture,[Actor 0,LoadParkourTest],9.99999999999998,896,10,0,0.992360580595875],[B2Fixture,[Actor 0,LoadParkourTest],9.99999999999998,896,10,0,0.992360580595875],[B2Fixture,[Actor 100000000,Terrain],896,896,10,0,0.315508021390374],[B2Fixture,[Actor 100000000,Terrain],576,896,10,0,0.559969442322384]]
And here is the readme portion for the block I am using:
Quote
3. "ray cast" returns a list of raycast results, in order of first hit to last hit. Each result is its own list containing:
   0. The B2Fixture hit.
   1. The actor the fixture belongs to.
   2. The x of the collision.
   3. The y of the collision.
   4. The x normal of the collision.
   5. The y normal of the collision.
   6. The fraction along the line at which the collision occurred.
From what I can tell, it is nesting lists inside each other. How would I pull data from a list inside an existing list instead of just pulling an entire list and having it return null/unusable values?

7
Ask a Question / Immediately determine nearest tile in travel direction
« on: January 01, 2021, 12:23:32 pm »
If I'm creating an actor that has instant movement from one point to another (in this context, a projectile that has instant contact from firing to wherever it's being aimed at), how would I determine which tile/actor is in its travel path? My idea was to draw a straight line from the origin of the actor until it makes contact with something, then use the coordinates from where it made contact, but I have been unable to figure out the best method for doing it, and it also seems like there would be an easier way to do so.

8
Ask a Question / Ledegrabbing by using regions and collision boxes
« on: December 11, 2020, 07:08:05 pm »
I am attempting to create a ledgegrab mechanic, but I am unsure of the whole process. The way I would like to do it would be to create two 1x1 hitboxes on the player actor and individual 1x1 regions on each tile corner in the scene they can ledgegrab onto. However, actor regions and scene regions seem to be incapable of interacting with each other, unless I'm missing something obvious. There is also the usage of actor collision points, but the block guide and Stencylpedia is not very descriptive of what they are or what they do, i.e. what tile data is and how it should be used. Is there an example of what would go in tile data that could tie into a ledgegrab mechanic?

9
While trying to implement walljumping, Stencyl can detect the player touching a wall on their right and act on it, but cannot detect if they're touching a wall on their left. Both attributes LeftWalljumpEnabled and RightWalljumpEnabled are being changed and updated equally and correctly, and even though the logic for the left wall jump is exactly the same as the right wall jump, only the right wall jump registers.
  • Changing the order of the left/right events does nothing.
  • Changing the hitbox of the player to a single solid box does nothing.
  • Removing the right wall jump check and leaving the left one in does nothing. Taking out the left one does not effect the right one's functionality.
  • There are no other events that would be interfering with the left wall jump.
I'm at a complete loss, any help would be appreciated.
Also I am aware there are existing kits with walljump already implemented, but I want to do this from scratch.

Pages: 1