CrazyVulcan's Recent Forum Activity

  • Im not really sure what you are trying to do.

    [quote:3h7aws6w]The problem I am running into is that I can not link my array and family. Meaning that I cant run though the array and have each row correlate to a member of the family. I have tried having each row being the UID of each member but I can not find a way to automate that idea. And simply having Bob.UID in the first part of each row does not work.

    I don't understand what you mean that you want to link the array and family?

    The array hold whatever data you add to it, and can not be linked to anything, in theory any object in your game can use these data if you want them to, depending on your conditions for reading and making use of the content in the array. If what you mean is that you have stored some data to the array at some point and then when a character is available you want to use this to set some settings for the character, then you have to make sure that these characters UID matches the ones stored in the array, which it could sound like it doesn't.

    I get the impression that this is what you have been trying. But its very hard to troubleshoot when not sure how and what you store in the array.

    The family is also something that you cant link anything to, it more or less just a wrapper that can hold a group of other objects of different kinds but which share some common attributes, and therefore makes it easier to work on several different types of objects at the same time. So I don't understand what you mean with linking to it? If your characters are part of the family they are already "linked" to it through that and can be selected using:

    Pick Random FamilyCharacters

    Character1.UID = FamilyCharacters.UID (Assuming that the random Familycharacters chosen is a character1)

    Can you try to explain what you want to use the family for and when, and what the array hold of data that you need. And how and when you store the data, in correlation to when you need to read from it, think that would make it easier to help you?

    Thank you for replying,

    It very well could be that I am approaching the entire problem wrong but when I say I need to link the array and the family I simply mean that I wish to have a group of objects (Character Images/Avatars) and sort them so that they will appear in order on my menu.

    example if I have a array

    Name, Stat1, Stat2, Unlocked

    Bill,2,1,False

    Ted,1,3,True

    Sue,2,2,True

    And then have a command to build a populate a menu I need it to only list Ted and Sue, and exclude Bill. I also want it to on each menu tile to list Stat One and Stat Two in a textbox. Now each Avatar is located off screen and I need to pull them in and place them on every tile that is generated.

    So what I have done is make a sprite for each tile and move the sprite family to a pin point on that tile. How ever it will grab all the tiles and place them on the last tile generated. I have tied to use pick instance random and it will do as I wish, well it will place one avatar on each tile somewhat. But unless i want to create a family variable for all the sprites It will not work efficiently when I scale this up.

    I have tried using the UID (TedSprite.UID) and placing them in the array so I can say that when running a loop in the array the avatar sprite is linked that particular row in the array

    What I really want is to have a generic avatar that will be created for each tile and then change the sprite img form a URL in my project files. So using the above example I will create 2 tiles in my menu. Each tile will have the generic avatar pinned along with a textbox. Then tile0 will change the avatar to Ted and the text box will update with Ted's stats. then the next tile in the menu will be Sue's again doing the same.

    So to answer you question no, I do not really need the family but what I need is to be able to sort the array and have it correspond to a sprite. As I write this the idea came to me that instead of using the UID of sprites or IID of the avatar family. I will look into just having the avatars in a folder in my project file and pull their img form there to replace a generic avatar. thus negating the need of a family. Worth a shot so give me some time and I will report back

    Though if anyone has a solution that I am over looking please post.

    Thanks,

    CrazyVulcan

  • Some time back I was tinkering with a custom character maker and needed to do the same thing as you when trying to dynamical change color. Here is my solution, One make a gray scale sprite that will be your base as starting with a colored sprite will make tuning the HSL difficult. Next make a variable called ColorTyp set to zero and also add the Adjust HSL Effect to your sprite.

    In your events make a every tick block and place a number of sub branch's below that. Using the system compare pram set it for if ColorType=0, =1, =2 etc. the actions of each of those branch's you will use the "set effect "AdjustHSL" pram 0 to (Number)" repeat for pram 1 and 2.

    Having done that and adjusted the 3 parameters for the sprites HSL effect all you have to then do is change that ColorTyp var to dynamically change the sprite.

    But again you would have to do this on a sprite by sprite bases but have you looked into containers? if you put all the sprites into a container that should cut down of the cost of having all these sprites

    <><><>example

    Every Tick | ___________

    ColorTyp=0 | Effect Adjust HSL param 0 to 50| Effect Adjust HSL param 1 to 50| Effect Adjust HSL param 2 to 50

    ColorTyp=1 | Effect Adjust HSL param 0 to 10| Effect Adjust HSL param 1 to 75| Effect Adjust HSL param 2 to 50

    ColorTyp=2 | Effect Adjust HSL param 0 to 100| Effect Adjust HSL param 1 to 25| Effect Adjust HSL param 2 to 80

  • Family's & Arrays, A question of item sorting and selection.

    Howdy,

    This is a problem for my game that I have been struggling with off and on for a good three months now and have come to ask for assistance in getting this part of my game nailed down so I can move on.

    Below is provided a .cpax of my game that is the core issue I am trying to work though. The goal is that I can have a roster of items (Party Members) that is filtered so the only things you see in the menu is what you have available. The full game will be a multi player combat arena where each person will bring in groups and have them fight in tactical turn based combat. However first I must have it so you can only select the party members based on what you have unlocked/awarded. Listed below is a number of avenues that I have tried to use but still can not get to work.

    Remember that scalability is key as the final game will have 100+ choices and I also need the ability to update this list server side to add to that number. But we'll just get the foundation set before going crazy.

    I have each party member in a family with a family instance variable of either true or false. When the scene loads I run though a 2darray that includes every member in the family and based on that loop set the variable for each unlocked family member to True. Then when you select a slot for any of your slot a menu pops up that you can scroll though that lists all available persons. Chosen by a for loop for each family member that their varable="T"

    The problem I am running into is that I can not link my array and family. Meaning that I cant run though the array and have each row correlate to a member of the family. I have tried having each row being the UID of each member but I can not find a way to automate that idea. And simply having Bob.UID in the first part of each row does not work.

    I have also tinkered with RexRainbow's CSV plugin's hoping that later down the road each player can have a JSON string that can pull form a master file and self update when something like unlocking a new party member happens.

    But again how would I link the CSV and the Family? I can only put the CSV in as one string so I can not place variables embedded inside the string that the engine can read and use.

    I have looked into XML but it is still too new to me for me to understand what exactly I need to do in order to get the desired result.

    TLDR; How do I filter a family by a array or CSV string.

    Thank you for your time,

    CrazyVulcan

  • Howdy,

    I do not know if or how recently this has been bought up but I use C2 Full though my Steam client. I was browsing the community section a short time ago and noticed that there are 36 threads and a single screenshot. I do not know how many of us use Steam to access their C2 but I is a shame that there is not exactly a lot of liveliness over there.

    I use royalty free assets to prototype and the thought occurred to me that if one could use Steam Workshop items to import them directly into the program this might draw more traffic though there. Would this be a possibility in the future? I know Fusion and I believe Game Maker have this and it would be great if Construct had this as well.

  • This is great, thank you!

  • Just make ever layer transparent (the one created by default isn't transparent), so the screenshot has a tyransparent background (however, the display will still show black at the background, but the saved snapshot will not have it)

    Hello, have a few quick questions. One how do you select just the layers that you want to save. The snapshot canvas tool only is allowing me to chose my file format and the name of the file. I can not find any options to save just say Layer 3 or crop options or other ways to limit where the snapshot happens.(Width and Height of image)

    Thank you for your time

  • When you set position to object, does every frame have the same image point on your hand? Double check that for if you every tick set the gun to image point 1 see if image point 1 is on every hand for all your animations.

    -edit-

    Just reread your post, if you are using every frame try changing it to every tick

  • [quote:1ls1y0ez]Any ideas to get this effect that is efficient and accurate would be welcome.

    Unfortunately I don't think I have any ideas you would like As I would suggest remaking the hair so they are made for fitting your head sprite better. Because it sounds like it would probably take longer time to create the code to fit all the hair parts, than to just recreate them.

    Aye but even if I just had 5 hair and 5 head That is 5 hair size code line for head, another 5 for head 2 ect so even that small a system would mean that I would need to hand code 25 actions. With 60 hair styles and 25 heads that becomes 1500 lines of code. Which effects performance and that is just for one race and gender and I still have a fairly large game to append to that one layout.

    anyway after playing around I came to something much easier. If for every tick y1 and x1 are not equal; than if y1>x1change the with of Hair till it matches, and do the opposite for <

    And It works great and only uses 4 lines

    -edit- fixed the hair height at bottom

  • If I understand you correct you have 20 heads with different width and 40-60 hair options which are also different width and you want these to match any of the heads no matter what width?`

    If that's the case I think you might be overcomplicating things a bit, if each type of head have a hairline image point you should be able to just set the hair types image point to that image point and then you change the width of the hair to be equal to the head width. Just be sure that the image point is in the centre of the sprite.

    Unfortunately nimos100 many of my hair parts have various volumes (female hair). If i have a buzz cut it works very well but anything larger and I loose proportion as having the same width as the head means that the piece is shrunk and does not line up. Which is why I am trying to go the route that I am but its time consuming to make sure that the two points line up every time without a real good control over the points placement.

    Any ideas to get this effect that is efficient and accurate would be welcome.

  • If you have the trigger >PlayerSprite is overlapping WaterSprite< and the trigger >Wait 6-10 seconds< as a sub event that starts when trigger one is active next to the second trigger do what your planing for the drowning. Example, add the drowning animation and set player health to 0.

  • Math Heavy

    I'm making a custom character menu but am having trouble getting the width of the hair sprite to function correctly. I have a head sprite and I have a Hair Sprite and both are animations that contain all the individual pieces. That way all I have to do is +/- a frame to cycle all my parts. I have a point where the top of the head meets the hair who's point is where the top of the head should be. So I can not statically set a with for each hair as it would change width every frame of the head and I have now 20 heads and 40 - 60 hair options.

    In the image below I drew out what I am trying to do algebraically which is aliening a image point where the temple on the left side of the head should fall. Thus dynamically seating the width of the hair sprite regardless of which head or hair image.

    I think I am doing the math right however I still am having issues as the hair is too small but if I know my High School algebra (from a longer time ago than I care to admit) This should give me what I am looking for assuming that the distance form the image point to the center of the sprite is the same distance for the Hair and the Head respectively.

    Thank you for your time in helping me solve this.

    -edit- Ahhh I made a typo when entering the string, now that I asked for the help

    distance(Head.BBoxLeft, Head.ImagePointY(5), Head.ImagePointX(5), Head.ImagePointY(1))+distance(Head.BBoxLeft, Head.ImagePointY(0), Head.ImagePointX(0), Head.ImagePointY(0))-distance(Hair.BBoxLeft, Hair.ImagePointY(1), Hair.ImagePointX(1), Hair.ImagePointY(1))

    that sets it right. Hope that this will help someone who will need to do the same thing.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You might try system condition "compare two values" , get the cell value by expression: CSV.At("AVIABLE", CSV.CurRow) for 1st value, "True" for 2nd value, to filter the result.

    It worked, found the problem was I was calling Col "AVIABLE" but if you look carefully you will see that when I loaded the CSV string that column was called "AVILABLE" I fixed the typo and I can move ahead.

    Thank you.

CrazyVulcan's avatar

CrazyVulcan

Member since 22 Dec, 2013

None one is following CrazyVulcan yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies