Gearworkdragon's Recent Forum Activity

  • We dont know how the flow of code you have set up but when i do use parameters i try to seperate them into its own block to draw the parameters. You could for example do If function parameters# is = to 0 then do nothing

    or you could do if parameters# is more then or equal to 1 assuming that you have 0 to be used as default "do not proceed" the action used event.

    This is just a trick know this a sub event cannot run without its parent event...how ever you can have some subevent to fire off while others wont. Keep that in mind.

    I use this trick all the time for certain values to be used. and often time i would use a number 0 to make sure some event doesnt fire off without a requirement to be met . Such as fishing. Default it stays as 0 and there a blank or have a text that says cannot fish but once you have to set to one it will do the fishing think of it like that.

    Also another thing that pretty cool is that the true/false boolean uses 0 for false and 1 for true.

  • well theres no rush no deadline But would like to see these Xml to come to fruit so that other ppl like us can learn different things that contruct is cappable of.

    Have a good christmas to you guys. Cheers

  • So in other word if sharp stone require two and another recipe require two stone only the first will be used?

    Heres an idea what if say we did have two stone in there but instead of automatically straight to the output but rather list the outcome of certain recipes and select the recipes. Now I dont think ill never use this idea but What if you accidental place two stone there and realized that you dont need a sharpstone again.

    I was thinking of something like what if you wanted to have two recipes one is for sharpstone and the other is flint.

    And how would I use this if i need it to be a tool use wise such as this if want to make Twine from a plant and i need to use sharp stone but i dont want to remove sharp stone

    I can only think of one way is by adding results to clone a tool again to fake that you used it.

    .....@99Instances2Go

    Im lost to how you came up with a combine rule

    AT first i thought you use frames and then added the two frame number together to get the X

    When my calculation didnt turn up.....I then thought what if you use two frame to find the X,Y value

    That didnt turn up correctly.

    Why did you use for loop to find sum and I dont think this will quite work because this is a suvivial style game and crafting need to be used in different ways. Such as do you have the tool for it. Do you have the require material and what kind of yield will it give.

    But this method would only work if you just want to based a game around adding a god elements to the world. then this would be it but as far as using items and such this would pretty much be a debug nightmare. XMl is alot more simplier.

  • The id thing is if you look at the xml examples that the website show it shows actor id=2 or 3 or 1. This is an id attribute which is something ive seen in multiple modern day games have.

    So by using the Id attribute we could tech use it to our advantage to coordinate which item we want to check and which to loop through rather then using <i>. Does this explain better?

  • Well i did find something useful is that What if we used a an id system for each item creation and then reverse check it in a looping matter cause this one website that explain the XML was very helpful and it check to see if you can use expression.

    http://www.freeformatter.com/xpath-tester.html

    it showed some really neat things. So im thinking what if we created a whole new dictionary to store just the id of each creation and have it to check the Item count with the current picked to where if we have two stone dictionary a counted for and two item it would know to use them both. Would we use a loop here something like Loop 1-(count(//Item) Which in our case would be 6.

    So therefore we would have an id of each created item with the ID number to use so that we could techspeaking loop check them or something like that. I know its here somewhere. But im super confuse to where to place each of the loops. and Where to check the count of <i>

    CAuse if we can get it to know two stone and there is a recipe for it then create it. What do you think ? and for anyone else who is pro at xml files would help us understand it better and how to event it correctly.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • hmmm After looking at it wouldnt it make sense to add in something like a counting system. such as if one text of stone get placed in the box add one to a counter. and if another UID get entered then add one and have the crafting system use if 2 or more are place make 1 sharpstone.

    Cause atm you are right about the bug but that because you dont have anything define how many of each but rather just text of one.

  • So i am on a part of crafting items. I would like to create a system to where whenever you are in the crafting menu you will be allowed to drag materials in the window to see if it yield any craftable items. Such as this Stone and Stone to the little window. and the result would be a sharp stone

    Now i know from a variable stand-point that all it require is just if you have 2 or more stone you get a sharp stone but what if i got another 2 thousand more worth of craft-able other items. So I figure perhaps i can use An array system that would checks recipes of craft-able items.

    From my current limited knowledge I do not know if there a string to check array by the rows only such as this if stone and Another stone on the same of the array at Y=0 to show what it can produce .

    so for instance if i pick a stone and a stick in the window it should not yeild anything since at the Y 0 line stone and stick does not appear on the same line.

    And I would like to know if it possible for me to create a system where i can make the game to check recipes per line rather then per coors? How would one tell contruct two to do that.

  • ok i solve it seem like i was doing the events backwards Basically what i did was that i used a sprite helper at the size of each tree and then order the event in such a way

    so if anyone looking to how to move object randomly but not overlapping each other this is pretty much the code to do that

  • Wouldnt your last two line of code just wreck havoc on the actual zorder between player and the tree what if for example you got two tree only spaced out on the Y axis by say 40 unit apart just enough room to squeeze between them and by space out I mean at teh tree trunk not the actual size of sprite.

    Let call bottom tree A and top Tree B, There is three possible Z axis ordering i need to happen is

    One if player goes below treeA the player just need to be Infront of tree A and Tree B

    Two if player goes between Tree A and Tree B The player need to be behind Tree A but infront of Tree B

    Three if player goes above Tree B it need to be behind them both

    this is just the basic what if there is three I can get possiblility 1 and 3 to work but on number 2 possibility ........It either Z order incorrectly such as the player goes through tree A but is infront of tree B

    Ive tried pick instance Tree trunk helper sprite nearest to player to do the z order .....it just bugs out when there too many tree nearby. which is why I really need to space them out when spawning the trees.

  • What you got is where i have the problem.

    What i am trying to do is to do something like if the first tree get created then just lock it in place and move on to the 2nd one so that it spread out with placement rather then jumping all over the place.

    Ive manage to do get it to do the following either one way it will infinite move all teh object around or it wont move at all.

    This has to be the most baffling thing ever Ive now tried to just do On created check its placement problem is that it wont activate the rest of the dam code or even let it repeat its own code im about to do the extreme by doing destroy recreate until it does what ive asked it to do. and I know that will just spike the dam cpu to no ends.

  • well the plan is to create such a randomized world so that no two player has the same game so to speak and yes what i didnt show is that you see the spawner code I have it base on global number so i can change to what ever and how many tree i want so its just ten so far.

    the problem with your little example is that the tree is a 9patch sooooooooooo im limited

    I cannot manage tree origin point cause im using 9 patch instead of sprite which is why i got pins like a ragdoll lol.

    Alright so after trying your method it seem to not do anything other then reducing code structures. And im grateful for pointing that out now im having a problem of where the player is now alway behind the tree sprite rather then infront when approaching from bottom going up ward

    And my question still stands how can can i spawn the trees to be furthur apart cause after restarting the game several times the tree get clumped up together like a dense forest which is what i dont want. but rather to be spread out but randomly placed.

  • Ok so here the plan I want to populate a game full of trees but to manage Z order correctly between players and trees is madness. So I've figured that it would be far easier to move the trees away from each other so that I do not run into issue like being in-front of a tree when its suppose to be behind and etc.

    So for this little game i have a 9 patch being use for the stalk of the tree to randomly generate different height without losing graphic issues. next I am using a invisible sprite with all the image point because i want the limbs and such to be the same height n width. but just on different height in scaled according to the tree height. That part i got it perfected. I even got a collision helper box at the base of the tree to help with the player Z order as in when to be in-front of the tree and behind the tree.

    My problem is that I want to randomized the location of these ten trees and to not overlap each other. so in otherword I want to sort a lock the tree that are not overlapping so that the newer tree that get created that are overlapping to move somewhere else to fill in the space of the void.

    problem is that i do not know how to implement such system for such creation.

    I think it has to do something with a picking system but is there such a system where i can repick and recheck each ones but leaving other to lock cause i almost had it down but it infinity move the trees around so.....how do I lock each tree but keep moving the overlapping new tree around to a new space away from the tree . Or i could just simply Oppacity the tree to 0 when two are there to avoid the issue but id rather not.

    here the pictures of what im talking about

Gearworkdragon's avatar

Gearworkdragon

Member since 2 Feb, 2015

None one is following Gearworkdragon yet!

Connect with Gearworkdragon

Trophy Case

  • 9-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

11/44
How to earn trophies