puzzele's Forum Posts

  • I'm a total novice. I'm using Construct 2. If anybody could possibly answer this question, or better yet, provide me with a sample that I can load in Construct 2, I would be most appreciative.

    1. I'd like the program to ask the user what todays date is. (I found it tooooo confusing for me to use plugins to determine the date)... so merely asking the user to input the date themself seems like the easiest solution.

    2. After the user inputs todays date, I would like the program to calculate the number of DAYS since 11/15/2023. <-- Yes.. the number of days from the EXACT date of 11/15/2023.

    Does anybody know of an EASY way to do this with no plugins?

    MORE DETAILS PROBABLY NOT NEEDED:

    I'm trying to create a program that will calculate interest at 4.75% starting from the date 11/15/23 starting with the principal amount of $1. I do NOT want to use plugins... just something super simple. But i want the program to show the compounding interest every second forever... kind of like a ticker that ticks up every SECOND showing how much I make every second in interest at 4.75%

    I'm NOT sure how to do this.. but I think if I can get the first part solved (tell me the exact number of days from 11/25/2023 after the user manually inputs todays date), perhaps I can hopefully figure out the rest.

  • Hi... I saw the particles demo presented on the main page, here:

    https://www.scirra.com/labs/particlesdemo2/

    I was just curious if there is a Capx file for this game.. I'd love to see how it was done.. but didn't see it in the tutorials section.

    Thanks in advance.

  • Lordshiva1948: thank you greatly for the above demo. I am absolutely not being sarcastic. I was struggling trying to figure out how to work the scoring with the text combined and you're very simple demo showed me in a matter of seconds. Thanks again.

    I just noticed you evidently created a number of different tutorials. I will definitely be checking them out. If you made those tutorials as simple and clear I will be absolutely thrilled. I am a novice and am struggling trying to figure this stuff out. Thanks again very much.

    PS: I'm not sure if you made any yet since I haven't gone through all your tutorials yet, but VIDEO tutorials are GREAT for novices like me.. I can see & HEAR why you are doing what you are doing and I don't necessary have to be planted in front of my computer at the time to watch it..... just a thought. Many thanks again.

  • I have an event that says:

    system - every 3 seconds: create object from image point 1 of another object of both X & Y. Here is the command:

    Snowman1.ImagePointX(1)

    Snowman1.ImagePointY(1)

    (screenshot attached)

    I'd like the game to instead RANDOMLY select different image points to create the object from. Any idea how to do this?

    I was thinking maybe it is something like:

    Snowman1.ImagePointX(1,2) <-- telling it to pick 1 or 2 of the image points but that doesn't work.

    let me try and explain what I am attempting to do: I have a snowman. The snowman has two hands. The left hand is image point 1 and the right hand is image point 2. I would like to computer randomly pick either the left hand with the right hand and then throw the ball. The problem is, I seem to be required to pick only one of the image points. Any ideas?

    PS: When I try and add the attachment, I get the following error on this forum (just figured I'd mention it):

    General Error

    SQL ERROR [ mssqlnative ]

    SQLSTATE: 22003 code: 8115 message: [Microsoft][SQL Server Native Client 11.0][SQL Server]Arithmetic overflow error converting expression to data type int. SQLSTATE: 01000 code: 3621 message: [Microsoft][SQL Server Native Client 11.0][SQL Server]The statement has been terminated. [3621]

    An SQL error occurred while fetching this page. Please contact the Board Administrator if this problem persists.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'd like my character go move up/down using a sine ONE time... I do NOT want it to constantly go up/down all the time. Instead, I will set particular times for the character to pop up/go down ONE time..

    Anybody know how to set it so that I can have the sine (vertical) only work ONE time and then automatically stop/pause in place?

  • What exactly is the difference between "window size" and "layout size?"

    I generally just have both of them to be exactly the same: 640 by 480. I never figured out what the difference was between the two and I never really found a need to care. My crappy games seemed to work fine on various computers, and also on tablets after being downloaded from Amazon. I also always set the margins to 0,0 since I never figured out a use to have margins anyway. As you can tell, I am definitely a novice and don't really have a clue what the heck I am doing.

    The only real reason I'm asking now is because I am trying to have the screen shake by using the "scroll to" effect. And evidently the only way to do that is to have the layout size larger than the window size. (I cannot use the 'unbounded scrolling' option enabled because it screws up the placement of my graphics -- I'm guessing because I generally have graphics float in/out of the screen).

    Without getting into the specifics and likely confusing me even more, could somebody simply let me know what the precise measurements should be generally when creating a game for tablets for both the "window size" and "layout size" so that I can easily use the 'shake' effect without complicating things terrible. I'm guessing the same measurements can be used pretty much all the time.

    Thank you greatly in advance.

  • well, I cannot believe it, but I may have possibly come up with a simple solution. I am attaching a screenshot. Basically,assuming I understand what the hell I did correctly, I put the image point in the center of the bottle. Generally, that is where it goes anyway.

    Then what I did is I told construct that if the balls X point is less than the X point of the bottle, then the bottle should fall over in one direction using physics force. In the alternative I told construct that if the balls X point is greater than the X point of the bottle, then the bottle should fall over in the other direction using physics force. Candidly, I'm not sure what I just said so let me show you a screenshot. It appears to be working.

  • your solution did prevent all of the other bottles from falling over. Thank you very much.

    However, it appears that I am again stuck creating different left and right Side sprites for each bottle. For example, in my game I have two identical bottles. I simply copied and pasted the bottle so they are identical. However, when I pinned the left side Sprite and right side Sprite on one of the bottles, it does not apply to all the bottles. I also tried to copy and paste the left side Sprite and right side Sprite onto the second bottle. However, all of those left side and right side sprites appear to all be linked to the single first bottle.

    Therefore, it looks like I am still trying to find a solution (or should I say a much simpler solution), to allow all of the bottles on the screen to fall left or right depending on where the ball hit it without having the necessity to create independent left and right sprites for each different bottle that I then am stuck pinning onto each independent bottle. Hopefully that makes a little sense.

  • PS: The only solution I have come up with so far is to create a left side Sprite and the right side Sprite and then pin those sprites onto the bottle object. Then what I do is I have a command that tells the computer to have the bottle fall left if the left side Sprite is hit and to fall right if the right side Sprite is hit. I also make both the left side Sprite in the right side Sprite invisible so that the person only really sees the bottle.

    The problem with this solution, however,is that once any bottle is hit, that causes every single bottle on the screen to be identically hit. Therefore, what this means is that I would be required to create a DIFFERENT left side Sprite and a right side Sprite for each and every single DIFFERENT bottle. that seems insane.

    I am hoping there is a far easier solution.

  • wow! Thank you for your very prompt response. That certainly answers my question. However, something still confuses me:

    I used that exact command that you suggested: choose(-55, 55)

    Oddly however, when the bottle is hit with the ball, the bottle does not always fall to the left or to the right. Sometimes, the bottle Barely moves at all to the left or to the right. It is almost like the computer thinks it is using the random command and not necessarily selecting -55 OR 55.

    Any idea what could be causing this issue? Again, I absolutely used the command you suggested: choose(-55, 55) for the "apply physics Force" for the "force X". I intentionally left the force for Y at zero.

    Any ideas?

    PS: I changed the choose(-55, 55) instead just to a single number and once I changed it to a single number, the bottle fell over every single instance without exception. However, once I returned back to using that choose command, it seems that the computer would get confused and randomly barely move the bottle at all. Therefore, perhaps, that choose command might not be working properly?

  • I am creating a game where a small bottle is hit by a ball. I would like to have the game cause the bottle to fall to the left if the ball hits the bottle on the right-hand side.

    Likewise, I would like to have the game cause the Bottle to fall to the right if the ball hits the bottle on the left-hand side.

    I cannot seem to figure out how to do this. Basically, the bottle is a single object. The best I could do is is cause a physics force when the bottle is hit. I likewise can have the game create a random physics force when the ball hits the bottle. I accomplish this by having construct look for the following event:

    Ball is overlapping bottle <-- but I cannot figure out how to have the computer determine if the ball is overlapping the left side of the bottle or the right side of the bottle. Again, the bottle is a single object.

    However, I cannot figure out how to instruct the game to apply a different physics force depending on whether the bottle was hit either on the left side or the right side.

    Anybody have any simple ideas how to do this? Thank you in advance.

  • When a particular action happens in my game, I want the computer to randomly select either -50 or 50. However, I do not want the computer to select any figures between -50 and 50.

    I know that to allow the computer to randomly select any number between -50 or 50 I would use the following command: random(-50,50)

    However, in this particular instance, I only want the computer to randomly pick either -50 or 50. How exactly do I do that?

    Thank you in advance

  • Math!? Oh boy... There goes that idea. Every single time I look at the tutorials with ANY math I just skip it... I'm a bit of a dummy.

    O well... if anybody figures out an alternative EASY way to create the same effect, please do let me know... Hmm.... I know... what if I create an animated .gif of the bottle falling over..and then after the animated gif finishes its animation, then the gravity kicks in and it actually falls down? That might work... of course, I suck with animated .gifs but you get the idea.

    Anybody have any better ideas that requires ZERO math for a novice like me? Many thanks.

  • I'm make a game where you throw the ball directly in front of you... so the ball gets smaller and smaller as it goes into the distance.

    Then.. the ball will hit an object in the distance and knock the object over. However, I'm trying to figure out how to get the object to fall down by getting hit in the front.. basically, I want the bottle to not just fall over to the side/gravity, but would like it to be hit in the front and then fall backwards (hopefully I'm explaining it properly).

    By way of example.. if the ball hit the bottle from front, the bottle would fall backwards where you might basically see the bottom of the bottom as the top of the bottle falls backwards.

    Any help/guidance would be greatly appreciated. Thanks in advance.

  • Nesteris: Thank you GREATLY for your reply. Yes... you are right!! I wasn't entirely sure precisely what you meant so I imported the sound as BOTH an "ogg" AND a "wav" file into Construct 2. Even though that seemed like an overkill, I did that.

    And you know what.. I just tried the game in Internet Explorer and NOW it plays all the sounds perfectly. Thank you GREATLY.