Guizmus's Recent Forum Activity

  • philx

    No, you cannot spawn something based on a variable name, I ran into the same problem.

    To my knowledge, there are 2 solutions, the first being the multi-animation method. Using the ReplaceObject tool, it may not be that long.

    The other solution though is quite fitting in your solution. In your case, you have a finite, small number of possible sprites. You can have your spawn function starting with 4 IF (a switch case structure), where you do exactly the same thing in the 4 cases, aka you spawn the correct sprite depending on the playerID you received. In those 4 cases, you then call another function, passing the newly spawned player UID as argument, and this function can select the object by UID, selecting it from the family. This is some kind of "casting" as a family if you catch my drift.

    Anyway, in case I wasn't clear, here is a capx demonstrating this.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey everybody !

    I'm currently working not on a game, but on a dialog module, made to be used in different projects.

    While making this, I make a tutorial on how to make such a module, how to think things for multiple uses, and how to implement it.

    The module works with the CSV plugin (only dependance), and let you prepare your content in excel. Implementation in a game is simple as it is made for it.

    The tutorial/module covers for now :

    • simple text output. All the actual display is handled in a function, so it can be used in whatever object you want.
    • multiple types of dialog. For now, speech mode (multiple sentences in order), random speech (randomly selected from a pool you make), multiple choices (3 choices, a cursor and simple input to go from the first to the other, with a callback for each choice)

    The next part will focus on implementation in a game, adding new features, and implementing ideas from the comments on this.

    I want to keep this mod alive and as versatile as possible, for me and others, capx being given and commented.

    That's all for now, no funny pictures in this topic, the mod isn't very graphical, but a live version is up in the tutorial :)

  • It may depend (I'm not sure) on the size of the sprite, the animation, ...

    Anyway, best way to know is to try both, and look in the debugger the difference in performance (CPU usage).

  • No, directly in C2, create an event going like this :

    System:Every Tick

    -- Browser : execute Javascript("var money_outside_C2 = "&money)

    This will eval the string you build in the Execute javascript parameter. Here, I declared a variable in the page context (window.money_outside_C2), that you can access through the webpage as you wish, and that is updated every tick.

    It would be better to do this not every tick, but when the money change of course. Also, you could execute something like "myClassWrittenInJavascript.update_money("&money&")", to trigger a custom function you made outside of C2.

    EDIT : ho, and if you had logged the globals instead of alerting it, you would have seen that you can access those by hand too, no need to eval in C2.

  • Hey !

    Welcome to C2 for a start ^^

    About your problem, don't forget C2 runs on javascript, and it will be the way to communicate with the webpage that hosts it. Specificaly, if you add the Browser object, you can use its expression "Execute javascript", that will execute the code you want. This is the way to send anything you like from your game to your webpage.

  • Yes you can. The Audio object has a "seekto" function that plays a sound starting from a time given, going back/forward from where you were in that sound.

    So get the exact timestamp of the start of part 2, and add a seekTo at the end of the song :)

  • Yttermayn thanks too. I learned a lot from what you explained. By the way, did you make a seed based random as a plugin, or using C2s functions ?

    Anyway, I looked into randomly generated dungeons some time before, but you explained it a lot better :)

  • Imchucho used the bullet behavior, witch also has a gravity property. The wind is only a subtraction from the power of the bullet so it's always facing the player in this implementation.

    If you use the physic object, you can apply a force to your object. In your case, the wind is just a constant force (or maybe you want it to vary too) to apply to your projectile. Only thing to change from what Imchucho did then would be to set a starting speed instead, and the gravity/force for the wind will do the trick.

  • If are certain you did put the new version online at the same place and under the same name, then it's a cache problem. Try to clear your cache or Ctrl+F5 to refresh it.

  • If your turret doesn't turn, then the turret behavior won't be usable as you like it.

    The solution you tried seems like the way to go. I would just add a timer behavior on your gun. Your events then become :

    • first event : same triggers, actions being "set reloading to 1, start timer (Gun_Reload_time), spawn bullet".
    • second event : the trigger becomes "on timer run out on the gun", set reloading to 1.
  • Would something like this do the trick ?

    I didn't put any evaluation every tick, just made a function to count with a local variable. P1 and P2 (particle spawners) have different rates, I display the respective count, and the total.

  • I don't know about anything like this, but you can use the scale property and a variable Z on your ball, that you update manually with a function simulating the Z value/the physic model. You could simplify this with some sin behavior though, it can be pretty close to the real model with some tweaking.

Guizmus's avatar

Guizmus

Member since 26 Mar, 2013

None one is following Guizmus yet!

Trophy Case

  • 11-Year Club
  • x4
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies