tarek2's Forum Posts

  • Instead, when i (somehow) sense that the image was replaced in the folder with a new image, then i want to load the new image into the sprite.

    And, as mentioned, the simplest case i am looking at right now is that there always only exists one image in the folder which is displayed on screen.

    app running locally on an android tablet

    Nw.js only works for Pc

    It reads from a local folder (which happens to be a dropbox folder)

    For that, you gonna need a third-party plugin I believe not sure if there is any for C3, I think there used to be one for c2 but not really sure.

    The best solution is to work with local storage so you can save the Image and have control over when they replace it, this option will much easier to do.

    Though if you need to update the image for them then it may be better to have it in a server and use Ajax to load the Picture.

    Let's see if someone else has a better idea of how to work with DropBox so it can help you, I personally never used it.

  • when i try to move a bigger object it gives these jerks how can i move smoothly in 32.32 ?

    It works fine for me:

    https://www.dropbox.com/s/robc1y4xbj84bai/Grid%20Move.c3p?dl=0

    Judging from the Picture have you added an event to cover?:

    On Drop:

    Set X = round(Self.X /32) * 32

    Set Y = round(Self.Y /32) * 32

  • If you are using the Nw.js read

    Then what you do is:

    1-Nw.js read Binary File into the binary data Plugin

    2-Wait for previous action to complete

    3-Here as you say that you need to save the image to load any other time then you can save it as Base64 into an Array, Dictionary, etc...And whenever you want to load the image just load it from that base64 that you saved.

    Note:

    If you just wanna save it in Local Storage then you don't need to convert it to base64 as you can just save it as binary data

  • Could it be that you created many objects instead of one by mistake??

    You can go to the debuger and check how many objects have been created, if it's not that then I have no idea.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hard to know without seeing how you set up your spawn areas and Turrets but if you:

    Example

    Have sprites as Spawn areas for each turret then you can do:

    Turret On Destroyed:

    --SubEvent: "Spawn Areas" Pick the closest to (Turret.X, Turret.Y)

    ----"Spawn Areas" Spawn New Turret

    Note:

    Don't forget to exclude the "Spawn Area" from Picking of the Turret that you just destroyed

  • Thank you. It works with sprites if the event setup is global...but nothing works with the dynamically created button element.

    Mm not sure what you mean, have you tested the two examples that I posted? both are working for me

    Remember that you need to check for Touch in a subevent of the same event that spawns the button because if you don't the button will not be available till the next top-level event which is when is added to the system but it will be available in all subevents.

    However, you can pass the UID and pick it up again and check for Touch if you need to check for touching from somewhere else.

  • Add them to a Family and add an instance variable "Circle_Number"

    then to pick the objects just add one condition:

    Family.Circle_Number ="Your Target Number"

    This will pick just that circle but if you want to loop through all of them you can do a "For each" Family then you can do a subevent to pick the ones you need.

  • Form buttons don't work with Touch as you need to use its own trigger "On Clicked" to register the click.

    However, you can make it work in two ways:

    1-Create an invisible object with each button that you spawn so you can use "is touching" as you do now

    https://www.dropbox.com/s/tdgj8eht1nyjvfb/Detect%20Button.c3p?dl=0

    or

    2-Check BBoxes, I think this one is better because you don't need any extra invisible objects

    https://www.dropbox.com/s/ubyt48pqbt9hu8i/Detect%20Button2.c3p?dl=0

    An alternative to those you can use just sprites as Buttons

  • can you explain a bit more about your logic how it should work? is hard to debug without looking at your project.

    What your events do at the moment is

    1-Pick all the "Empty" slots that are not "onlyonce" >>>> and set empty to false and onlyonce to true

    The question is if you send one axe in the function why are you setting all the slots that picks the conditions? shouldnt you pick just one slot?

    Check on the Debug and make sure there is at least one slot that have:

    -Empty = true

    -onlyonce = false

    So the else can Run when the slotfull is = 6

    If you still cannot find the issue share a small demo to look at it.

  • can you explain me in event sheet, pick ? but why pick, juts overlap object and set a to b

    In your event "Is On Touch"

    If you have multiple objects of sprite3 you need to pick the right one

    In your event "Sprite3 is overlapping Sprite2"

    If you overlap multiple objects of sprite2 you need to pick just one

    Maybe something like this?

    https://www.dropbox.com/s/dru3daku4t7ewdg/Connect.c3p?dl=0

  • I wasn't trying to insult anyone

    I wasn't referring to your comment, I didn't see any insult in there though, I guess I should have provided an example to make it more clear)) I thought that was clear enough but I was referring to things like:

    angry kneejerk reactions

    We can disagree but with respect.

    I think things like that were unnecessary as the users are hungry for a very good reason, a lot of us don't live with our parents and have bills to pay and families to support so if you focus on game dev full time you take everything more serious if you are using C3 as your main Game engine, that's why if you see them concentrating in something else where they could improve C3 and add New features to open new doors for new opportunities and income that's something that is for the best interest of everyone unless you doing it for a hobby.

    The years are flying and we are getting old so we cannot wait for an eternity to add features and keep improving the engine, we need it now while we are still alive))

  • A little demo showing what you are after will help.

    To set an object position to an image-point instead of its origin-point you will need to make some calculations to position it

    To set the Width of the line just set the width to the distance you are after, if you set it to the distance between two objects then make sure the object is picked before you reference it, I think you have a problem of picking.

  • Is not very clear what you mean

    Are you trying to create a button and click at the same time?

    Can you post a picture of your events? it may be easier to see the issue

  • Something like this?

    You can replace the Mouse wheel with Keyboard

    https://www.dropbox.com/s/wd353tjwhs0gc06/1-Rotate.c3p?dl=0

  • You can loop through the whole tile Map and check the 4 neighbours.

    Note: The ones that are the edges they can not be surrounded by for red so you may need to count with (Tile = -1) if you want to convert them to blue swell

    https://www.dropbox.com/s/pyp9e5r61zd5ebz/grid.c3p?dl=0

    In the example, I put them separated the events to add comments so you can visualize how to check each side but once you know how it works you can combine them all in one condition like this: