whitephon's Forum Posts

  • 11 posts
  • excuse me, I want to play small html5 game on chrome/chromium/any other spinoff, offline (using file:/// protocol without host)

    I just added --allow-file-access-from-files flags and it worked but there is still problem.

    It can't use localstorage. Anyone know how to fix this or is there additional flags that could help?

    I mean let chrome play html5 game inside HDD offline that can make use of localstorage.

    My firefox only use 1 cpu I want chrome/chromium/anything that can use all of (at least most) of my cpu.

    any other suggestion? other browser maybe.

    Thank you.

    Note: Not NWjs please,

  • here is the file:

    dropbox.com/s/akm37pqe6ggsnnb/sendtak.capx?dl=0

    (the forum wont allow me to post link)

    I deleted most asset to make it lighter,.. but it still 2MB though.

    The event I'm talking about is in the foeControl event sheet below "EXPERIMENTAL" comment.

    the control is WASD and left click to attack. Shift to roll and dash, space to jump but you don't need that.

    Try to slay the slime, when it's on air try to slay again. It will make a difference.

    Should share your project.

    One thing is see is that the 'On "hitarea" collision with "shadow"' will mostly not trigger.

    When you create the area, it is probably and mostly already overlapping one of the shadows.

    Then there will no collision happen.

    (i dont know if they are instances)

    All the rest depends on your setup and the events.

    The collision is happening. It's triggered already.

  • Hello, I made an 8 direction action combat game that can jump for school assigment. I'm still relatively new to construct 2 and programming so I don't know what happened in the calculation, machine, arrangement or whatever it is.

    For each character (There is only 2, player and enemy) I made a shadow, the shadow contain 8direction behavior.

    In the shadow there is Instance Variable called 'altitude'. THe shadow is used to show character's position.

    Then there is puppet object (marked as 'target' in the picture, I forgot to change the text), it position will be set to (shadow.X, shadow.Y-shadow.altitude).

    There is event who manage the altitude with gravity and projectile speed. It goes like this:

    if altitude > 0

    altitude= altitude+projectile speed

    projectile speed= projectile speed-gravity

    else if altitude <=0

    altitude= 0

    projectile speed=0

    I run this event every tick:

    If altitude<=0 set maxSpd to 200 and set deceleration to 5000

    else set maxSpd to 5000 and set deceleration to 0

    so when the puppet on air, there is no deceleration caused by ground friction. And when character on the ground I don't need to deal with these acceleration and deceleration stuff. UHHH

    And when attacking, it create an object (let's call it hitarea) with 'knockback' variable.

    And when that object hit another character, It knock them back with the knockback variable using this:

    On "hitarea" collision with "shadow"

    set projectile speed to 10 (so it will throw to the air)

    set Vector X to cos(hitarea.Angle)*knockback

    set Vector Y to sin(hitarea.Angle)*knockback

    What I expected is the character will thrown in to the air and knocked back for a distance flawlessly.

    It should be like this:

    Thrown in the Air, the altitude increased, deceleration changed to zero, knocked back with no deceleration

    But what happened is: (I'm not certainly sure)

    Thrown in the air, the altitude increased, knocked back and decelerate for very high value, deceleration changed to zero.

    So it only knocked back a little.

    I discovered by collide another hitarea with same knockback value when the character was in the air, It knocked back flawlessly like it expected to do. Or I might be wrong.

    How do I make it change deceleration to zero first then knock back the character?

    Maybe you can help me.

    note:

    I already put change deceleration to 0 in the middle like this:

    On "hitarea" collision with "shadow"

    set projectile speed to 10 (so it will throw to the air)

    change shadow deceleration to 0

    set Vector X to cos(hitarea.Angle)*knockback

    set Vector Y to sin(hitarea.Angle)*knockback

    But it still didn't work.

  • uhm, excuse me. I can't do "Load JSON" with this plugin.

    I tried making JSON and load it but don't work. Then I try yours from github.com/FrenchYann/JSON_for_construct2 but still won't work.

    It gave me message above.

    But it worked with event

    Where did I go wrong? How to fix this? Thank you <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy" />

    Here is the input:

    "{

    "Wizard": {

    "stats": {

    "hp":80,

    "mp":120,

    "str":2,

    "dex":2,

    "int":16

    },

    "spells": [ "Fireball", "Poison", "Meteor", "Ice Storm" ]

    }

    }"

    EDIT

    nevermind.

    I changed the jSON to below and works.

    {

    ""Wizard"": {

    ""stats"": {

    ""hp"":80,

    ""mp"":120,

    ""str"":2,

    ""dex"":2,

    ""int"":16

    },

    ""spells"": [ ""Fireball"", ""Poison"", ""Meteor"", ""Ice Storm"" ]

    }

    }

  • Link dead

  • >

    > > Maybe you can do like this :

    > > for each "sprite2" is overlapping "sprite" ~> destroy

    > >

    >

    > That will destroy all sprite2 overlapping with sprite1. Besides, it don't need for loop to do the same thing.

    >

    > I want to create UI. Let say bar, close button, panel, etc pinned to one window title. And when the window title destroyed, every items pinned to that will also destroyed, but I don't use container because there will be many kind of UI using the same asset to save filesize and event.

    > Thanks for the answer.

    >

    > this is my capx file

    > dropbox.com/s/mh072xom9h198 ... .capx?dl=0

    >

    I use IID to fix this bug . because "sprite" and "sprite2" created in the same time . so they have same IID .

    Woooooooo. Thank you!

    It worked <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy" /> I don't know what it is for before.

  • Maybe you can do like this :

    for each "sprite2" is overlapping "sprite" ~> destroy

    That will destroy all sprite2 overlapping with sprite1. Besides, it don't need for loop to do the same thing.

    I want to create UI. Let say bar, close button, panel, etc pinned to one window title. And when the window title destroyed, every items pinned to that will also destroyed, but I don't use container because there will be many kind of UI using the same asset to save filesize and event (it's free edition :v).

    Thanks for the answer.

    this is my capx file

    dropbox.com/s/mh072xom9h198 ... .capx?dl=0

    EDIT:

    Hey but that gives me an idea.

    It works but It still feels weird though

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Can I destroy an object and everything pinned to it without a container?

    I tried using pinnedUID but the documentation is very confusing to me.

    Why did I still need instance variable if there is pinned UID? Why did I need pinned UID when I can just save UID right after the object was created and pinned. What is pinned UID for exactly and how to use it?

    Thank you

  • file not found. can someone reupload it?

  • thank you

  • I'm sorry I hope I can explain it clearly. I'm not good at communication.

    How do I re-arrange overlapping object according to it's Y position in run time?

    I want to make movement like 2D rpg. But I have a problem in this overlaping object.

    Video of the problem: youtu.be/tgq4lqIeYNA

    My problem:

    What I want to achieve:

    Those objects will destroy and spawn overtime. And there will be more than 5 same object at the same time that probably switching place and overlap like that.

    What's the best way to fix it?

    Thank you. <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy" />

    (Below is not important but might help expressing what I mean)

    The red square below is the foot collision area. (I haven't implemented it yet in the video above)

  • 11 posts