heyguy's Forum Posts

  • I'm so sorry Gmoney! I've made a mistake! I wasn't very clear to begin with, my fault. So I'm making a retro pixel art game and the environments are made mostly entirely from tilemaps. I forgot the mention that and I thought that the code we'd brainstorm on here would probably be applicable as "On collision with Tilemap" somehow. Obviously, that's not the case here and would need entirely different code taking into account the tilemap . Sorry for your trouble !

    I guess I would need some sort of code that says Creature:On Collision with Tilemap and specifically checks if it's hitting the "side" of an individual tile on the tilemap? Is that something that's possible to do? I think I need to use some sort of bounding box expression to check if the player collides with side wall, yes? I just had a thought but I'm not sure if it'll work. Need to actually try it. I can give the creature an 8 way direction behavior(or platform behavior) and when the creature is left or right from a wall, mirror the animation?

  • Made some updates to the barrels and rollercoaster! Everyone will need rex Spline to open this new capx. So the barrels are working a lot more as intended. I've figured out how to get the correct rotation and angle on objects. I'm still having a bug where if you enter the "rotating" barrel from another barrel, the player gets shot straight down. Also, if you shoot yourself up from the rotating barrel and enter it again, you'll be shot straight down. Looking at my code, this shouldn't happen. When you enter the rotating barrel, I set the player bullet angle to barrel.angle. Can anyone take a look and figure out why that isn't working properly. I'll keep experimenting.

    Tekniko Any tips or suggestions on how I'm making these barrels work best? I think maybe I foresee problems with how I switch on and off collisions of the barrels for a moment but I'm not sure. I'm a pretty new at this. I'd like to make a combination of barrel to zipline/vice versa but that is currently breaking. I haven't taken a close look at that yet though. Thanks for looking at my post! Here's my capx. I've also created a small test spline rollercoaster on the bottom have of the layout! Check it out, collide with the ziplineSpline sprite!

    https://www.dropbox.com/s/b68c6jzckv7f2 ... .capx?dl=0

  • Gmoney Thanks for the suggestions. Adding barriers is definitely something I could do to get my desired effect. The problem is though that not even room is going to be a perfect square or rectangle like the capx example. There will be boxes, floating solids, elevated grounds, sloped tilemaps and more. I can't go through every room and place a barrier on every wall surface. I mean, I can...but I don't want to That's why I was trying to get the math correct on this.

    TwinBlazar Maybe because I'm using a bullet behavior, I'm shooting myself in the foot like Gmoney says? Maybe I should figure out a way to do this using the 8 way direction behavior and a sine wave? Would that be another way to create this simple Metroid enemy "AI" pattern/behavior? I edited the code like you said and I still can't get the bullet creature to behave similarly to the original Metroid creature above.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Gmoney Amazing! Thanks for the plug in repository and capx! I downloaded everything I needed and updated them all. Rex Spline is great! This is exactly what I needed. I imagine I can create some sort of Donkey Kong style tram car ride or something similar very easily with this!

  • Thanks Gmoney! Thanks TwinBlazar! So when you said " Creature.Bullet.AngleOfMotion ? If it is less than 90 OR more than 270", is this what you meant?

    Here's a capx of what I'm trying to do using Gmoney's modified capx <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy"> I'm ok with the creature abritary changing angles when it hits a corner. I can't imagine how I'd change angle on collision with tilemap. I found a similar behavior in a tutorial and tried to modify the code to fit my character. It almost works. My math sucks. It flips direction when it collides with the top or bottom solids, not the left and right solids.

    https://www.dropbox.com/s/az5f6inrk0nm7 ... .capx?dl=0

  • Hey all! Pretty simple question (I think) but I can't figure it out. I'm trying to create this super simple AI. It's basically just this creature from Metroid.

    What I've created is close enough. So in C2, it's just a sprite with a bullet behavior with bounce of solids set to Yes. In the event sheet all I have is On Start of Layout|AntiGravity Bullet Angle of Motion set 45 degrees. So very simple. How can I check when the creature is moving left or right so I can mirror/flip the animation?

    I couldn't find any info using search and I couldn't deduce how to work something out using debug. Any help would be appreciated! Also, notice how when the sprite collides with an edge of a tile map, the angle of motion changes drastically. How can prevent this? I want it to bounce diagonally at the same angle all the time. Thanks!

    EDIT: Sorry! I forgot to mention this! I'm creating a retro style project so most of the environment is made out of a tilemap. There will be some other solids like boxes and what not. I guess I'll need my creature to bounce left and right when the creature hits a tilemap wall. This is getting more complicated than I thought I would be.

  • Thanks signaljacker! Thanks calebbennetts Thanks so for much for the capx examples! They've really helped me think about this in the correct way. I knew I had to differentiate between going left and right. That and "Set Angle" was messing up my player collisions I think. I've got my code working now too so here's another example on how to replicate a zipline! Capx below! It's not as elegant as yours but it gets the job done too. This one has some instance variables that set the angle, speed and time of the zipline and player.

    I've run into a problem with my zipline. You can see it towards the end of the gif above. I guess I might not run into it with signaljacker's zipline. But how do I differentiate between the different instances of the zipline I collide with?

    So I've started creating the Donkey Kong Country cannon barrels <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy"> How do I set the bullet angle of the player with the angle of a rotating barrel? Take a look at this gif. I don't have the angle of the barrel correct and I'm blasting myself into the ground. Another more complicated question. How do I get it so that the player actually has to jump into and have a portion of his body overlapping with the barrel to "enter" the barrel? Right now, the numbers of the overlap offset confuse me.

    One more thing! I'm also trying to create a rollercoaster-type zipline that moves the player from point A to B (B would be the last point on the path). Here's my attempt. I'm trying to do it without any additional plug ins or behaviors. For now at least. After a bunch of research on the forums, I think I've come up with the easiest solution. I can't get it to work reliably though. What would be the best way to create this effect? Would it be easier using the Rex Spline plug in behavior? Anyway, thanks for all the help folks!

    https://www.dropbox.com/s/ti6m8ohmtcms2 ... .capx?dl=0

  • Thanks for clearing thing up newt! There are already so many great resources here on the forums so I think I'll hold off on buying something for now. That's all good to know though.

  • Gmoney I think I do have them installed. I'm actually able to use MoveTo and Spline within the editor. I have both MoveTo and Spline installed into my C2 behaviors folder. I can add those behaviors to sprites in-game. I just can't seem to open the the capx for some reason. Do I have to drag and drop something into the C2 editor to fully install it?

    Aquanex2 Check this capx out. I think this makes moving waypoint to waypoint or along a certain path pretty easy if you'd rather not use plug ins. I found it yesterday and only started tweaking with it but I like the results so far!

    https://www.dropbox.com/s/9n73n98zux3cy ... .capx?dl=0

    edit: forgot the capx! Thanks Gmoney will download the newest versions and try again!

  • Gmoney Hey I tried to use your capx example but it won't open. It's giving me an error saying I'm missing "Behavior "Line" by Rex.Rainbow. I have the folders for both MoveTo and Spline in my behaviors folder.

  • Subscribe to Construct videos now

    Unfortunately the guy mentions a part 2 but they never created a part 2 :-/

    Might also want to check these files out. They're examples of 2.5D movement. You can download the capx where it says "download the source".

    https://www.scirra.com/arcade/tutorial- ... -4684?cp=8

    https://www.scirra.com/arcade/tutorial- ... ights-5508

  • I'm also trying to create this or something similar to this. I've collected a couple of different capx examples and posts. I'm trying to create some sort of roller coaster or rail system. Nothing working yet but if I figure it out, I'll post it. You might want to check this tutorial. Could be a way to possibly create a platform to move a long a path

    https://www.scirra.com/tutorials/1367/a ... -waypoints

    A possible easier way to create what you trying to create would be to use the Rex spline plug in behavior. Check out the demo.

    behavior-rex-spline_t178563

  • Did you see the two examples I posted before?

    https://www.scirra.com/arcade/tutorial- ... -4684?cp=8

    https://www.scirra.com/arcade/tutorial- ... ights-5508

    You can download the capx to both where it says download the source. They have perfect z/8 directional/2.5d jumping. Anyway, hope some else can help you out!

  • Hey all! There are few things I'd like to pick up on the Scirra store. Some A.I. templates and that $2.39 platformer template. I basically want to learn how to create more interesting A.I. patterns and also maybe see an example of game that's efficiently coded and laid out. I'm not sure I understand all the license stuff and legal-ese though. I don't plan on "using" or "modifying" or "expanding" anything I buy to build/create a game. If I buy anything, it'll be for learning purposes only. I'm already creating a game with my own artwork, story, characters, game ideas, etc. And I've invested hundreds of hours into this already. Anything I learn will go towards the improvement and betterment of my game.

    Will I owe someone something because my enemies act similarly to ones in a template? Will my game no longer by my game if I decide to buy something off the store? Sorry if this is a dumb question, just looking for some clarification. Thanks!

  • Thanks so much for the help Tekniko! You explaining the steps really helped! So I'm beginning with a zip line type effect for now. Barrel effect will come after. I've run into some issues creating this though. Gifs and Capx included. A,D, space to control.

    I'm experimenting with two different ways of creating the zip line effect. One way is a Pin/UnPin and the other by setting the position of the player to the zipline Every Tick. I can't get this second way to work properly. The player disappears during the "ride" from a to b. Can I fix this?

    Set Pos Every Tick

    PIN

    Also, I'm confusing myself trying to make this thing go in reverse. I need the player to be able to move back and forth on the zip line. This is breaking for me. It works on the pin/unpin version but it goes crazy. It flips my player collision upside down. I know what I'm doing wrong in the Set Position Every Tick version but I'm not sure how to get around it. I'm creating some sort of infinite loop before even using the zip line causing it to move by itself.

    Anyway, am I laying out the code correctly for this in general? Should I be using more functions? I want it to look like my character is actually hanging on to the bottom of the "zipline" with his hand. I guess I'd have to create some sort of extra sprite overlapper that spawns on my player's hand during a jump so I can check if it overlaps with the zip line? If the player's hand overlaps with the zipline, then set the player sprite to certain image point and begin the ride?

    https://www.dropbox.com/s/r3p8ic5kcuij8 ... .capx?dl=0

    edit: i thought what might have been making my collision weird was the -180 bullet angle of motion but even when set to 180, my player's collision still gets flipped/reversed/trippy