Restting Local Variables

0 favourites
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • How would I go about resetting the timer after a reset of the level. Whenever I reset My Level even after deactivating time group the timer keeps counting.

    I'm only counting seconds up to 300 like mario but it's NOT a mario clone lol, anyhow if I die or kill boss and conticue to next level or reset I'd like the Timer to reset.

    Pls any help would be amazing.

    p.s if I could be a bother, to ask how I might go about using the timers(TIME) ex: I kill boss and I have 193 points but took 30 seconds i'd like the 30 seconds to subtract from my overall score that carries on to next level as time resets.

    TUT used

    scirra.com/tutorials/173/time-counter

    I tryed adding set time to 0 but I don't think I'm doing it right

  • You should post your capx.

    As answered in the other topic, it depend on how you've set things so far.

    Your score is supposed to be a global variable, your timer too, on end of the level you substract timer from score to obtain the effect you want, on restart you set the timer to 0.

    Without the exact code you're using (your capx), there's not much I can tell.

  • OK here it comes "how do I get/extract my Capx n what is it?"

    I'm guessing its my event sheet?

    I bet your right, problem is that my timer is a local variable. I tryed to set the timer as global but it didn't work? for me

    let me know how to extract my capx file n upload.

    what upload site should I use.

    I'm new to this. have been using cryengine1,2,3 for years but this is sooo easy, untill now lol.

  • omg I feel so dumb went to save as single file and well u know.

    Only u will see it right if I password the .rar

    n what upload site should i use.

  • uploadin to 2shared

  • Sent you a private Msg with the link and passord thanks for your time and help <img src="smileys/smiley30.gif" border="0" align="middle" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I got your PM, but I won't download a 29 Mo archive.

    I'm on a slow shared connexion, I'm not willing to do that.

    Here's a commented capx, adapt it to your project.

    Also I had linked in my previous post what the .capx format is.

    Here is the link again.

    Read the manual it's really worth it.

    Also for your next uploads try dropbox.

  • Thank you for all of you suggestions I will definetly look at the manual,

    your Exaple is exacly what I need thank you soo much I just need to edit the code to minus the score on finish

    p.s my game so far is 45 mbs unpacked with two levels is that too big?

  • p.s my game so far is 45 mbs unpacked with two levels is that too big?

    My main question is: what do you have in your game that is so large? Is it necessary?

    Yes, that is probably far to big for most smaller-scope games, especially if its delivery mechanism is over the internet. Remember, whoever plays your game (if it's on the internet) has to download it (whether streaming or otherwise)! <img src="smileys/smiley1.gif" border="0" align="middle" />

  • > p.s my game so far is 45 mbs unpacked with two levels is that too big?

    My main question is: what do you have in your game that is so large? Is it necessary?

    Yes, that is probably far to big for most smaller-scope games, especially if its delivery mechanism is over the internet. Remember, whoever plays your game (if it's on the internet) has to download it (whether streaming or otherwise)! <img src="smileys/smiley1.gif" border="0" align="middle" />

    Thanks for your input. I have now deleted the crapola out of a bunch of imported created instances that can be just cloned/copied from original. I don't need three of the same object in my game.

    so it's now 26 mbs(unpacked) only two levels well two and a half levels.

    I think it might be the layout size and rez of my background

    2048,1024 I have the top 512 used for my background and game and bottom 512 used for touch controls

    is this layout and rez to big for a small phone game.

  • I tested it on my momz 1st or second gen samsung android no multi touch and it worked great with the odd stutter that went away after one playthrough. I still think I should lower the rez of the whole thing

    If I wanted to lower the rez of a whole level how would I do that ?

    without having to redo or reimport any thing could I just highlight everythin and shrink it to fit new smaller layout for better performance or wil my backgrounds need to be made to proper sizes?

  • What is the average size for an Iphone Game anyhow? I read it's about 7-8mbs how is that even possible?...

    What am I doing wrong I cant even think about having to go throught EVERY single image and resizing, unless someone tells me that's what I have to do. or some sort of compression I don't know please help.

    like theres no way all the 3d games on the Iphone are 7-8 mbs so I must have read an old article.

    I'm going to start editing posts lol

    __EDIT___

    I found this site with all the Iphone games in a list with price and size etc.. ranging anywere from 180mbs for rockband to 7 mbs for solitare

    so I think i'm good if I hit 34mbs compressed extract in constuct2 and that will be about 30 compressed in 7zip or .rar so i'm good now.

    Heck Uno is 75 mbs omg for uno wow

    iphonegamesite.com

  • Actualy this seems pretty accurate.

    Phone are devices disposing of small size of storage. 7 - 8 Mbs is already a lot for a phone.

    You told me in your pm that you wanted to take a game designer class, here's a first tip: you'll be asked to read and look for informations. A lot.

    The questions you ask are already answered through the forum, the manual, the tutorials and the blog posts.

    Also please, don't double/triple/crazy post.

    Think about all you have to write about and write a single full post.

    If a few minutes later you think about something you want to add, click on "Post options", "Edit post".

    Also to answer about the resolution, yes this is a crazy resolution.

    Making a forum search with the keywords "mobile resolution" this topic shows

    Image compression, you can read about in this article.

    Consider every beginner's answers have already been answered in a way or another on the site.

    Learning to search for infos by yourself will be a precious skill.

    Nontheless, if you have questions, don't hesitate to post.

  • Thank u for all of your advise I just got kinda tired of all of the tut's after in the past two-three months I tought myself:

    Cyengine3(Vet of 2), Google sketch, World Machine, Maya(sorta),Photoshop CS5(gimp 4 GT5 so it was easy), Mudbox, and a bunch of the aspects around them.

    Then 1 week ago I found Construct 2 and here we are. lol

    Check out my youtube channel(profile) you can find alot of my Cryengine work there.

    I sorta just dive in head first into things, don't bother to check for water. lol

    The water being the cushion(Community,n Tut's) in this case. <img src="smileys/smiley1.gif" border="0" align="middle" />

    _______________Edit_____

    I just exported my level with BRUTE compression then compessed with 7Zip at ultra and it's 12mbs now

    I read that AT&T wont allow 3G/4G downloads of games over 20mbs so I might be good. Just can't make the 12 levels I wanted Oh well 5 or maybe 6 I guess. with different modes for each like time attack or something???? I'll figure it out.

    I tested it on my momz cell as I said it ran great with odd stutter.

    but stuuter is because it's like a streaming movie but game right.

    I bet it would be in good practice to take the time and redo my images but darn. I wish I was a game studio i'd get a lower level to do it. lol

    ____Edit____

    last note: Keep in mind I want the true version to be on facebook afterwards

  • I read that AT&T wont allow 3G/4G downloads of games over 20mbs so I might be good. Just can't make the 12 levels I wanted Oh well 5 or maybe 6 I guess. with different modes for each like time attack or something???? I'll figure it out.

    I bet it would be in good practice to take the time and redo my images but darn. I wish I was a game studio i'd get a lower level to do it. lol

    ... Keep in mind I want the true version to be on facebook afterwards

    You are definitely going to want to check on your image sizes / formats. The main thing that is going to increase your overall size is the size, number, and kind (format) of images and sounds you are using. A fewer number of object instances is not going to noticeably change your overall game size. Also, a fewer number of levels is not necessarily going to affect your overall size much either (maybe a little). The main thing is the total number and size of your images as far as download size is concerned.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)