aquadijoib's Forum Posts

  • Magistross ,

    Thanks a lot! Using "Execute Javascript" works flawlessly!

  • Thanks for all the help so far!

    Maybe the error lies in the css that i tried to edit. So here is a small segment of what I changed (I only changed the .mdl-button--fab to #mdl-button--fab)

    #mdl-button--fab {
      border-radius: 50%;
      font-size: 24px;
      height: 56px;
      margin: auto;
      min-width: 56px;
      width: 56px;
      padding: 0;
      overflow: hidden;
      background: rgba(158,158,158, 0.20);
      box-shadow: 0 1px 1.5px 0 rgba(0, 0, 0, 0.12), 0 1px 1px 0 rgba(0, 0, 0, 0.24);
      position: relative;
      line-height: normal; }
      .mdl-button--fab .material-icons {
        position: absolute;
        top: 50%;
        left: 50%;
        -webkit-transform: translate(-12px, -12px);
                transform: translate(-12px, -12px);
        line-height: 24px;
        width: 24px; }
      .mdl-button--fab.mdl-button--mini-fab {
        height: 40px;
        min-width: 40px;
        width: 40px; }
      .mdl-button--fab .mdl-button__ripple-container {
        border-radius: 50%;
        -webkit-mask-image: -webkit-radial-gradient(circle, white, black); }
      .mdl-button--fab:active {
        box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
        background-color: rgba(158,158,158, 0.40); }
      .mdl-button--fab:focus:not(:active) {
        box-shadow: 0 0 8px rgba(0, 0, 0, 0.18), 0 8px 16px rgba(0, 0, 0, 0.36);
        background-color: rgba(158,158,158, 0.40); }
      .mdl-button--fab.mdl-button--colored {
        background: rgb(255,64,129);
        color: rgb(255,255,255); }
        .mdl-button--fab.mdl-button--colored:hover {
          background-color: rgb(255,64,129); }
        .mdl-button--fab.mdl-button--colored:focus:not(:active) {
          background-color: rgb(255,64,129); }
        .mdl-button--fab.mdl-button--colored:active {
          background-color: rgb(255,64,129); }
        .mdl-button--fab.mdl-button--colored .mdl-ripple {
          background: rgb(255,255,255); }[/code:2w0wjpdz]
    When I load the edited material.css in my project and set the id of a button to "mdl-button--fab" it changes the form of the button to a circle as it should but it
    doesn't have the colour that it should have. Also all the ripple effects that should come with the css do not appear.
    The file from Material Design contains some more files such as a material.js or a material.min.js file which I don't know the use of. Maybe those need to be implemented aswell?
    Editing the exported .html file hasn't worked yet either. I can't seem to find the buttons from my project in that file.
    @Magistross How would the "Execute Javascript" method work? Can you explain to me how you would do that?
    Thanks again for all the answers!
  • Thanks Elliott for your reply ,

    I'd like to try editing the html file to include the material css as an external stylesheet as you described. What would be the way to do that though?

    I have no idea where I would find the existing form elements and what I would have to change.

    Can someone give me a more detailed explanation on how that would be done?

    Any help is greatly appreciated! Thanks

  • dop2000 ,

    Thanks a lot for your answer!

    I've tried replacing the dots in the file with "#" and when I use the id of that in my project it almost works. The problem is that for example a floating action button lacks the color and ripple effect which should also be inside the css file.

    The file is also very large and a lot more complex so it is difficult for me to recreate what is shown in the tutorial.

    It would be cool if someone could show me how to get the material.css from this file fully working in Construct 2.

    Thanks again!

  • Hi,

    I'm currently trying to add CSS from Material Design Lite to my project.

    I have no idea if it's even possible with construct 2 to style buttons, list objects etc. with something like this. As I have no experience with this, I would like to know what approach would be best to do this.

    Any help is greatly appreciated!

    Thanks

  • 99Instances2Go,

    Thank you so much for the capx! I will have to look into it for a while to understand everything but I think it will help a lot.

    You even fixed some other issues I had with the collision box of the enemies, ...

    Thanks again!

  • Try to insert a whitespace somewhere in the URL You can post URL's when you have reached 500 Reputation.

  • You can get the time and date by inserting the Browser object in your project and using this expression: Browser.ExecJS("Date()") to return a string with the current date and time. The result looks like this:

    Sat Jan 28 2017 13:46:00 GMT+0100

    I don't exacly know how you could get the game running in the background. Although there is a Background mode plugin in the scirra store that I think serves this purpose.

    I hope this solves your problem!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've made an example capx where the first object is always pointing at the nearest second object:

    Example CAPX

    Try and drag the green box in the example around. It will always rotate towards the nearest blue box

    I hope this solves your problem

  • Here is an example capx on how it could be done with tiled backgrounds placed around the object:

    Example CAPX

    I hope this solves your problem

  • I wasn't able to download your capx but I made a quick example file on how it could work:

    Example CAPX

    I hope this solves your problem

  • Thanks for your detailed answers! 99Instances2Go

    I feel kind of dumb right now because I still can't get it to work properly. As you said, 1 bullet is destroying multiple enemies sometimes. I tried to create what you wrote in your last post:

    https://drive.google.com/open?id=0B7r2W ... U9UTi01TDQ

    This is what I had before (it destroys multiple enemies at once):

    https://drive.google.com/open?id=0B7r2W ... UxuQmdkRDQ

    What I tried to create from your explanation has some issues with invisible enemies.

    Here are some more screenshots of the events that could be a cause for this problem:

    This is for damaging the enemies with the bullets:

    https://drive.google.com/open?id=0B7r2W ... VpjbF95Z1k

    This destroys the bullet itself when it hits an enemy:

    https://drive.google.com/open?id=0B7r2W ... VpjbF95Z1k

    Maybe a capx of my project is a better way to find a solution <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile"> :

    Project CAPX

    It is a little messy <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green"> The Event Sheets where the problems are, are marked with "HERE". Also I left a comment on the exact events.

    Thanks for your patience! <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • I did it like this:

    --(condition) For each "map_enemy" & map_enemy.health <= 0

    ---- (action): "map_enemy" destroy

    ____-- (subevent) For each "iso_enemy" & iso_enemy.id = map_enemy.id

    ____---- (action) "iso_enemy" destroy

    When I understand correctly you wanted me to put the "Pick by comparison" in the place of map_enemy.health <= 0 right? I think this is the same though.

  • Well..

    I tried using the "Pick object by comparison" and "For each" now and it seems to work the same as with the "compare variable" condition I just used for this.

    I guess there is multiple ways to do this

    Thanks again!

  • First of all thank you all for your answers!

    I've now replaced every "Pick" Condition with a "For each" loop as 99Instances2Go suggested. After that there was a slight improvement in the invisible enemy count Now there was a bug where only some invisible enemies appeared sometimes with negative health values. I fixed it by moving the action for the destruction of the map objects directly after the Health <= 0 condition as it was placed after the id test condition before. So because there was no iso object to be found it didn't delete them. It seems like the game sometimes still fails to destroy the map objects but this at least destroys them in the next tick or so.

    I hope this will keep working as I add more content

    Thanks again!