Gearworkdragon's Recent Forum Activity

  • Yeah i get that but when i try to do that with the array it will alway use the first value and never the added math.

    so for your example it would just use Enemy.baseRange

    Cause my current not working formula would be something like after chosen level has been selected

    For each X/Y

    System compare two value which is alway curx = 1 cause there is one enemy at any given time for this formula

    But things gets a little hairy cause the first value is the name of the monster so id like to skip this and start on cury 2 and then move forward until Y9 and for each value id like to update it 2 point per level so Id would have thought it would be like set at array at X=1 and then CurY to (Curvalue + (2*Array,at(1,10))

    for example the forumla would end up looking like this 21 + (2*2) which would equal to 25 for level 2 and then 3 would be 27.

    Ok new update is that I can do it through just a simple math without using array callback and it did work but Why doesnt it listen for teh update math. One would think it would just be curvalue +number .....but apparently it wont even do that.

    Unless if function being weird that i have to include parameter for such simple math ?

  • Ok two question.

    One Is it possible to select a range of array to be update with a simple formula such as this array.curvalue+(5*level) and that level is in the array spot of 1,10.

    Ive tried to manually update teh array through a simple expression using for each x,y of the array. And then each current value to be +5 ....this doesnt work I do not know why.

    apparently the contruct two array value will not update through expression of math but just straight first value of what ever it is.

    And 2nd question is that Can I use the arrays in a way to auto update itself when leveled or do i need to make a shit ton of variable to be call back n forth like dumb pirates on a sea lol

    The idea here is that Once i update the array i can use the value from it for calculating the battle scene such as if you attack first check your own player power level and combine it with your own ability and then hit the enemy but wait let check the enemy array defense value to reduce the damg done.

    Ive done it before not using array but id like to do so in a smallish functional way without doing hundreds of events. So far with oosyrag help ive figured out how to choose the monster and have it updated the stats on the battlefield for a base stats but now i want to update its stats in relation to the chosen level.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I too would like to see this feature to be done as well. IT would make it really easy to control rpg games way easier rather then having alot of arrays just for a couple of variable

  • oosyrag Ok yeah ummm i feel dumb i just added another array contain value not equal to "blank" and you cant use Or block for it either has to be include as a whole condition.

    Btw is there a way to delete off the first value element so that its one width shorter, since it's just a location name and number Im guessing it would be delete an element to the front and how and where would i put it so that after its done with populating the array i can just delete off the extra element.

  • oosyrag when you say " array compare current Value != 0 ) How do i do this to include the "!" or did you mean "not equal to "

    Ok um it works but it still giving me the blank spaces in the randomizer array. ? Will i have to recheck the array and delete the last X axis. Or can i get it to stop just right before the blank spot.

  • oosyrag Your example is sorta almost to what i have in mind but What i have set up is one array to have all the location and their spawn pool monster.

    Such as this Route 1 | Slime | Bat | Cat |

    Route 2 | Slime | Cat | Wolf | Giant Turtle | Lion

    And those are in the same array just the X value of Route 1 is at 0 and Route 2 is at 1. I want to do a call back system where if i am on the section of the Map Route one. I have a global variable to include the area name Route 1

    and so id like the contruct two to quickly find in the array of the route 1 and use a random modifier to choose between Slime bat cat for route one but if i am on route two use the slime,cat, wolf, Giant turtle, lion.

    And my idea was to use something like to check the array on the X axis of the area name such as route 2 to add one variable count to the local variable pool to use so that If you are on route one the pool would be Four and id would just minus one at the end so that it would be three. So then Id would have contruct two to use the local variable Pool for the max number of monster to choose from and then it could just be ( choose (1- pool) ) and then next it would use that new chosen value to find the array monster in the function of [array.at]

    And then use that found and chosen array value to be use as the enemy in a 1v1 setting.

    And this would just be all in one function so that for every new route id create it would just be in the array so that it would just be me creating art and maps lol.

    But I do like your example btw can you explain the event conditions they are a tad confusing to know where you got your result to be like that.

    My main problem is getting construct two to find the right loop to check for the data and then set it to the local variable called pool.

    I hope this makes sense

  • or if you like you can use group for disabling certain event block from firing if you plan on returning to the specific event.

  • Function is still the way to go. You forgot to make a change happen before the function. Try this Mouse click , overlapping the Ligne then flip it's varable and then call the function.

    Because you just simply ask it to start chain reaction when the action hasnt started.

    Its like asking the water to jump but you haven't bump the table yet. Function is rather a weird cookie it behave smart but it need a push for it to call just right. especially the for each

  • If i may are you looping infinite or do you have a previous condition that would make them only move when the condition comes true.

    like a trigger event first or if you want you can slap it onto a function and only call it to be use when needed.

  • Hey this is exactly im working on but I have a question here as well

    Is there a way to do something like I have a global variable called location. and i have an array that has the row for each location and id like to do something like this

    " For each, data of [location] does not equal to zero then + 1 to the [pool]"

    And next id have something like Choose random(1-[pool])

    And then have it to where what ever number it choose it has the name of the monster and i can use that to pull the data for that monster alone.

    This is what Ive thought of but how do I write that as an expression for construct to use ? Because let say on route one there is only three monster but on "Route 5" there's ten monster. So in other word the [pool] can be 3 or ten

    I believe this can apply to levels as well ?

  • another thing to consider is that if you dont want a million set to array you use rexs cvs to array. Its basically an excel format with commas delimiter that the plugin can quickly build the array for you and you can just simply update the excel its great.

  • try Arrays its exactly what you want. Keep in mind there is 1d,2d,3d, style array.

    Read up the manual for the array. Just curious how large is this database going to get ?

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