Donic Dawkins's Forum Posts

  • badmoodtaylor, I hear ya, all good.

    99Instances2Go, lovely code, thanks for posting. Timer seems like a good way to go, still going through your code but think I get it...

    cheers,

    M

  • Thanks for file badmoodtaylor but can't open as I'm still on the last stable release (r233). I made the group inactive rather than disabled and the effect occurred, but did not ramp to 100, jumped to the highest value.

    blackhornet, made the change as you suggested and the code works. Not sure of how to manipulate the lerp values. The manual states this as the definition of lerp:

    lerp(a, b, x) Linear interpolation of a to b by x. Calculates a + x * (b - a).

    So for my example a = BlurValue, b = time it takes to come to full value (?), and x = amount of blur to add (?).

    thanks,

    M

  • HI badmoodtaylor and SimoneT,

    Both seems like good approaches, thanks for suggesting. I like the idea of Groups that get turned on/off, and I also like the idea of using the lerp function for easing.

    However couldn't get either to work

    badmoodtaylor, I may have the math wrong. I tried it several ways, how would I properly state "BlurEffect plus x"?

    SimoneT, not sure what isn't working here. Pretty sure I have my global and instance variables set right, and I copied and pasted your values for lerp.

    thanks,

    Matt

  • Hi, I'm wondering how I to ramp value so that it moves smoothly from, for example, 1 to 100, rather than just an abrupt jump from 1 to 100.

    Specifically, I want to blur the title text of my game on the start menu once the player selects "start". The title text has the BlurVertical effect on it, I can trigger it to jump from 0.1 to 100, is there a way to make the effect ramp to the higher value?

    thanks,

    Matt

  • Thanks badmoodtaylor, that bit of code worked, however I confess I don't understand the ?.

    I ended up setting the angle of the bullet to 180 or 0 based on whether the Boss is mirrored or not. That's because I also changed the Boss so that he always faces the Player, whether he's moving away or towards him. It's looking good, in a simple as shit 8-bit boss kind of way, thanks for your help!

  • Well maybe that's not what's happening now.

    NOW, since I'm destroying the bullet every time the Boss changes direction, the bullet does NOT change direction as previously stated. But the bullet disappears when the Boss changes direction, which looks odd.

    I'm having the bullet destroyed because when I don't, the bullets DO change direction with the Boss.

    At this point, trying to figure out how to keep that bullet on screen (not being destroyed mid-flight) when the Boss abruptly changes direction.

    I added the Fade behaviour to the bullets so that they taper off in opacity and we don't notice any abrupt exiting.

  • Hi,

    I have a Boss who spawns a bullet object (Eball) every three seconds, whenever he gets Line of Sight to the Player. That part works.

    But the Boss is set to travel back and forth in the Boss chamber, changing direction whenever he hits the wall.

    And the bullets do the same thing. If they're still onscreen, they will change with him. Otherwise they get Destroyed when they go offscreen.

    How to make the bullet's independent so that they don't follow the Boss's direction? Code below (for Boss movement and bullet spawning):

    Is it a setting in the Bullet Behaviour for the bullet object (Eball)?

    Any suggestions etc. greatly appreciated,

    thanks,

    M

  • Interesting, thanks for the info, I'll start digging around. Yes, like the idea of a random speed change every X seconds.

  • Nice, this works for me as well, thanks.

    I changed the speed to 1 and they flock to the Player as he goes by. Also added Solid behaviour so the Player can bump against them.

    Wondering now how I can give each Bat a different speed. Would an Instance Variable be the right tact? Create a Speed variable... but how to specify each Bat with it's own speed.

  • Hi,

    Using some pretty basic code to get a killer bat to MoveTo my Player, and it works, but it will only work for 1 bat. I have multiple copies of the bat on the screen but only the first, original bat will move. I'd like all Bats to do the same movement. Here's my code:

    Here's the Player in the Bat Cave:

    Any thoughts/suggestions greatly appreciated!

    thanks,

    M

  • HI,

    In my platformer game I want to attach an object (pitchfork) to my Player and then press a key and have the pitchfork thrust to the right by 30 pixels or so by pressing Keyboard "Z".

    I've attached the object in two ways, by using a

    System Every Tick event - Set Position to Image point

    but this seems to be rigid, I can't change the position, only the rotation. I tried making a Condition to the event, that if Keyboard "Z" was NOT pressed, and this seemed to allow the thrusting (by shifting to another Image Point), but the pitchfork would not adhere to the Player if I thrusted and jumped or moved.

    Also attached via the Pin To behavior on the object, but again I can't get the position adjusted after that.

    Any advice, pointers, etc. much appreciated,

    M

  • Thanks plinkie,

    I added the invisible object and pinned it to Player, put the invisible object a little bit above my player and then added the scrollTo function to the invisible object, works like a charm. (disable collisions, kept visible, turned opacity to zero on the invisible object).

    And when they jump in the hole I made an invisible object for the player to collide with that turns off the scrollTo function on the phantom player.

    cheers,

    M

  • Hey, thanks again guys, I kept screwing around and found a simple way, no Physics required:

    (hmm is there a trick to adding an image to a post, can't seem to paste anything in. Guess that's an attachment?)

    If Player overlapping object at offset (0,2), then Player set Platform Vector Y to -800

    cheers,

    M

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • HI,

    Two questions. First, how can I stop the ScrollTo function from running. On the bottom level of a multi-leveled platform stage, I want to have the Player jump into a hole and have the ScrollTo not follow him. I think it has to do with Y and LayoutHeight, but I can't figure out which way Y runs... is it at Zero on the bottom of the layout and increasing positively upwards, or negatively? I've tried Y greater than LayoutHeight + 50 but not getting anywhere....

    Second, how do I adjust the ScrollTo function so that it does not center the Player. I'd like to show more area above the player's head permanently as they navigate through the levels. I figure this is also maybe a System adjustment.

    Any suggestion appreciated,

    thanks

    M

  • Hmm. And if I didn't want to make the platform bouncy by using physics? Feel like there should be a materials property to a solid...

    Sol, in your code bits above, the option to Apply Force, is that contextual if you have Physics applied to the platform block?

    thanks,

    M