AllanR's Recent Forum Activity

  • Jirianne

    how much text is it? 100 characters? 1000? 1 million? Have you tried debug mode to see what the contents of the text object are? are there any weird formatting characters in the text?

    you could also try changing the wrapping on the text object to character instead of word. Also try making the text object even bigger...

  • the way I like to delay actions is to make a global variable to indicate that some kind of sequence is running - so that when the sequence is over, nothing is happening (other than checking if a sequence is running).

    and I use a variable "Delay" set to how long to wait. Every tick dt is subtracted from it, so when it gets down to zero, the next step can take place. that step then sets the length of the delay until the next step or marks the sequence as complete.

    that code creates 4 objects, two seconds apart, at an X of 0, 50, 100, 150.

    the first object gets created immediately because Delay starts at zero.

    EDIT: of course there are lots of other ways to achieve similar results: if you are using tweens to make something happen, you can advance the sequence when the tween ends, or if you have a sequence of animations, you can advance the sequence when the animation ends, etc...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • hmmm, it would never have occurred to me to put an else after a loop.

    I just tried it out, and it seems that the else always executes - either after a stop loop, or when the loop completes naturally.

    so, I don't think it will help you determine if nothing was selected in the loop - you will have to use a bool.

  • LoseBiene

    Multi touch get pretty tricky, and there is no way to know how many fingers a player may try to put on the screen, so it is best to track all touches and decide what each one is allowed to do.

    I like to create a sprite called TouchPoint that has all the instance variables I need to track the touch - where it started, where it is now, where it just was, how long it has been in touch, etc...

    I made two global variables: PlayerTouchPoint and GunTouchPoint to lock control of the player and firing the gun to one TouchPoint instance. That way, if the player isn't watching where their finger is, the same touch will keep doing what the player wants it to do.

    so, this will work with any number of touches starting and stopping, but only one at a time can control player movement, and firing the gun.

    https://www.rieperts.com/games/forum/touchinput.capx

    NOTE: I always have a HUD layer and put the TouchPoints on that layer so that any scrolling of the layout doesn't interfere with tracking how much the player's finger has moved.

  • N0M4D

    the problem is that both blocks of code will run.

    in the first block you check if Enter has been pressed, then set paused to true.

    the next block checks if Enter has been pressed AND if paused is true (which it will be because you just set it to true) and then it will un-pause your game.

    You should use ELSE to make sure both blocks don't run.

    	EVENT: On Press Enter
    		> is paused - set paused false, set timescale 1
    		> ELSE - set paused true, set timescale 0
    

    then I would expect a global variable would work fine...

  • check out an old sample I made a couple years ago... it uses a mask to slowly show a sprite.

    https://www.rieperts.com/games/forum/MummyReveal.capx

  • do you mean the invisible part is always invisible? in the sprite editor you can set the alpha channel to 0 and paint the part of the sprite you want to be transparent...

    or do you mean you need to make part of a sprite that starts off visible suddenly become invisible?

    you could do that with an animation, unless you need the invisible part to move across the sprite... then blend modes is what you need, like jobel said. (you can make a mask sprite that only blends with part of your source sprite).

    if none of the above, then you will have to make an image to show us what you are trying to do.

  • tinbashingstudios - containers are a great way to do this.

    just for future reference here are some other options to remember:

    when you have a rocket selected, you could use "Pick Nearest" to get the instance of particles closest to that rocket.

    another option would be to use "Pick by Evaluate" and pick the particles where the PinnedUID equals the Rockets UID to make sure you get the right one.

    if you weren't using Pin, you could also add an instance variable to particles and store the rocket's UID in that.

  • Event 2 - On Start of Layout you check if energia EXISTS

    but event 1 - On energia GET you read the value

    both should be EXISTS, or GET. The way you have it, the GET will never get called.

    I don't see where you SET energia, so that could be a problem as well...

  • you could just write a new one over it...

    or delete that row out of the array and re-save the array in local storage.

    I updated my sample to do that - I also put in a Delete ALL for my testing purposes... be careful with that because there is no way to get stories back if you delete them!

    https://www.rieperts.com/games/forum/StoryList.capx

    I did add a little error checking - like making sure a story is selected before editing or deleting it. But there is no "Are you sure?" before anything gets deleted!

  • RanM

    images can't be stored in an Array or Dictionary. You could store the name of the image or animation name in the array and then use that to create an object by name, or set the animation.

  • OK! I just saw your other post, and looked at you card game...

    you are having trouble because of "Wait" issues.

    Wait ONLY suspends execution of actions and sub-events directly after and under the Wait command. The rest of the eventsheet does not wait. Sub-events at the same level as the one with the Wait command don't wait.

    so in your game, event 2 has two Wait 1 Second actions. Event 4 is at the same level as event 2 so it is not affected by the Waits. As soon as Construct sees the first wait in event 2, it suspends executing actions after that, and immediately moves on to event 4 and continues executing from there...

    Instead of using Wait, use variables to create flags that indicate when something is ready to happen.

AllanR's avatar

AllanR

Member since 21 Nov, 2013

Twitter
AllanR has 23 followers

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies