Yann's Recent Forum Activity

  • Well the meaning of the variable in my example is not the same as the meaning you want to put in it.

    My variable "mode" meant to differenciate phases in cyclic events (I could have called it "phase" instead of mode then)

    You on the contrary want to make something evolve.

    So, along with the mode (or phase if you want to rename it) variable, you need another one which will carry the meaning of "difficulty"

    Then you can, as Kyat suggested, use this variable to increase the time of each wave like

    atkDuration = 30 + 10*difficulty

    30 would be the starting point

    10 would be the increment of each difficulty mode (if you increment it one by one)

  • if you use Physics you can get the speed of an object like that

    distance(0,0,Sprite.Physics.VelocityX,Sprite.Physics.VelocityY)
  • r0j0 did that a while ago.. might answer your question

    r0j0_8dir.capx

  • consolStuff.capx

    doesn't handle text horizontal overflow (might want to add character clamping maybe...)

    but scrolling works nicely

  • The syntaxe I used to write the code above is what I found mimic c2 event sheet the closest.

    +Object: Condition
      ->Object: Action

    I use "+" for condition and "[indentation] ->" for action

    When I indent condition block it means they are nested

    +Object: condition
      +Object: nested condition
        ->Object: action

    The code I posted above is at beginner level (if you except the use of dt which is just a tad more advanced... maybe)

    as dt is the time between two tick of the game, the 'Timer' variable will just count time.

    Anyway, if you don't understand the code above, you need to follow some tutorial and read the manual.

  • Basically you want a wave system.

    You just have to know in which phase you are and then activate the right mode of your game

    Global Variable mode=0   //0 = spawn every 3 seconds, 1 = killing time, 2=pausing time
    Global Variable Timer=0  // to keep track of time
    Global Variable atkDuration= 30  // number of second zombies will spawn
    Global Variable pauseDuration= 5 // number of second before the next wave
    +System: Every tick
      -> System: Add dt to Timer
    +System: mode = 0 
      + System: Every 3 seconds
        -> System: Create Zombie
      + System: Timer > atkDuration
        -> System: set mode to 1 
    +System: mode = 1
      + System: Zombie.count = 0
        -> System: set mode to 2
    +System: mode = 2
      + System: Timer > pauseDuration
        -> System: set mode to 0

    That's all folks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • you should add a Text box on your layout where the player will enter his name, and on click on the validation button, you will send an Ajax request that will look like :

    -> Ajax: Request "http://yourURL/post.php?name="&Textbox.text&"&score="&score (tag "sendScore")
  • Ah ninja Vercingetorix.

    Well, I have made quite a few other change.

    Note that you don't have to duplicate action anymmore for your Wolf or Normal mode. It's all handled in a global variable (can be an instance variable if you want too, it's programming design choice)

    Also I prefer to use a boolean to check if you are attacking. It's the same idea as Vercingetorix but I like booleans (programming design choice too).

    And using a boolean can also help on Vercingetorix's "related note" I guess

    Also drxbellini you should be carefull about your platform collision. I'll explain it to you with ASCII art now

    If your colision are like that   \______/   you will get stuck when you are against the platform and try to jump.

    So I modified the polygon to be more like |_____|

    Actually I even at little tiny unperceptibly pushed a bit toward /___\ just because there's no alignement system for collision point yet so I wasn't 100% sure they were vertical.

    Here is the capx

    beliniPlatformer.capx

  • That's a known issue when using webGl renderer.

    As far as I know, there's two work around :

    1. Disable webGl (but webGl is way faster than the base canvas renderer)

    2. Paste your text on a Canvas object (it's a third party plugin so you'll have to look in the proper forum section) which is in the proper layer and hide the text object.

  • The best way to do that kind of thing is texture scrolling. This method is used in some 3D game to fake conveyor belt, waterfall, and stuff like that.

    And it's should be possible with a modified tiledbg plugin. But I prefer to wait for the official tiledbg plugin to evolve. I think a fork in plugins is too messy.

    So maybe it can be a suggestion for Ash.

  • well

    right("00"&seconds,2)

    works fine (:

Yann's avatar

Yann

Member since 31 Dec, 2010

Twitter
Yann has 5 followers

Connect with Yann