winkr7's Forum Posts

  • Hello;

    I want to make a pie indicator (its just a little slice when almost empty and grows clockwise to a full pie when full). I read somewhere that with 4 half slices (two black to block out what is below and two red overlaid at angles to show the growing pie) this can be done. I think I saw this in c2 about two years ago. Does anyone remember how this was done or where the link was?

    thanks for your time

    yours

    winkr7

  • I edit and run the code on my little android while I commute. When I get to work I switch to my PC without missing a beat--same project, same line of code even.

    I can deploy a full HTML game to my website in a minute--honestly one minute.

    If you want to get something up and running C3 is a dream.

    yours

    winkr7

  • When is an object pickable as RoJoHound points out is the center of most of my bugs in C2 and C3. If you use lots of functions (which most people tell you is a good programming practice) you have a tendency to shove created objects further down as you build functions that call functions and since you can't access a newly created abject except by "Pick by UID" or "last created" it can get pretty complicated.

    If you start putting wait 0 here and there because well--I don't know it makes it work--you are doomed. Yes this pickable thing is a feature of the construct methodology and it messes just about everyone up from time to time.

    There are a few things you can do to get around it:

    1) avoid creating objects you can put in the layout since they are pickable right away.

    2) keep a UID array of stuff you create and use pick by UID looping in the array. This seems like overkill but it will save you countless hours of debug time.

    There are many upsides to how C3 works, and I obviously love it--but it is clear that when an object becomes pickable is a source of programming problems.

    yours

    winkr7

  • Scirra.com is off limits for some corporations trying to stop game playing at work. However contruct isn't on their list yet.

  • Alon;

    I want to do the same thing--and I would like to point out that some layers in my layout change their opacity or are invisible. So when the capture is done I need to set these layers for the capture.

    Yours

    Winkr7

    Hello;

    Sorry this is a little off topic--but how do you get your code snippets to print out so neatly. I always have to take a screen shot. Are you using cut and paste to generate those?

    thanks, and I hope you solve your wait problem.

    yours

    winkr7

  • Newt;

    I am not sure how to get hold of you. It seems we can't PM.

    I am working on a game and want to see if you are still interested in employment.

    you can view the alpha here: space4x4good.com/rb

    yours

    winkr7

  • Thanks AllanR and Plinkie. I think I will go with the two family solution.

    I appreciate your time, both of you.

  • Hello;

    Box is a family of sprites. I want to write a function that returns a 1 if two specific box.UID values overlap. so it is functions.DoTheseOverlap(boxOne.UID,boxTwo.UID)

    How do I write this?

    If I just say box overlapping box I get a big SOL of all the overlapping boxes, not just these two.

    thanks for your time.

    yours

    winkr7

  • dop2000;

    thankyou very much. This is very clear.

    yours

    winkr7

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for your time dop2000.

    So I think I am almost there, but I have a few questions.

    I want to store and save the object UID in outString, I don't know if it is also a member of the ball family or also a member of the monkey family or a toy. I just want to send the string out and then rebuild the object.

    How would I get hold of object.AsJSON. outstring=object.AsJSON doesn't exist because I can only pick the UID by family I can't pick it as a sprite or as an object. So I have to save it as either a toy, or a monkey or a ball. I can't save it as a sprite or object (or tell me how if I can). You say they are the same anyway. So lets suppose I get my outstring somehow.

    Now what?

    what object do i create to reload it? If I create a toy and then try set from JSON string outstring what if it was a ball?

    I think I am close, but it seems I have to be specific about the family I am recreating as I have to call create before I can call set from JSON string.

    thanks for your help so far, and I appreciate your time.

    yours

    winkr7

  • Hello;

    I have a UID that is a member of two families, ball and toy and both are sprites. To to save and load it from JSON is this what I need to do?

    pick toy by UID toyString = toy.AsJSON

    pick ball by UID ballString = ball.AsJSON

    then to load it i create a ball or toy by UID and do the following?

    pick ball by UID ball set from ballString

    pick toy by UID toy set from toyString

    The second set from toyString doesn't overwright the stuff that is ball only that I set from ballstring? What about the sprite specific stuff? Does it get its location angle etc from the last toy set from toyString?

    Is there some better way to save every family a UID belongs to as a string?

    thanks

    yours

    winkr7

    Tagged:

  • I like the new functions much better than the old one--however, as others pointed out--I keep losing the set return parameter in my list of functions. I now put everything in a catagory that starts with a letter after f so the "set return parameter" is at the top of the list.

    There is another problem with functions--suppose i have a local static variable in my group name and functons in the group that reference it. If I disable the group the function still gets found but the variable the function needs does not.

  • Thanks Magistross you are always helpful.

    I think I will do as you suggest and create a family called globalSprite and put all my global sprites in it--then cast cork (using pick globalSprite by cork.UID) and if it is a member I know it is a global cork.

    I was hoping there was some other way to check.

    thanks agaim.

    yours

    winkr7

  • Hello;

    I have a family, called cork--some members are global sprites, how can I find out (once the game is running) if a particular member (UID) is global or not?

    thanks for your time

    yours

    Winkr7

    Tagged: