Heroes4hire's Forum Posts

  • doing battle. heroe attacks highest att stat enemy.

    if there an easy way to pick an instance of an object with the highest att stat?

    yeah i could make a loop, to run down from 1000-0, and stop when the object att stat = the loop.

    but.. honestly, attack could be in the 100's of thousands.

  • working perfectly.

    man, its 37C i think im blinded by sweat half the time.

  • in fact... looking at the screen shot, the resetting function was there... sorry. ive either been at it all day, or i wasnt wearing my glasses...

    im reasonably new to the function aspect of c3 either way

  • ok... i added a new function to test it..

    both showed up in the call function list... dont know what that was about

  • dop2000

    yup, i have that

    just no call function option...

  • sorry! should be obvious.

    i made a function. just to reset squares to 0 before assigning the clicked one to the selection value.

    but. i need to call the function.. there is no "call function" action.

    did i set up the function incorrectly? i said return value none.

    its multiple instances, so i needed it to run outside of the event.

  • 3d objects have sprites assigned to a side.

    changing the image of a 3d object, is as simple as changing the sprite it is set to look like.

    you could have a 3d square inside the square, to have walls set as hollow appearance, with no top showing, then set this inner 3d cube to have the width of the desired hole size.

    construct 3, unless im unaware, doesnt have great 3d rendering outside of isometric shapes

    working it out, it will be sheerly aesthetics.

    hope this is useful. more than likley someone else knows better.

    there is always the option of just having hundreds of 3d squares... and deleting them.

    thats going to slow the game down mind you

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • a ahhh

    ok.

    im going to level with you. i got walled in my dungeon keeper game, as i wanted to connect adjacent tiles as 1 room.

    however, i was doing this with multiple rooms and the blocks didnt automaticly move to position.

    so, again. tilemap.

    just have an invisible tilemap on screen. when you release the object, have it snap to position ( or as i did it, just have the shape move with the mouse, but snap to squares (ie, it can only ever cover tilemap squares, cant overlap)

    then on release. set the tiles that are covered by the object to become tile 1.

    you can do this by comparing the blocks position/tile width so 128,128 will become tile 4,4 (if the tile size is 32)

    then. you can use a for each tile condition, and +1 to a global variable for each tile set to 1

    this works perfectly for a 1 square block. if its a 3x bloclk, youll have to figure out the calculation to assign 3x tiles

    1 more thing to note. set the hit box of the tiles used in the tile map to be slightly smaller than the box, or they can count incorrectly sometimes.

    i hope this helps!

    if you need me to be specific on anything, let me know. but, i am working on a big project with some people atm.

  • waiit are you trying to box in an area.

    so you have 1 sprite, and it randomly generates an area around its self

    tile maps might be the way forwards

    check out flood filling examples.

    after flood filling, you could just +1 to a perimeter variable for each tile thats filled.

  • you could save them to an array. then download it as a json file.

    ok i havent actually downloaded one yet, just loaded them.

    but have a free json file named "saved"

    go array-dowload to json - type "saved"

    i hope that works... my plan is revolving around it

    to load the json file youll need AJAX object.

    start of layout-Ajax request "saved"

    Ajax on "saved" completed- Array-load json string Ajax last data

    Ajax on "saved" complete- Array load from json string "Saved"

    that will put the saved data in the array. then just set variables to the array data where you saved them.

    i hope that helps, im expecting others to come in and correct me... but, that helps me too

  • probably you have other frames in the animation that are bigger?

    you can crop it, but, theres an arrow next to crop button. use apply to whole animation.

    also, on the origin point, click it, then right click origin point. set it to middle. and then right click and set it to apply to whole animation

  • i got it to work. i load the json into an array

    then, i filter search for values like you suggested. and just add them into a new array with all x data

    though i would post it, in case anyone else wants a visual example

  • so i have data on x axis that stores hero type, level, star, awakening.

    and the y axis holds the different heroes

    0,0 is type 1 1,0 level 100. 2,0 5star

    0,1 is type 2 1,1 level 50 etc

    i want to sort them so level 100 is first on the list

    i saw the sort function, and the reverse function to do this

    but. this is only sorting a y axis.. like all the levels. so 100 first 99 second. the type/star/awakening all remain in the same order on their own y axis.

    so if i have a

    1,10,5,0

    2,100,10,3

    then i end up with

    1,100,5,0

    2,10,10,3

    i need it to sort all colomns based of the y "level" not just sort the levels leaving the other values in the same place.

    thanks. hope i explained it well. ill continue to look online for previous examples

  • yeah. it works perfectly.

    array.at(curx,cury) just wasnt pulling the right answer.. and duplicating instances..

    doing it from a manual loop, everything works no problem.

    thanks for advice

  • good shout. running it as a loop that just reads values from the array is waay easier to keep track of

    i was getting all sorts of problems other than just setting a text