jeffige's Forum Posts

  • Hey TiAm

    Thanks for the reply

    Yes, there will be 4 - turrets per layout(lvl). I have them firing but they each fire at the same rate. I think i seen a tutorial that uses variables with a reverse heath meter( timer).

    I'll post a capx when i get home.

  • If you'd like (can), upload your project to dropbox where i can download it and i'll have a go at it. Just tell me what version you'd like to revert to.

  • I don't think you're able to.

    Each new version has updates the older versions do not. Even if you're not using them in your layout or event sheet(s), the C2 code is embedded in the blank layout(s) & event sheet(s).

    At least that's the way I see it.

  • Take a look at this post. It's a little dated but may help.

    https://www.scirra.com/forum/center-text_t68925

    Also, text may display in the center of the TEXT BOX, if that's what you're using. If you're using a any other method, text as a sprite or BG image, the size of that image will effect the placement. i.e: if your window is, say, 960, 480 and your image is 113, it won't center due to the fact 113 can't be evenly dived into 960, 480.

    Hope this helps.

  • If I have 5 different turrets on 1 layout, how do i get each turret to have a different fire rate?

    i.e: Pause each different Turret from firing

    TURRET 1 shoots every 1/2 second, fires 3 times then waits 1/2 second

    TURRET 2 shoots every 1 second, fires 5 times then waits 1 second.

    So on & so on.

    I've been trying for a few days to get this to work. I can get the turrets to fire at different rates but the problems I'm having is:

    1) The Turrets rotate toward player even with a Rotate disabled action.

    2) I can't get the turrets to pause their firing individually since they are controlled by events/actions.

    I was thinking i may have to add instance variables to each turret, but i don't know enough about variables to implement this logic. Even after reading tutorials/ manual and posts on the subject.

    Can anyone help with this dilemma? This is the last of my major hurdles for the game mechanics.

  • Just taking a quick look at it, you have different behaviors: You have Bound to layout & Platform.

    Game example has: Bound to layout & 8 Direction.

    Also, check ALL OF THE EVENTS & ACTIONS. You have omitted a few EVENTS & ACTIONS. *Lines 71, 72*

    If you're going to try and duplicate an example, be sure to copy all of the: object behaviors, variables (if any), Origins/imagepoints, AND the EXACT Events & Actions as they are in the example

    1st

    .

    Test to make sure everything is working correctly. Then change 1 or 2 things at a time. Testing after every change.

    I copied 1 example and it took me 3 days to figure out i had 1 origin point out of place.

    Hope this helps.

  • Post a capx. Upload to dropbox as a single file. Link URL to your file you uploaded to dropbox.

    This way we can better help you

  • Try and turn collisions off for pattern

  • What about using the "Pin" behavior?

  • Hey thanks for the replies.

    I guess i did provide too little information, usually i'm too in-depth.

    The game is set in dungeons. The player must traverse deadly traps to get out. One of the traps are spears that fire off from "TUBES" if/when the player is within a set distance away of each separate tube. The spears WILL CONTINUE to fire if the player is within the LOS and stop if he isn't.

    My problem is that there will be several of these traps scattered around the layout(s). I'd like to get them to each fire at different intervals.

    One location may Fire 3 spears at 0.5 intervals.

    Another location Fires 1 spear every 0.7 secs.

    And yet another Fires 5 spears at 1.2 sec intervals.

    Using mordiaky's example, wouldn't the "spear traps" all fire at the same rhythm throughout the layout(s)?

    *EDIT*

    I tried adding "turret behavior to "Tube1" which will actually spawn the spears and changing the rate of fire, but I'd have to add separate EVENTS for each of the tubes. And RANDOM wouldn't work because then each TUBE would choose RANDOM fire rates.

    https://www.dropbox.com/s/k5l89c3ulmnhbcy/MyGame_2.capx?dl=0

    Again, thank you for the replies.

  • I figured out an earlier post but now I have a new dilemma.

    I want to fire off 3 or 4 spears in 0.5 seconds then wait 1.5 secs to fire another group.

    Can someone point me to a tutorial or explain how i can make this work?

    I've tried using a LOOP, System Wait, and adding 3 separate actions but they don't work. It only fires off spears every 0.5 secs.

    Thanks for any help.

  • Hey thanks for the reply.

    I figured it out after a while. I had to "clear obstacles" from LOS

  • In my game i have spears that should be created when the player gets within X amount of pixels away but i can't seem to figure out how to get them spawned.

    The spears should spawn at TUBE1 & destroy on collision with TUBE2 or the player. I've tried using LOS on the tube1 and the spear, neither work. Possibly due to the fact there are SOLID block between them, I don't know. I've also tried using "is on screen" with tube1 to spawn the spear but no luck.

    How can i spawn the spear if the player gets X amount of distance away and there are solids between them and the spear?

    Thanks for any help

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • On start of layout i have scale set to zoom by 2, then after an event i scale back to normal.

    How can i scale back the layout smoothly without it "snapping" to normal?

    Thanks for any help.