CloudDealer's Forum Posts

  • How about collision filtering, where the player ignores the follower's collision box entirely, while keeping the follower collision box enabled all the time?

    Figured it out! Now all I need to do is figure out how to make the follower move around walls instead of getting stuck on them. Is there a simple way to do this?

  • More specifically, how would I make the follower's collision disable ONLY when the player walks in it's collision box

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • proj: drive.google.com/file/d/11yitalb_CWbsxo47kkuHVdNNK_fpXebZ/view

    (for some reason I can't share screenshots.)

    I'll just copy some of the code.

    [every_tick]

    ----+ System: Every tick

    | Local number dist‎ = 0

    | Local number ang‎ = 0

    --------+ (no conditions)

    ---------> System: Set ang to angle(SPR_FOLLOWER.X, SPR_FOLLOWER.Y, PLAYER_BASE.X, PLAYER_BASE.Y)

    ---------> System: Set dist to distance(SPR_FOLLOWER.X, SPR_FOLLOWER.Y, PLAYER_BASE.X, PLAYER_BASE.Y)

    --------+ System: dist > 30

    ---------> SPR_FOLLOWER: Set 8Direction vector X to (dist-30)×cos(ang)×2

    ---------> SPR_FOLLOWER: Set 8Direction vector Y to (dist-30)×sin(ang)×2

    ----+ System: Every tick

    -----> PLAYER_MASK: Set position to (PLAYER_BASE.X, PLAYER_BASE.Y - 20)

    ----+ System: Every tick

    -----> FOLLOWER_MASK: Set position to (SPR_FOLLOWER.X, SPR_FOLLOWER.Y - 20)

    [follower]

    ----+ Keyboard: ↑ is down

    --------+ Keyboard: [X] ↓ is down

    ---------> FOLLOWER_MASK: Set Walking to True

    --------+ Keyboard: [X] ← is down

    --------+ Keyboard: [X] → is down

    ---------> FOLLOWER_MASK: Set Direction to "Up"

    ----+ Keyboard: ↓ is down

    --------+ Keyboard: [X] ↑ is down

    ---------> FOLLOWER_MASK: Set Walking to True

    --------+ Keyboard: [X] ← is down

    --------+ Keyboard: [X] → is down

    ---------> FOLLOWER_MASK: Set Direction to "Down"

    ----+ Keyboard: → is down

    --------+ Keyboard: [X] ← is down

    ---------> FOLLOWER_MASK: Set Walking to True

    --------+ Keyboard: [X] ↓ is down

    --------+ Keyboard: [X] ↑ is down

    ---------> FOLLOWER_MASK: Set Direction to "Right"

    ----+ Keyboard: ← is down

    --------+ Keyboard: [X] → is down

    ---------> FOLLOWER_MASK: Set Walking to True

    --------+ Keyboard: [X] ↓ is down

    --------+ Keyboard: [X] ↑ is down

    ---------> FOLLOWER_MASK: Set Direction to "Left"

    ----+ PLAYER_MASK: [X] Is Attacking

    --------+ PLAYER_MASK: Is Walking

    ---------> FOLLOWER_MASK: Set animation to "Walk_" & Self.Direction (play from beginning)

    --------+ PLAYER_MASK: [X] Is Walking

    ---------> FOLLOWER_MASK: Set animation to "Idle_" & Self.Direction (play from beginning)

    [general]

    ----+ Keyboard: [X] ↑ is down

    ----+ Keyboard: [X] ↓ is down

    ----+ Keyboard: [X] → is down

    ----+ Keyboard: [X] ← is down

    -----> PLAYER_MASK: Set Walking to False

    -----> FOLLOWER_MASK: Set Walking to False

  • CloudDealer Please see the link I posted, you need to properly load JSON into the array.

    I just did it, I'm completely lost. I'll try to recreate the problem in another smaller project. Just a warning, there's a hell of a lot to it and it'll probably take a while to figure out.

  • Tried this, it didn't work and just resulted in the text showing "-1"

  • Thanks, I'll try this now. Also, yes I have done the json thing, thank you for that too either way!

  • I'm trying to create an inventory system with an inspect option. I'd like the inspect option to show the values and description of the item I've selected based on an array. I'd also like the array to set values.

    If anyone has any tips or ideas, please let me know.

    Tagged:

  • I was trying to fit a tutorial to my custom inventory system, and I can't seem to figure it out. I want the name of the item to call from the JSON file, whilst also calling the ID of the item(?)

    Tutorial I was going off of: construct.net/en/tutorials/building-rpg-style-inventory-2499

    // DISCLAIMER: THE PROJECT IS VERY LARGE, I HAVE CLOSED TABS SO YOU CAN ONLY SEE THE IMPORTANT STUFF.

    Link to project: drive.google.com/file/d/1nbb5V9qae1KNK8ux9OMe5swP-IkY2PD7/view

    youtube.com/watch

  • Development Log #2

    I'm creating and designing an Action Horror RPG called "Altered Reality.", this is a very large project, and is also my first genuine project using construct. I have a planned release of the first chapter of the game two years from now.

    So I finally figured out how to do some UID picking with some help from the forums. I'm super thankful to those who helped, and it means a lot.

    I've worked on a basic saving and loading system using construct's built in save and load. It works fantastically, and I'll be continuing to use it in the future.

    I completely re-did the menu, but I won't be showing you that since I'd like that to be a surprise until release.

    <End Log>

  • To simplify that you could have an instance variable on 'item' and pick the item that matches the global variable, then set position to item.

    Awesome thanks! I still need some advice on what I should do to add items to my inventory.

    I'd like it to add an item to the inventory based on a dialogue function being called.

  • If you have any tutorials, or general advice, please respond!

    I have a feeling I'll need to use arrays-

    ALSO, if you guys know how to simplify this code, please lemme know.

  • I'm confused on how to do the between?

  • Check the layers?

  • From what I know, you'll have to use a third party app to do so, I don't think it's built into construct 3

  • this is how i did it in my game