JeremyBenson11's Forum Posts

  • Actually this is working perfect like this. Must have been because the debugger was open, or cache needed cleared. Not sure. Does the buttons not register sometimes when debugger is open? Maybe it was trying to us the arrows to jump through text inputs in there, or something.

    Works awesome. Thanks for the help guys

  • Thanks for the help guys. I can see what you're saying about it looping through all the conditions. Having trouble with the else statement. I've tried below, but doesn't work..

  • yup. It's working now from new to load... but load to exit does nothing. I'll show a screenshot.

  • Hey,

    I've decided to mess around with construct again. I'm having troubles with a menu.

    I've got this sprite called menu_option with instance variable option. The initial value is 'new'

    I've got conditions

    key board right pressed, and menu_option = 'new': set menu_option option = 'load'

    key board right pressed, and menu_option = 'load': set menu_option option = 'exit'

    key board right pressed, and menu_option = 'exit': set menu_option option = 'new'

    This is doing nothing. The option variable never switches from new no matter how many times I click right.

    Any ideas?

    Thanks,

    Jeremy.

  • Cool, got results now, but it doesn't necessarily go to the middle point eh? Kind of sucks. Was hoping to do kind of a way point kind of thing, but spline plugin is giving me issues. I get internal errors like _points is not defined.

  • Hey,

    Those are really tough examples. I think my best option would be to start learning qarp right now. The only problem is I'm not real sure of the parameters, and how to make it work. I've got a little capx set up with two points and a sprite. The problem is, I don't think it's working right. Just trying to qarp from current location to the two points.. Could you maybe explain the parameters of qarp to me?

    Also if you could you could maybe take a look at this?

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

    If not, a better ideas of the parameters would be a great help.

    Thanks,

    Jeremy.

  • You could always do something custom. If they bump into each other, make them stop, shake their heads, take a step back, and find a new path You could even pick a random number to see what they do. Like if randomNumber = 1 they shake heads, step back, find a new path, if 2 they stand there looking like they're complaining to each other, 3 = they shake their fists at each other...

    Just some random examples, not sure what you're making though.

  • Yeah, the example isn't perfect, but at least it's a stepping stone. If you can debug it a little, you'll have a pretty good place to draw ideas from.

  • Amazing I would love to see. I found something to, in another thread. Someone sent me some examples. I'm gonna go through them pretty soon. If I come up with something interesting I'll post them. The knowledge above is a great resource. It's very hard to make games when you can't even capture points. I think a thread like this would help people quite a bit.

  • I've just tested and it seems to work fine. Platform controls on bounding box, every tick set sprite to bounding box. Set all your collisions to your sprite, and make sure that your sprites collision max is fitted pretty good to the sprite..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The box helps with collision, and in some engines keeps the sprite from getting stuck on things. In some engines I've seen sprites stick to walls without a sprite box. All you have to do is create a box the same dimensions as the sprite image cell. Every tick stick your sprite to the sprite box. Then you set your controls to move the sprite box. You set the animations playing in the sprite to what ever you're doing to the sprite box. So if you have right arrow key pressed you're moving the sprite box, but the player goes with it. You also have an event set sprite to animation "walk right" while key pressed right arrow.

    I need to do some more research on this myself. To be honest, I'm not sure if you need on in Construct or not. I'm kind of eager to see what other people say.

  • Hello,

    Someone posted a thread about creating a boss that went through phases. I decided to try to rig up an example capx. I'm just wondering if someone can take a look at this, as I have a few things to learn to. The phase states seem to work, but even though I'm call random(1, 5) I seem to never get phase 4 (possible I know.) and I think that's about it... Maybe some efficiency notes would help <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

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

    Thanks..

  • Check out this capx. It's not perfected yet, but it's a start on phases. I'm gonna create my own thread to get suggestions on it. I've got a lot to learn myself. It turned out to be an interesting project helping here. One thing, this is a little rough. In a professional project of my own I would have set the boss to near it's original position after any moving left, right, up, or down, but it's something to work with.

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

  • You can store the sentences in an array. Just drop the object in your layout. Then at start of layout set x 0 = "This is the first sentence", x 1 = "this is the second sentence."

    You can use a for each loop under the cog for the array.

    You can also use dictionaries. I find them to be easier. They work with keys.

    start of layout set key 1 = "first question" value = "this is the first question."

    Then use a foreach under the cog wheel to loop through the dictionary.

    sub event

    compare two values.

    if the first field Dictionary.CurrentKey

    the second = "first question"

    Then in the actions you can set text position, random x,y using layout width and height.

    set text = dictionary.CurrentValue

  • You could use instance variables on the boss for what phase it's in. Go to the layout, and click your boss sprite. To the left you'll see where you add behaviors and what not. Add an instance variable called phase. You can use either a number, or a string. Set the starting phase, could be anything, call it "form 1". Then you would just use that instance variable in your event sheet to do what ever you want. You could do something like every tick, add another condition, click your boss sprite, go to compare instance variable = "form 1" -> action: set boss animation form 1. It might just be glowing red, or whatever.

    Of course this is a bare bones starting point. You'll want to use variables like this to decide what animation is playing, and use events to control the flow of form changes, and what not, but once you learn what I'm talking about the picture will come a little clearer.

    Also as a note you can use events to set this variable to something else. Just make the conditions, the action will be in the sprite, set instance variable..

    Variables are your friend for helping control flow, and keeping track of states.