damon380's Recent Forum Activity

  • I am having the same issue whether via Android or Android Crosswalk. I have removed the plugin in my original project and added the plugin again in intel xdk 2611 before resuming the build. Able to compile successfully for both type of apk but blank screen when I launched the apk on my test phone.

    Any idea on what could be the cause for the blank screen?

  • Sorry. Here's the screenshot.

    http://postimg.org/image/ta0kp71tz/

    It works in this simple example above.

    However, in my capx, I have 2 additional global variables -

    upon touched Pause,

    Playing - 1

    Lives > 0

    Not sure if thats the reason it doesnt work. I have tried disabling the 2 variables above but somehow its not working.

  • Hi,

    I tried combining the toggle tutorial with a button that sets variable-countdown - 9 similar to the Timer tutorial.

    However, each time I toggle & set variable -countdown to 9, the variable will remain at 9 but not starting the timer.

    Timer

    https://www.scirra.com/tutorials/450/timers?page=2

    Toggle

    https://www.scirra.com/tutorials/158/ve ... two-states

    Any suggestions on where my logic is not right?

  • Like I said, I am trying to add health to the exising spawner example that I mentioned in the first post.In the original capx you will find that it will spawn objects with diff colors.

  • I basically edited the example that I mentioned earlier.. Do have a look here.. . com/s/6muo88q825bke5n/spawn_with_health.capx?dl=0 . I am trying to assign a health value e.g 1,2,3 to each sprite spawned.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have checked that the collision detection is enabled. Any other suggestions to look at?

  • Hi,

    I referred to this spawner example and am able to use this to use the wave method shown in the capx. .

    My second purpose is to store health in each spawned object and upon collision with another object, subtract by 1 and destroy when 0.

    As per the example, I included an additional variable - health and maintained the health in the array e.g spawner/amount/type/health - "1;2;Yellow;1|1;1;Green;2|0;3;Red;1;3"

    I created an instance variable on my enemy sprite - HealthX.

    Under the as Spawn function, I set the health-local variable to the spawnobject and added another line to set healthx to health.

    Separately, I have an event that upon collision, subtract 1 from healthX of the enemy sprite and one more event for e.g if pick instance with enemy.uid & healthX less than zero ->destroy the enemy sprite.

    It doesnt seem to be right somehow. Can someone advise if there is a better method for this purely to detect collision of individual sprites for subtraction or if there is another topic which I can refer to?

  • Many thanks for your example above. It works as what I was looking for!

    I was probably confused as to how the logic works as I couldnt understand if the localstorage should store score and highscore..

  • Hi,

    I looked through the manual on the local storage plugin and reviewed the previous high score tutorial on high score.

    It goes something like this

    global variable - Score and HighScore

    Start of layout -Local storage - Check item "score" exist

    -Local storage - Check item "highscore" exist

    Touch- On touched sprite->Add 1 to Score

    Local storage-on item "score "exist - set item "score"to Score

    Local storage-on item "score " set - set item "score"to Score

    Local storage-on item "score " missing - set item "score"to Score

    Local storage-on item "score " get -get item "score"

    Button - on Clicked - Set "highscore"to HighScore

    ->System - Score>HighScore - Local Storage - set "highscore"to Score

    - set HighscoreText to ""&Score

    ->Else -System - set HighScore to 0

    - set HighscoreText to ""&Score

    I seemed to be unable to set the local storage for highscore to my global variable - HighScore. The global variable - HighScore remains 0 while I see the value in the Local storage key - highscore.

    It also dont seem to be updating e.g if score is lower than Highscore, as it will override new value.

    Can someone advise if I am setting one of the steps above incorrectly?

    My 2nd question is, if I were to restart the layout, how do I retrieve the HighScore stored in the LocalStorage?

  • Thanks. It works now after adding a layer.

  • I have been trying out the rotating platformer template. I cant seem to be able to fix the pause button as the sprite moves(rotates) in a spiral. I have tried pin/anchor but it seem to move as the sprite moves.

  • Hi,

    I have been experimenting with a method whereby my platformer collects points e.g 5,10, 15.

    At each juncture, I am trying to popup with a message box and player just need to click on a ök button(sprite) to close and resume game.

    It goes something like this

    System - Score -5 - set time scale to 0

    -create MessageBox(Sprite)

    -create Messagetext

    -create Ok(sprite)

    Touch - On Touched - OK(sprite)

    System-Global Variable - Life =1

    - -->Ok -X is IsTouched(boolean) - Set Ok - IsTouched to True

    - Set timescale to 1.0

    System-Else -Set Ok - IsTouched to False

    - Set timescale to 1.0

    It only works for the first click. The next time it popups, when I click on OK, it doesnt work the same way first time.

    Perhaps someone can let me know if there is a post here that I can refer to.

    Thanks.

damon380's avatar

damon380

Member since 4 Dec, 2014

None one is following damon380 yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies