Kisai's Recent Forum Activity

  • I'll try to explain as best I can. Maybe I can word this in a way that best resembles a word problem even, making it more relatable to the more math-savvy Construct users here.

    I have three objects, and every single one is imperative to my idea. I have a player object, an arm, and a hand. This employs my grappling idea. The character reaches his hand forward to grab onto grapple points. To do this, a hand bullet object is shot from the player object. But we can't just have a floating hand, right? I was going to have a third object, an arm, but I have no idea how to make it stretch out between the player and hand object.

    How can I make the arm object's width stretch out between these two moving objects? I can't figure this out for the life of me, and I can't just try figuring it out based on .X positions since the player could fire off the hand object in mid-fall or something. (Not that I ever figured out how to get it to work with just .X positions anyway shooting it out straight horizontally.)

    I'm guessing this problem will have to do with cos, or... cosine or... whatever... I have no idea. I hope I explained this well enough for anyone reading this to understand what I'm doing. ^^;

  • Bullets spawn at the angle of the object that spawned them. So if your object angle is always 0 degrees (right), your bullets will always spawn at 0 degrees.

    I didn't see that happening, but the collision box object kidna only has one animated direction, so... that might be why. I didn't think it'd matter. Guess it does. ^^

    [quote:bhsdvb4d]You should probably spawn the bullet at the angle of the player's motion, rather than the display angle of the sprite (which is what Sprite.Angle refers to).

    Er... is there a way to get the information of a player's motion? That would be pretty helpful, especially if I could allow for things like, walking forward, push up, shoot, and then you get an up-left diagonal direction of shooting.

  • Ah! Damnit Ashley, again! @ How is it you ALWAYS have so much more knowledge than everyone else? Even in a thread of like, 3 or 4 people discussing my little problem, NO ONE mentioned that! That's awesome. ^_^ Thanks.

  • You know that my usage of bullet behavior is for the grapple thingy shooting from my character, right? ^^ The grapple actions will be done seperately, done mostly from a personal .cap someone posted a year ago. I'll just be copying that. Think Samus's Grapple Beam from Super Metroid.

  • I'm wondering, does a bullet, when spawned, only go to the right unless specified by the keyboard? It seems that to do some diagonal shooting with a platformer, I gotta enter events like this:

    MouseKeyboard: Key Up arrow is down

    MouseKeyboard: Key Right arrow is down

    HandSet angle to 315

    Is it SUPPOSED to be like that, or should bullets be able to be shot diagonally naturally, and somehow I'm just missing that?

  • Example

    There you go, from what I can tell it does what you're wanting to do.

    Oohh, it DOES. NOW I know what you mean with that "spawner" stuff. Do, either with a dummy variable, or dummy sprite, I gotta use some cumbersome way as a work-around, sadly. Thanks. ^_^

  • [quote:3t9os9zo]Oh. Sorry, slight misunderstanding! Well, in that case Lost's method should work - or you can use a variable which stores the number of bullets (Object.Count) - only fire if it is less than one. If you expect to use more bullets, you'll have to distinguish that one somehow (by a variable, for example).

    Funny you say that JUST after figuring out a work-around using a private variable as a switch. The event only works if the private variable is 0. Pressing the fire button sets the private variable to 1, preventing any further firing. In the same event that destroys the bullet, the private variable is set to 0.

    I was using this as a "boomerang"-type effect for a grappling hook thing, hence the "Hand" object. The character reaches out to grab a grapple point, but after a certain amount of distance, the hand retracts back to the character, and of course, we can't have more than one created at a time.

  • I already tried doing some "Trigger Once" stuff before you said that and it didn't work. Even when I tried using it specifically the way you described, it still didn't work. It wouldn't spawn the object at all. Is it a bug with Construct? o_O

    Oh. You think I mean a rapid-fire thing. No, I mean just a single bullet at a time. Until the object's gone, another cannot be created. That's what I meant.

  • I'm trying to do something where you can only create one object at a time. In this case, shooting a single bullet at a time. I'd tried doing something like...

    Hand: Is on-screen

    MouseKeyboard: On key C pressed

    System: Is global variable 'Character' Equal to 2

    SystemCreate object Hand 0 on layer "Playing Field" at (0, 0) from Player 1 's pivot point

    That first event, I tried inverting, so as to tell the event, "If this object is NOT on-screen, and if THIS key is pushed while THIS character is being used, THEN go ahead and spawn/create the object." but for some reason, somehow, I cannot get a one-object limit on this no matter what I do. I don't wanna do a global object just for this either, but does anyone have any ideas on how I can do this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ...I... yeah... Get Text Width and Get Text Height are REAL things that you can get info for by double-clicking on a text object when you wanna do something like, say, change an object's width and height to match that. In the event editor, it appears as [object].TextWidth(Text) or [object].TextHeight(Text) and what I'm saying is that that doesn't work. It's recognizable by the editor, and even when you do the double-clicking thing and select the option "Get Text Width", that shows up even in the newer versions, but it doesn't work.

    I still have no idea what you're talking about the canvas object for... o_O

  • I'm... not sure what the canvas object has to do with anything... o_O

  • Well, there's only one thing I can think of, but for the longest time, the newest updates have been missing one thing that I know of that's been keeping me from using the newer versions for my "game".

    "Get Text Width" and "Get Text Height" or whatever. Why were they removed? I can't think of anything else, but that might be the only thing for all I know. But I was sorta needing that to continue.

    One last thing, I notice jumps in the newer Constructs are a lot more floaty.

    Hm, it seems it's still there... The reason for me thinking it wasn't there is because... well, it's not working for some reason. Unfortunately, I know all too well with my own project that adding new things and fixing old things can lead to NEW problems with old features. ;_;

Kisai's avatar

Kisai

Member since 12 Nov, 2008

None one is following Kisai yet!

Trophy Case

  • 16-Year Club
  • Email Verified

Progress

17/44
How to earn trophies