Smileh's Recent Forum Activity

  • OMG I DID IT. I can't believe it. Never felt so proud. Guess I'm starting to be less retarded.

  • So I also managed to make each Lever to work individually but now comes the tricky part.

    I want that each lever works with one specific gate. I'm guessing I have to use some variables to make this work but I have no idea which path I need to take.

    This is what I have so far:

    Now each lever works individually but I need to attach each lever to a gate.

  • You need an Else in event 30 to stop both actions running.

    God bless you.

  • Im trying an even easier thing using just 2 frames. Still can't get it to work. Is this really wrong?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello.

    First of all excuse me for most of my questions but I'm a total beginner.

    I'm trying to make a lever to open doors but I'm running into some issues trying to figure out how to pull off the animtion because I was thinkin about On animation finished and On Key pressed, and can't use both for the same event.

    I want the following: When player overlaps lever and presses action key, activates lever.

    Basically I have two animations. The default and the Go or Swap animation. The default is on one position, whenever player presses "Action Key" set animation to Swap and the lever goes to the other position.

    Now, if I press "Action Key" again, it feels like you switch the lever twice because if goes to the original spot and does the animation again. I want to be able to go back and fourth so when I press Action Key again the animation plays backwards.

    Any tips? I was thinking just to create two animations but feels like I run ito the same problems with the triggering since I need both Key Pressed and On Finished. Right?

  • I see someone have already mentioned of using the easier particles system already. but if in case that you have lots of waterfalls (implying tons of particle instances on screen, your game's framerate might drop to a crawl especially if this is on the weaker mobile devices.

    If you don't need to optimize, stop reading. But if you do need to optimize, this is another method that uses far fewer instances although also more complicated:

    You can have animated Tiles via event sheet using layer switching method:

    What you need is to create multiple Tiles with respect to number of frames you have. (ex. waterfall_1, waterfall_2 up to waterfall_n, where n is total number of animation frames you have) Put all of these in an unused layout.

    Then, in the layout, create number of layers with respect to total number of waterfall frames you have (ex. "waterfall_layer1", "waterfall_layer2" up to "waterfall_layerX")

    Now, create waterfall_1 at where you want these waterfalls to be on layer "waterfall_layer1".

    Now, on start of layout event, you check through all waterfall_1 Tiles using For Each loop, and do the following:

    - create waterfall_2 tile on layer "waterfall_layer2"

    - create waterfall_3 tile on layer "waterfall_layer3"

    ...

    ...

    (do this up to the last waterfall tile and last layer)

    Now, create 2 global variables called "waterfallstep" and "modwaterfallstep" and set them to 0 and create another global variable called "totalnumberofwaterfallframes" and set it to the number of total animating frames you have for your waterfall.

    Now, create "every 0.1 sec." event , where u will increment waterfallstep by 1 and set modwaterfallstep using this formula:

    modwaterfallstep = waterfallstep % totalnumberofwaterfallframes

    Because of the % modulo operator, this formula will only yield increasing number from 0 to number of waterfall frames you have and then the increasing number will be thrown back to 0 thanks to % modulo operator.

    Now, after the action above, you use for loop i = 1 to totalnumberofwaterfallframes. In this loop, you do this:

    if (i = modwaterfallstep), set layer "waterfall_layer" + i to be visible.

    Else set layer "waterfall_layer" + i to be invisible.

    This means, in "every 0.1 sec" event, the event sheet will go through all of your waterfall layers and will make the only one unique layer that is equal to modwaterfallstep to be visible, while all other layers are turned invisible.

    This will give you the impression of animating tiles. It is a lot more work and hectic, but you can waterfall as long as you like without affecting performance (unlike using particles). All of these waterfall tiles are also not iterated through in every tick (unlike particles as well). Therefore, there won't be much of any performance cost here at all.

    Thank you I will try it out whenever I have some time

  • Hi. So I'm making my very first game and project and I ran into a problem.

    I don't know how can I achieve this "waterfall" effect without duplicating my 16x16 animated sprite in order to achieve the water movement effect. Ideal would be to use a tiledbackground but those can't have frames to swap and create an animation.

    I know by using my logic repeating a sprite like 10 times per animation, would be like a 100 sprites duplicated per layout. I'm sure I will run into problems with that.

    Is there any way to achieve the same effect? I tried the Scroll plugin by Somebody but I don't thin that works here.

    Here's my game and what I mean:

  • Found out something weird... I used a set frame before the animation and I set frame 5 (my animatio only has 4 frames for default and 3 for the explosion one). Don't know why, but now it displays the animation.

    If I set the frame to an existing frame, it doesnt work. I have to make up a fake frame in order to work.

    Someone could explain this?

  • Hi.

    I'm trying to make an explosion to a bullet whenever it hits with a wall (Solid Tilemap in my case).

    I really don't understand why but the bullet never changes animation. I can do everything I want. Stop timescale, disable, etc etc but it jut won't change animation.

    Is this supposed to be this way on C2? Or am I doing something wrong?

    Only event not showing is the turret spawning bullet, nothing important.

    Tried with collision, overlapping, overlapping offset. None works for the animation but they do for everything else.

  • So I tried whay you said and made no difference. The enemy behaves the same way.

  • Because event 35 - 38 are subs under 'is sight', 'it' can only change direction when 'it' sees Player.

    On the moment 'it' can't see Player, 'it' keeps moving in the direction that it was allready moving. 'it' just cant change direction.

    Bring those events outside the 'is sight'.

    Also, the animation changes to 'sleep' when 'it" is not seeing the player. But there is no action that makes 'it' actual sleep', if sleep = also stop moving.

    Thanks will test tomorrow.

    Btw it does stop moving and goes to sleep

  • Hello

    I'm trying to make the AI for one of my enemies. Basically is sleeping and whenever the player is on sight starts moving either left or right. Once the player is out of sight goes back to sleep.

    Now, if the enemy runs into a wall turns around in the opposite direction so if he's facing away from me and losses sight, whenever I get close, he keeps walking in the opposite direction that was called by the wall event to turn around so it feels like I'm chasing him.

    I've been trying for hours different events to make him come towars the player when he wakes up rather that keep going in the direction called by the wall event.

    Here's the code:

Smileh's avatar

Smileh

Member since 22 Jul, 2015

None one is following Smileh yet!

Connect with Smileh

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies