ome6a1717's Forum Posts

  • Are you OK with one of the arms changing length? Because that will have to happen.

    I think you're right, Sqiddster. I'm going to try extending the left sprite's length and setting the angle to an image point on the right sprite.

    Thanks for the help!

  • I'm wondering if anyone knows an equation that can basically make this happen:

    <img src="https://dl.dropboxusercontent.com/u/28104568/Rotation.png" border="0" />

    I have 2 objects (one behind a sprite, and the other in front) with 2 different origin points. I want to be able to rotate the right one to the mouse.x/mouse.y position at all times, while keeping the end of the left object always under but not sticking through the right object (see FIG 3).

    The origin points can NOT change due to tons of other code utilizing this method. I'm wondering if I can set the left object's angle using an equation based on the right arm's angle that will change when rotating a 180 arc (from 270 to 90)

    Any help would be greatly appreciated!

  • Kosiam - ah, of course! I can't believe I didn't think of that. Thanks!

  • I'm wondering if there is a way to simplify tons of code by using multiple variables within a single variable. ie:

    Global Variable - Weapon (text) = "Shotgun"

    Global Variable - WeaponDamage (number) = 5

    On bullet collision, set damage to int(str(Weapon)&"Damage").

    Something like this could allow you to have 1 event for damage if you have multiple weapons that each have their own damage parameters.

    However, it's not working for me, but is this something that could potentially work?

  • Interesting - that's good to know. Thanks, guys!

  • I actually figured it out. Apparently it was the placement of the "trigger onces" and "for each". For the 2nd to last event, I moved the "trigger once" with the "animation = attack & frame = 4" and the 'for each" where the current trigger one is.

    However, what I don't understand is why that fixed it...

  • MustacheGolem - I think the 8-direction is a good idea. I'm having trouble implementing it completely, but it seems that the general idea works. Also, trying to get animations to work with it are a complete nightmare since there's no way to tell when a wall is about to end.

    Has no one ever done this before?

  • Okay I'm completely stumped. I thought I understood how For Each works, but apparently I don't.

    Can anyone explain why this isn't working?

    <img src="https://dl.dropboxusercontent.com/u/28104568/ForEach1.PNG" border="0" />

    When I have 2 ghosts on the screen, they both do the proper animations and attack, but one of them shoots 4-5 projectiles (for each tick the frame still = 4) and the other shoots 1 like it should.

    Healp!

  • Thats not a bad idea, but I don't think it will look fluid since the sprite will kind of "drop" a bit until it realizes there is nothing beneath it. I wonder if there's a solution with the bullet behavior instead?

  • Right - mine's doing pretty much the same thing. I'm still playing with instance variables, but that doesn't seem to be helping either.

  • Is there a way to make a sprite move left or right using the platform behavior, and then once it gets to a wall, it changes the angle of gravity so it starts to crawl up a wall?

    I'm trying the following code, and it's not working:

    Player.X < Sprite.X

    ---Sprite: Simulate Left

    If Sprite.Platform.AngleOfMotion = 180 & Sprite has Wall on Left

    ---Set Sprite.AngleOfGravity = 180

    ---Sprite.Angle = 90

    Any idea on why this doesn't work? My idea is to be able to basically have the sprite move towards the player always being on a floor or wall. Is something like this possible?

  • I'm working on a game where I have tiles for walls/floors and sprites for corners (so I can include tons of corners into 1 sprite instead of having a bunch of tiles).

    I'm using the grid, and everything looks peachy on my machine (testing in node-webkit). However, when I loaded it up on my laptop, I saw occasional 1-2 pixel gaps between the tile and sprite corners. I thought it was just because I was at a different resolution, but I sent it to a friend who was using the same resolution I was, and he saw the gap as well.

    Is there any way around this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Shameless bump. I've even tried adding an every tick condition setting the volume of BOTH P1 & P2 to the 20*log equation, and still no avail.

  • I've created the following event to seamlessly loop music tracks. The equation for volume makes it so I can have a music volume option control based on a number 0-10 (0 being off, and 10 being normal volume)

    When I have the music volume set to almost anything other than 10 (more noticeable at softer volumes) when P2 plays, there seems to be a strange clip in the audio as if it started the audio at 10 and 1 tick later decided to play at the original volume. Once that happens once, it never does it again until you close the game and retest/open.

    <img src="https://dl.dropboxusercontent.com/u/28104568/Music.PNG" border="0" />

    Is this a bug? Or am I missing something? I should note they do overlap, but I've been told this is okay when using node-webkit.

  • This is actually pretty smart. Thanks, Suikama!