ErikSwahn's Recent Forum Activity

  • Sorry I work in C2.

    Could you perhaps take a screenshot on what you did?

  • Ah I get it. This will for sure work with my little system. I am not used to loops though. Can you suggest a way to structure it for me so I know how it should look? An image would be enough.

    Thanks!

  • I have a family called "ItemSlot" with a variable called "ItemSlotNumber". I have placed 6 ItemSlots in my layout, each having a unique number in the ItemSlotNumber variable.

    (1,2,3,4,5,6)

    I also have a global variable called SelectedItemSlot and a sprite called SelectSprite

    If ItemSlot.ItemSlotNumber=SelectedItemSlot

    Every tick, set SelectSprite X to ItemSlot.ImagePointX(0)

    On Left Arrow Key Pressed, subract 1 to SelectedItemSlot

    On Right Arrow Key Pressed, add 1 to SelectedItemSlot

    However. If an ItemSlot is empty, I want the next non empty slot to be selected if pressing left or right. It must be able to skip several slots if required. Is there a smart way to do this without having to brute force every possible scenario through events? Note that I do not want to implement an array this late in the game's development.

  • That was it. Thanks!

  • I have a family called "characters", with a family variable called "ready". When ready is 0, characters stay still and when ready is 1 they start moving.

    I want characters to start moving when they are on screen, and stop when they are not.

    For each characters

    -sub event: is not on screen = set ready 0

    -sub event: trigger once

    For each characters

    -sub event: is on screen = set ready 1

    -sub event: trigger once

    If 3 enemies are on screen, only 2 of them start moving. Why?

  • You do not have permission to view this post

  • The player can kill enemies to get xp. The problem is that if 2 enemies die at the same time it only gives xp for one of them.

    For example: The enemy gives 2 xp if it dies and the player´s arrow hit 2 enemies at the same time which should give the player 4 xp in total, only 2 xp is given.

    Can I make this work with a "for each" loop? And if so could someone put together a foolproof example in the event sheet and screenshot it for me?

  • I noticed after publishing my game on sites that it runs differently for different users. I exported and uploaded the game as html. One person seem to get all texts in black instead of white and some colors/filters don't seem to be on at all or just not displayed right. I do use effects on layouts and objects in my game like "set color" or "exposure" and such.

    Is there any known solutions for this? Have people experienced this before?

  • Thanks! Although "on created" and "on start of layout" seems to trigger when loading...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ah okay, so using trigger once below other conditions in the event is fine? It's only having a single trigger once function that ruins it? If so it should not be so much to change.

  • Seems there is no real solution other than rework the code, in some places im not sure how to do it since ”on created” also seems to trigger again. Is there a better way to save a game? What about json?

  • I see, thanks for the reply!

ErikSwahn's avatar

ErikSwahn

Member since 15 Jul, 2014

Twitter
ErikSwahn has 1 followers

Trophy Case

  • 12-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

14/44
How to earn trophies