Rable's Recent Forum Activity

  • Hi everyone,

    I'm having troubles with the "export for Crosswalk" option. First of all, I read in the manual "how to export to android with crosswalk" page that there are really minimal difference between this export and the preview over wifi played on chrome (on an android device).

    However, the preview over wifi works perfectly, but when I'm doing an export with crosswalk that I export via Intel XDK, all my characters simply don't appear on the first level... That's on the tablet, on the smartphone, the app simply shuts down as soon as the first level start. To be perfectly clear all of this also works perfectly when exporting over wifi.

    I really need help with this, everything worked perfectly up to now, I really don't understand what's going on.

    Maybe is my project just too big? There are 8500 events now, is there any limit?

    I also use a loading layout, but even this layout takes a LOT of time to appear (sometimes more than 30 seconds), even though I just have a single sprite and the loading bar on it (I read that we should keep it as small as possible).

    FYI the tablet on which I play the app is a Samsung Galaxy Tab 3. Any idea of what's going on?

    Thanks !

  • Hi !

    Thanks for your replies. I'll definitely keep the whole game in only one layout.

    To answer your question I started the game about 2 month ago, and it's not an MMO or anything like that. I suppose an experienced construct 2 user would do the same game with much less events. Still, I have many characters/enemies and most of them need a good bunch of events to describe their behavior.

  • Hi everyone,

    I'm currently working on a project that uses only one layout (except for loading and title screen). I was just wondering if this was possible or if I need to make transitions via another layout with maps or such things, to keep everything running smoothly.

    To give you an idea the project is around 6000 events and will have about 100 levels, so it's not a small game. There are sort of world maps (not animated) between each level that I create on a foreground layer, then delete them when going back to the game (which is still running in the background).

    My question is to know whether or not this has technical downside. Will the game start to slow down after a while because I use always the same layout?

    Thanks !

  • Thanks, I'll try that !

  • Hi Everyone,

    I've run into a new problem that I didn't manage to resolve by myself. Here is the simplified code :

    When spriteButton is touched (trigger once), set Object.instanceVariable to true (can only be triggered once by half second, with a cooldown mechanism)

    "Object" spawn object "icon"

    wait 4 seconds

    "icon" start flashing for 1 second

    wait 1 second

    delete icon

    set object.instancevariable to false

    This works perfectly as long as I never repress the button while the script is running, but I would like the player to play the script multiple times during the initial 5 seconds.

    As it is, when I re-run the script while it is still active, a second icon will be created and the instancevariable will be set to false 5 seconds after the first launch, because the first script is still running and will set the variable to false

    So my question resumes to : How can I cancel a wait time (or a whole event) in order to start a new one with the wait time back to 0?

    I tried putting the wait part inside a group and deactivationg the group then reactivating it, but it doesn't seems to work.

    Thanks for your help !

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks a lot for your time, inquiesco. Indeed your solution works fine, but sadly it is not usable in my complete code. The reason is that I simplified the code to have only one instance of the enemy object, while in the complete code I need 2, or 3 instances.

    So, starting from your version, I duplicated the actions in order to create 2 instances in the same "every thick" event, like you suggested. It works just fine. The problem is that when I need to put the life bar's width to be the same as the health, if I put the actions in the same "every thick" event, it applies logically only to the last instance, not all. So I need to create another "every thick" event at the root, and when I do that, it doesn't work at all... :-/

    Here is the capx demonstrating the problem :

    dropbox.com/s/6s9xegcic5nyl1u/project88_debug2.capx?dl=0

    Any further idea of how I could make it work?

    I also tried to put the "set width" action in a "pick all" event at different places in the hierarchy (root level), none of it works...

    ----

    EDIT :

    Ok my problem is solved. I moved the "every thick" (or pick all, it's the same) event, containing the set width actions, at the same root level of the "level=25" event. This implies that I can't change it based on the level, but I don't need to do that. So It's solved ! Thanks a lot inquiesco for your precious help.

    Still, some things are behaving weirdly and I'll be happy if someone can tell me how I could have done that if I needed to apply this effect on only some given levels, not all...

  • Here is the link to the simplified capx :(seems like the forum removed the link... Maybe you can help based on the description below?)

    ok, workaround : to download the capx, just enter

    dropbox.com/s/4ibtr46yhpy8avd/project88_debug.capx?dl=0

    with something at the beginning of the adress

    Curiously, the symptoms are different now, but there is still a bug with the "set width to enemy.health" action. The health bar just keep its default size and isn't resized.

    I found out another cusious thing : I defined a global variable named "level", and added an event :

    if "level" = 25 (default value) play the events.

    If I remove this condition of "if level=25", everything works fine ! The problem is that I need it, as I would like to create different enemies in regards to the level...

    ---

    Edit :

    As it seems like I can't post links, here is the detailed events and actions

    enemy has instance variable Health put to 100

    lifebar has width of 50

    global variable "level" = 25

    Event sheet 1 :

    start of layout :

    delete enemy

    delete lifebar

    include eventsheet2

    ---

    eventsheet 2 :

    if level=25 :

    create enemy

    create lifebar

    put lifebar width to enemy.health

    ---

    the result :

    it creates enemy, it creates the lifebar, but lifebar's width is still 50, not 100.

    If I remove the condition "if level = 25", everything is fine and lifebar's width becomes 100...

    (removing the "destroy" actions at the start doesn't help)

  • Can't do it right now, but I will do this ASAP.

    Thanks !

  • The health variable is an instance variable so its base value is not defined in the code but on the object. The variable call by the healthBar object is done after destroying the enemy, as the destruction occurs at the start of layout.

    The include sheet is in an "every tick" + "trigger once while true" event that is placed just after the "at the start of layout" event, in order to create the objects I need immediately after destroying all the objects that I don't need.

    Thanks !

  • Hi everyone,

    I have a strange bug occuring in one of my project. I simplify everything but it stands like this :

    ---

    object type Enemy has Health instance variable defined to 100 (default value of the object type)

    start of layout:

    • destroy Enemy

    (inside an included event sheet)

    create Enemy

    create healthBar

    set healthBar width to enemy.health

    ---

    At that moment the Enemy health value is 0 (checked in debug mode)... Which shouldn't be the case, as I never told the code to put it to 0.

    I created a new project, entered the simplified code, and it works fine ! Enemy.health is 100, and it sets healthBar width to 100. Just in my bigger project, it doesn't work, and I can't understand what's happening.

    I found two workarounds :

    disabling the event "destroy Enemy" at the start of layout makes the health be 100 at the moment the healthBar needs to read its value.

    adding "set enemy health to 100" before setting the healthbar width also works.

    I already looked a couple hour for the solution, but I can't find any spot in my code where I ask to put the enemy's health to 0. Moreover, by not destroying the object at the start it works just fine.

    Any idea of what's happening?

    Thanks !

  • This is great news ! Thanks a lot !

  • Thank you codah, and sorry for the misunderstanding.

    My original problem was this one : (not allowed to post URLS but check post "Question about using a single event sheet on different level" - last replied wed 27th august 2014 at 6:26 pm)

    What I meant with the number of instances is the following : if I have instances 0, 1 and 2 on layout 1, and I'm currently on layout 2, where there is 3 additional instances of the same object type, will they be numbered 0, 1 and 2 - or - 3, 4 and 5 (IID)

    And so instances awaing for me on layout 3 will be IID 6, 7 and 8?

Rable's avatar

Rable

Member since 6 Aug, 2014

None one is following Rable yet!

Connect with Rable

Trophy Case

  • 10-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies