Domino3057's Recent Forum Activity

  • Thanks for the replies. I finally found it. I actually had to RMB on an actual subevent and then scroll in the dropdown to an "add" option which then game me another dropdown menu that included the local variable. I got it working now though!

  • The Docs say this: "right-click on an event, another variable, or an empty space in the event sheet, and select Add global variable or Add local variable."

    When RMB on the event sheet I only get the add Global variable option. No local options, I know this is a dumb question, but, I just don't see it? I tried creating a group and then doing this as well to see if I needed to define a local space first, but it's still the same result....

    By the way I own the personal license so I know it can't be that I am limited by the free version. Thanks for the help in advance.

  • Ah, I needed to set up a variable to turn off the left direction and turn on the right. That makes sense, thanks!

  • I was originally using the sine function, but I want to have more control over the NPC. Essentially I'll be setting up horizontal lines or rows across my map and have enemies spawn on different rows. Each row will have a different movement pattern. So I started, exploring the 8 direction with simulate movements. Unfortunately, this behavior isn't working as I expected. I attached the CAPx. Right now I want the 8 direction to move left until it collides with an object and then reverse. Simple enough right? But for whatever reason, it hits the object, bounces a bit the continues left. Anyone know which rookie mistake I have used on this one? Maybe there are other methods of doing this? Thanks!

  • For anyone interested or for future reference, I think I have found a solution.

    I needed to be able to do this:

    Touch and release > Spawn ONLY one object

    Touch and hold > Spawn several objects until touch is released

    -------------------------------------------------------------------------------------------------

    I solved it with a global variable. Here is the simplified version:

    Create Global variable: "Shoot"

    If "Shoot" = 0, "on any touch start" Spawn object

    System Wait 0.2 seconds set "Shoot" = 1

    If "Shoot" = 1, Is in touch Spawn object

    On any End touch, Set "Shoot" = 0

  • The iPad has a feature where if you "touch" anything such as text, it treats it as a single click. However, if you hold your "touch" it offers a new option to copy. I want to utilize this feature in a different way.

    Touch and release > Spawn ONLY one object

    Touch and hold > Spawn several objects until touch is released.

    Anyone now how to use this? Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • codah I didn't even consider decimals were being called as well. Thanks for clearing that up.

    Both of these options work great. At least for this part in my code the "choose" expression actually runs smoother. Thanks so much for the multiple options to solve my issue.

    This is a great community, very helpful!

  • Wow, looks like that worked. Not sure why that would be required, guess I'll dig through the docs later. Thanks for the quick help though, Really appreciate it!

  • I have an instanced object with a variable called "salvo" that I want to change at random up to the number 3 (possibly even more in the future) every time a new object is spawned. I set up this test to see if the variable is changing but it stays constant when I use the "random(3)". Strangely enough if I hard code it to say >set salvo to 1 on the next object spawned it will work. Is there a reason my "random" code won't work for this? Am I missing something? Thanks in advance for the help! File is attached:

  • Ah I see, Thanks! I didn't even think about splitting the formula over 2 lines. I was trying to write the entire expression in one line of commands. I really appreciate it. This will help me solve another issue I have as well.

  • Most of the expressions I have completed so far have been trial and error or lucky guesses based on my limited knowledge. I can't seem to figure this one out though. I have attached a CAPx of this problem to the post.

    I have an object (Hero) that is pinned to another object (Anchor). Currently Hero unpins and moves to the right of the anchor 50 pixels whenever you click/touch the screen. Super simple.

    Is in Touch > Hero> Set position (Anchor.X +50 , Anchor.Y + 0)

    I only want the hero to move 50 pixels in X. But I'd like it to move in a negative or positive 50 pixels based on where the mouse clicks. Mouse clicks anywhere to the left of the anchor, Hero goes left 50 pixels. Click anywhere to the right, Hero moves right 50 pixels. Obviously, my current setup only allows a +50 in X, regardless of mouse position. I have tried a lot of different setups, but have failed miserably.

    Can any of you more experienced people help me figure this out? I'm sure it's really easy, but my expression skills are lacking! Thanks!!

  • Attached is my current project file. The movement of the ball works like a catapult. You pull back and then let go and the ball launches. I want the user to be able to continuously do this action to traverse around the zone. So I set up an anchor point that follows the ball via distance joint. When the user touches the screen the anchor is frozen and the ball is pulled back off the anchor point to relaunch at any time. So far, it works fairly well. My problem is, it only works using the "in touch function" I only want this action to occur when you touch the ball. When I change the "Is in Touch" to "Is Touching Object" my entire setup breaks. I think I just have my mechanics disordered or something. I am a novice at all of this and what I have so far is hacked together. Maybe someone can help me decipher where I went wrong. Thanks!

Domino3057's avatar

Domino3057

Member since 16 Jun, 2012

None one is following Domino3057 yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies