Heroes4hire's Forum Posts

  • this is what im going for:

    so far. i have click 1 complete. click a tile. change the floor tile to a room tile, and spawn in a new tilemap overlapping the room tile.

    now im on click2. check for neighboring rooms. no problem, just x-1 to get the tile im checking. now i know there is a tile next to it. i can expand the tile map width... selecting the specific tile map is a concern. any ideas? even if its on spawn set a variable to the 1st click tiles x,y

    click 3 will get a new tilemap as a new room

    then

    click 4 will see there are 2 joining rooms. and will be tasked with deleting the tile maps, and expanding one to include all the room tiles.

    ah man... ill take a break and do some physical activity. im new at this and there are too many layers of planning.

    even if you know what this process is called, so i can look for guides, it would help. thanks

  • i want to be able to tell how big a room is, which can be built on a tile map.

    i thought flood fill would be an easy copy paste job... it may be.. but im looking at it without a clue what the terms are.

    loopindex("X")

    tiletopositionX(loopindex)

    for sure ill have a day on reading about it tomorrow. but if anyone can give me a brief introduction. not only would it be a huge step in the right direction, i could probably use it in multiple situations if it does what i think it does (how, i have no idea)

    howtoconstructdemos.com/flooding-a-dungeon-tilemap-capx-construct2-construct3

    is the flood fill example i am looking at

  • tested it. nope. as i thought. it just loops the gold adding to total.

    and.. that was just for one gold pile.. total just steadily climbs.

    hmm.. maybe i need a trigger, like gold added, or gold spent to set off the loop from 0 everytime.

    was hoping there was a simpler method is all. mostly as im about to flood fill tileset to get room sizes, so anything i do now may need to be redone

  • it checks a position on a circle around the block.

    in effect they pick the closest place they can go to from any angle. its for finding the path.

    distance(imp.x,imp.y,block.x,block.y) < radius is good to activate the digging when they are close enough. but, i just assume they are close enough on arrived, and rotrate them to the block on uid check to start digging.

    im getting them to walk to a block that is a solid. so its x,y coords are impossible to get to and i had to use radius

  • scale rate, perfect thanks.

    hope my simple questions arent annoying. its just things i make notes on and ask before i sleep

  • i was explaining loads about midpoints to work out where the box should be.. but..

    just make a box follow a group..

    can the box stretch? does the box have to interact with anything?

    you could just have each soldier in the hoard have a line between them.

    it would be a square.. not a solid one

    if it needs to be solid, there are ways to edit a tilemap using a brush that gives it a solid shape. that i know very little about, but did notice it as a new feature to c3

    let me know if we were on the right tracks with the square being at a midpoint. for can do it with hierarchy, as you can work out how many are in the hoard as you can count children

  • i have gold, it gets put in the treasure room. it tells me how much gold is in a pile i can pick up the gold, and drop it, it maintains its value. and gold stacks when overlapping.

    but, i want a total owned gold figure.

    i need to check each goldpile.goldinside that is overlapping a treasureroom; and add it up.

    any ideas on how i can check for total gold owned?

    i thought about for each goldpile. set GOLDinDungeon to goldpile.goldinside+GoldinDungeon

    but, will that only work once? do i need to make a function? and call it every time gold is added to a treasure room?

    any thoughts, or easier ideas are welcomed. thank you all

  • never tried it, love it. perfect thanks so much

  • i thought that was the whole point in the hoard box? to check the number of zombies inside!

    test it by having it static, and add zombies to it. to see if you can get it to count.

    then all you gotta do is set its location to the mid point using the math.

    thats the aim right? have a hoard box so zombies behave as a whole, then when 1 leaves the hoard they can act indipendantly.

    but whatever. was just trying to help

  • "i could use dictionary and insert a name line by line. then random(1,30) on the x axis."

    is what i said. but you cant insert name line by line in a dictionary; i used the dictionary to store up to 8 values on picking up creatures to memorise their name and hp. so on dropping them i just spawn a new one with the same stats and name.

    i meant array.

    *i could use *array* and insert a name line by line. then random(1,30) on the x axis.

    * sorry if i confused the matter!

    i havent stored anything yet. wanted to know the best way TO store names.

    using an array, ill have to individually put in the names.. and.. its 30 names for imps.. each creature will have 30 names. so ill have to add hundreds of individual names into an array. possible.. but oof, that will take a day just to do that.

    is there a better method to add 30 names, per creature type? like clipboard, where i can just type out all names, and pick a random line of text.

    not a hard task, just wondering the most efficient way to do it.

    ty as always lionz

    the effect is. each creature will have its own name

  • yeah, ok. i hope i see what you want.

    box to follow the hoard (who is in the library. and to stay middle of the hoard. so when some leave, they are removed from the hoard.

    cos(B-C):\cos(C-A):\cos(A-B)

    one way of getting the centre of 3 points (triangle)

    but, thats just one way.... i think its the best, as it doesnt care what type of triangle it it

    omnicalculator.com/math/centroid

    (this website has a ton of math that you could try)

    Gₓ = (x₁ + x₂ + x₃ +... + xk) / k

    Gᵧ = (y₁ + y₂ + y₃ +... + yk) / k K is the number of zombies. G is center point

    this is the simplist i could find to get a center point for more zombies.

    so, that should find a mid point constanly between all zombies within a hoard.

    wow this takes all my time. i pray this works and i understood what you needed lol

  • yeah, on created, you need to give it a uidcheck variable. the uidcheck is for an instance of a zombie's uid. most likley the leader.

    then it always knows what instance of zombie it is specifically acting to.

    *edit* or.. is that the problem, its always choosing the same zombie, and you dont want it to choose any?

    is it you want it to set a midpoint for all zombies?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • i have the layout scroll out with the mouse wheel.

    the hud doesnt scroll to this layout.

    sure its simple fix, but, great if i can get an answer so i can implement it tomorrow.

    ty all

  • ah yeah, i meant array. i used dictionary to store names on picked up objects.

    just seems like an hour of clicking and adding 1 to each event. but, if that is the best way im down to do it,

    ty

  • so. i want to store 30 names. then i want to call a random name on a creature spawned

    i could use dictionary and insert a name line by line. then random(1,30) on the x axis.

    but.. is that the most efficient way?

    could i use clipboard, local storage, file system: to achieve this easier?

    none of which i have experience on. so if i get the nod ill work on the favorable method.

    thanks

    Tagged: