jeffige's Forum Posts

  • NP. We all were at one point. I still am.

  • Silly question, but did you add the Browser object?

  • Ok check this out it should simplify local storage for you.

    http://www8.zippyshare.com/v/lMXzxvFU/file.html

    PixelPower Thanks for the reply. I've followed that capx before, don't know where i got off track. So i managed to fix a couple of things. My problem now is trying to get the power-up to save and spawn correctly. It keeps going back to zero on Game Over.

  • On my storage event sheet i have the event:

    System > StarsCount greater than "starscount_key" - localstorage > set item "starscount_key" to StarsCount

    Does this mean that at any time the StarsCount is greater than "starscount_key" localstorage will set it to the value of the StarsCount?

    In this case would it be like having it set to an 'every tick' event? Since the player will be able to score stars almost every tick, thus increasing the StarsCount almost every tick. (I know not to use a localstorage with an every tick action).

    The reason i ask, i have a _gameplay_Game Over event sheet that is included with other _gameplay___event sheets, and when the ball (player) is destroyed there are a lot of actions that run, including at the bottom of these actions is the: localstorage > set item "starscount_key" to StarsCount.

    Do i need the duplicate action on the _gameplay_Game Over event sheet if i have it already in the storage event sheet? Will it automatically set the StarsCount value at the time the player dies?

    Also, how do i set the localstorage to the power-up? Since i can not use a greater than, the number of available power-ups will go up/ down. At times there may be 10 available, other times there may be only 4 available. Or there may be zero available.

    Would i need to have 2 different events?:

    System > ShieldCount greater than "shieldcount_key" - localstorage > set item "shieldcount_key" to ShieldCount

    AND

    System > ShieldCount less than "shieldcount_key" - localstorage > set item "shieldcount_key" to ShieldCount

    Thanks for any help with this conundrum

  • Thanks again,

    I changed that. But now, when the ball is destroyed a random number will be subtracted from the shield count. i.e 10-3, 10-6, 10-5,etc. etc.

    Also, if the StarsCount is at <5 and you roll over stars that are on top of one another to get equal or greater than the achievement that triggers the 1st shield count, it will not trigger.

  • I have been trying to fix some major issues with within my game. Tried following tutorials, examples, helpful posts...still can not figure this out. Starting to get frustrated and feel a little stupid.

    The basics:

    You roll a ball over disks that have stars on them.

    When you collide with the stars you get points.

    When you score enough stars, certain achievements trigger and you gain a certain number of shield power-ups (100 stars = 1 shield. 200 stars = 2 shields etc. etc.) and a shield should spawn at the exact moment.

    If you die with a shield equipped, another shield should spawn when the ball is created, if there are more shields available, but it doesn't.

    With the help of i was able to get the shield to spawn when the achievement triggers. But now when you die, if you have a number of shields, the shield count would go to a negative number or go to zero.

    My problem, and where i know i am getting confused and feel so stupid, is synchronizing the localstorage with the Global Variable's, and ultimately with the logic that goes with it.

    Some info on the capx - I have the achievement triggers set low for the stars, this is only so that it's faster to test. Also, on the Menu event sheet there is an action to 'clear storage'. I enable this, run the menu layout and then before i test i go back and disable that 'clear storage' action so the localstorage will save. Then I run the Menu layout again. Just makes things a bit easier, for now and at least for me.

    CAPX

    If anyone could take a look, and help a numb-skull out with this frustrating problem, it would be greatly appreciated.

  • Also, you can look around the web for sites that offer free sounds/music. Some will let you use it in both non-commercial and commercial projects, as long as you give attribution: i.e. CREDIT

    Just check/double check/ triple check what the Creative Commons License is for that piece. If you can not find what the CC is anywhere on the site, assume you need to get authorization to use it. If you can use it how you want, most of the time it will say so distinctly somewhere on the site that is easy to find.

    Also, make sure to save the webpage that has the work, along with the CC license clearly stated. To cover your butt.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Check the image point of the platform. It sounds like it may be on the bottom of the platform, that's why the item is generated on the bottom.

    Also, your image's don't show.

  • Try adding a sub-event: System Repeat X amount of times.

    Helpful to upload a capx or screenshot of your events.

  • Eventually, when the shield is equipped it will attract nearby stars to the ball. Acting as a sort of vacuum, and allowing the player to score more stars. Also, allowing the player to purchase more shields from the store when they have run out.

  • sent you a pm

  • Well at the moment it's not spawning because you've not included your achievements event sheet in gameplay_common..once included it spawns the shield and works fine. What are you trying to do from this point?

    Dang...easily overlooked. Sorry

    I had a problem with the shields spawning for each point in the GV MagnaShield. I could only get it to spawn all of them at once, or only a single time.

  • I can't see any hint of a shield in the game, where is it? I can see a global variable called magnashield but nothing adds to it and I can't see a shield asset.

    Thanks for replying. Look at the Assets layout..the gold ring.

    The events (until i learn how to do them for the 'Store' purchases) will be under achievements.

    I may have been going back to try and edit and or learn how to do it when i uploaded the capx.

  • Try to put it on local storage. Global variables is your best friend in your problem. If you want to show the shield only once. try Trigger once while true and put more condition in to it. i hope i helped you.

    In that case maybe run a check to compare the variable to the number of shield objects for when it's time to spawn them.

    Shield.Count < GV Shields --> Spawn Shield

    Thanks for the help. I've been trying to add and change things around, unfortunately, i still haven't been able to find a way to get the shield to spawn. I've been trying to set the Shield localstorage to 0 or to clear the storage, since the Stars count keeps resetting or going up.

    This is what i have so far CAPX

    I still have some things to work out, though. Like getting the HighScore textbox to show if the total score is higher than the high score...among other things.

    Sometimes it's hard for my brain to comprehend things, like studying trigonometry in chemistry class.

    Again, thanks for the replies, and thank you so much for any help.

  • You might be able to get away with just a "Trigger once while true" or a "Start of layout" condition followed by a "Repeat X times" sub-event, unless I'm misunderstanding.

    On start of layout

    - Repeat [GV Shields] times --> Spawn shield

    This way the loop only runs once at the start. And yeah, you'd need to save your Shields value if you want it to persist after you close and reopen the game.

    Thanks for the reply.

    I'm trying to get the shield to spawn during gameplay, while the ball is visible. If the ball falls off a disk, it is destroyed - GAMEOVER. If the ball has the shield when it dies, the shield is destroyed also, and 1 subtracted from the GV Shields.

    I got the achievement to trigger, but no shield....yet.