winkr7's Recent Forum Activity

  • 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

  • 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:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Dr. Hasan;

    Thanks for the help.

    yours

    winkr7

  • Thankyou Kyatric and Dr. Hasan;

    Dr Hasan your example the problem is when I push the arrow key i starts up one box and if I push it while the box is moving it doesn't start up the next box when the first finishes moving. I tried to use a signal to get the next box to start when the first box finishes but didn't have any luck.

    Can you get your example to get the next box to start (only if the arrow key is pushed while the first box is moving)?

    I appreciate your time and help.

    yours

    winkr7

  • Thanks Magistross. Will do.

  • Thanks Kyatric;

    I run the standard 157 non-beta version of C3 so I can't run your CP3 yet since it is beta, but as soon as we go to 159 I will definitely have a look.

    I appreciate the help.

    yours

    winkr7

  • Dr. Hasan;

    I am trying to do this with three boxes. If any one of them is moving the next box has to wait to move until the first box is done. Each box doesn't know how long the next box will be moving so it has to keep checking for when no box is moving. I tried to use signal for this, but it is clear I don't understand either the order events are executed in C3, what wait does, or what signal does. So using your ideas how do I get each box to wait for the next to finish moving?

    Thanks again for your time.

    yours

    winkr7

winkr7's avatar

winkr7

Early Adopter

Member since 23 Oct, 2014

Twitter
winkr7 has 2 followers

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
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

17/44
How to earn trophies