lareviera's Forum Posts

  • so i have a weapons spreadsheet(array) that has two numbers for attack damage: min attack damage, and max attack demage.

    im trying to get a random number between the two , but not succeeding.

    i tried whats bellow but it gives me an error.

    any ideas ?

  • update to anyone who might be having the same question

    it WAS working with the original expression subtract from:arr_weapons.At(weapon,1)

    however it was giving the NaN error because firstly on one csv spreadsheet i had no values in the cell\array, and on the second try...wait for it... i put O instead of 0 xD ( thats O"letter" instead of zero xD "facepalm"

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • yeah its workin , but another question arises, how do i add or subtract from the array.

    i tried just subtracting from the column and but it gives a NaN error, wich i read has to do with adding or subtracting strings from numbers and i have to convert the string to int. i tried whats below but, its not working. where am i going wrong

    thanks for the help , im a total noob when it comes to coding.

  • oh wait i figured it out why it wasnt working with the fx animation...because in the spredsheet the fx ID didnt match ? i think that was it

  • The other data is at a different Y. So using what you have now, array.at(weapon,0) is the weapon name. array.at(weapon,1) is the next column of data.

    thanks for the fast reply,

    i did try that with the fx, i put diferent animations into fx and also named them ID_"number"

    so as i changed the weapon variable number , the fx number also changed.

    so the expression was :

    -fx2 set animation to "ID_"&arr_weapons.At(weapon,1)

    but it didnt work :/

  • so the problem is, im trying to use a csv spreadsheet thats is a weapon database, with information like weapon name, attack dmg, element type, and fx that go with it.

    i need a way that on weapon selected, i can get the current equiped weapons´s other stats, like attack dmg and fx etc. and use it somewhere else with just one expression.

    below is where i cant get at.

    right now i can select the weapon name at x with a variable.

    and even change the fx with the same variable(although im using an object, so its easy), but how do i go about getting the weapons attack and other stats?

    for ex:

    weapon» on collision with enemy» subtract current weapon.array.at( something, something)...

    is this right ?

  • Looks promising, good luck with it :)

    thanks ;)

  • hello there!

    pleased to meat your aquaintence , im a small time poster long time lurker, and today im here to show you what ive been working on lately, i finally decided im gonna finish something for once, and by the gods ill do it !

    So this here is a demo of what ive been working on, its a hack and slash/beatemup/platformer, or maybe something else, who knows, anyways its about fast paced kicking butt and getting better stuff for kicking more butt and be the king of butt kicking muhahaha! herm herm ...now im am NOT a programmer ( if you cant tell from the bugs ) but i pick up stuff from here and there and apply it to my game, what suits it anyway, aand im also learning some coding along the way ofc.

    right now im struggling with the AI , cause i want the enemies to be smart...i know...why would i do that ? go figure...and making those guys learn how to avoid obstacles and pathfind to the player is giving me a headache, so if you guys got any tips ill be sure to send lots of hugs and kisses emojis

    apologies for bad framerate, the game is much faster.

    *DISCLAIMER*

    obviusly this is work in progress so alot of things are place holders, now some of the animation FX i "borrowed" from other artists or games(i think it was just 2 or 3 things honestly) but of course those will be changed in the future, everything else is made by me ( animations and most graphics). oh the music is not mine either.

    Subscribe to Construct videos now

    youtube.com/watch

  • I haved used the implementation in my #c3jam entry here: http://www.newgrounds.com/portal/view/694088

    There are 3 enemy bots in the game that use it reach a target platform.

    hi there, how did you accomplish this AI? and are you ok with sharing it ?

  • hey thanks for the reply

    turns out i didnt have a searching distance for the droid set up correctly, where the X > 200 to search and X<200 to attack, so there was a conflict

  • hello , im restarting to play with construct a bit more serious but ive run into a problem i cant figure out, maybe someone can help me

    im doing a platformer beat em up

    so the problem is, im writing my enemy AI (droid) and whenever he stops by the player with movetostop he should perform the attack animation, but hes not. he just stands still like in pause, but if i move away he resumes the run animation. heres my code

  • cool,i was asking more about , how , or what steps did you take to make the character pick up the weapons in the array.

    i can make an array and put my weapons there, but how do i make it so i can pick up my weapons from there ?

    is the variable cweapons connected to the array somehow?

  • hi there !very coolman

    did you make this work with an array ? can you explain to me how ?

    im triyng to make a weapon database like you that i can just select the weapons from, but i cant see how

  • hi there ,my first post here

    for starting, im quite new to construct and programming, but im falling in love with it.

    i have searched quite extensively on the forums for something similar, but have come up short, so my last resort is to post.

    on to the question at hand,

    im making a platformer, and my character has a melee attack

    i want that attack to affect an object with impulse depending on the direction im facing, similar to knock back but with physics

    as of now im able to apply impulse on the object, but it only goes one direction independently if im at its right or left.

    i saw someone sayng this, but i cant seem to figure out how to add it

    When the knock back happens check the players X position against the enemies X position. If players X is less than enemies X do the knock back from the bottom right of player. If the enemies X is less than players X then do the knock back from bottom left of player.

    any help is appriciated