Gearworkdragon's Forum Posts

  • hey dude I am trying to make some simple rpg as well and i was wondering have you gotten the old fashion rpg like every so level you gain an ability and have an ability chart to refer the ability to cause I am scratching my head here. there so much coding for this part its insane.

  • well after fiddling around with teh system pick like what you suggested. I found a much easier method and it clean up the code correctly im sure i got way too many event but what ever work as long as it works lol.

  • Ok im trying to set a location for my arrow to a particular object

    The object has a variable that is = to the arrow variable

    And basically I want something like set X position to Object.variable.X Is there a way to do this code right ?

    because this will be a anchor style and the main game Is bigger then this layout layer which is global anyway.

    I just want the game to auto find the X and Y for the object variable and I d like to do this in one line because there will be multiple objects

  • isnt the trick to it is just increase the powerload to the light to higher then the normal rated that the code is at?

  • Why not have all tower in a single sprite Frames or animation and have if sell change the frame or animation to the empty slot. and have a variable that tell which tower it is. Instead of creating mulitple tower just have it all in one sprite and place it on the board.

  • just one to note watch your group event if you ever do because just an hour ago I almost lost my wits when My code wasnt working at all just to find out i accidently place a Group under a onstart condition ....so be careful when using groups.

  • Hey Maukka I was using a test mini example and I came across some thing funny. So for this example i used array 2x2 and used 0,1 and 1,1. I set the 0,1 to Name and 1,1 99. and i added a button with a text variable = "Name".

    apparently even if you use Button.variable in the Contain value array condition. The Array doesnt see the Button.variable="Name" but rather see the value as plain Button.variable.

    So then I tested a another theory that if the array at 0,1 has value Button.variable it now reads it. Can anyone explain why this is happening. I mean the Button text variable is the same value as the array but the engine doesnt reads it as that way ?

    NVM the " " on teh name for button.variable is what prevented it...silly me bad habits

    Ok i found it It was in the loops.

    for each x,y + currentvalue=variable -> set variable to CurY This was it and thx you Maukka Ill use your techique as well.

  • ummm ok how about is there a way to get a value coor then like say if Name is in the array at 0,1 How would I extract the value coor Y number only which is number (1) to be use with the variable coor speed.

  • Well since the names are going to be Unique and I realized that using variable in your sense would work alot better.

    So If i use like say Selected = indexof (name) and use a variable like array.speed

    How would I get the program to check for the index(name) is equal to a Y and then add that with array.speed in a X,Y coor so that its comes up to Finding coor value of 3,1 ?

    How would i code that ? because later in the code I am going to use Level to multiply or Add value to this base value

    such as once value is found this is base value of level one and then once you level to two I will have it increase by 2 or so on and I would like to keep this array that i am working on to be only for Base value of level one And I will use this to determine the stat of enemy and your own player. and Yes I will have another Array for player and enemy value.

  • Ok so i create this Array and It will evolve to a large array. The Array Width is 6 and Height is 2 and Depth 1.

    I have it set up for all in the Width value in order starting from 0-5 Blank, Hp, Power, Speed , Type

    And for the height in order from 0-1: Blank, Name

    Now I want to create a system where instead of using X,Y value I want to do something like Get value at "Name","speed" because like I said this will be come a large array and If i can get away with doing Name, speed it would drastically reduce the time of finding the code and have a function to check value of name and then power and have it running on checking the value = value instead of IF 1,0 or 1, 8 you can imagine how bulky the code would be.

    I just cannot figure out how to access a function to would allow me to use the name as a trigger finder and the stat for easy picking

    Because I want to load itself into various variable holder for use in battle to pull from or to view it.

    Or am I doing this wrong.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • also the Z order as well Sometime the player can be well under the z order of he wall.

  • Sound like you want the enemy to haunt the player. I done something similar but it was for a menu based. Try this have a sprite_holder to anchor down now put two variable Self.X and Self.Y

    run this if sprite_holder is on screen set its X and Y to the variable. Next for the enemies you want to Set X position to Sprite_holder.self.X Im guessing to put this also If enemy is on screen.

    What this will do is that since Sprite_holder has an anchor behavior It will keep its spot relative to the game window. And there by you will alway have the X value already in place with the variable so that you can pull that X value to be used for the enemy to know how far away and you can use the Y too for the left n right only.

    Note this will work for only Up n down or Left n right.

  • have you tried making a sprite make it 10px width and height. Input a variable 'Enemies_count'. and put the number of enemies in it.

    when you destroy enemies -1 from variable 'Enemies_count'. And then run an event like this 'Enemies_count=0' and do what ever action you want to do.

    And if you want something like a specific item to spawn after two and not that third one are killed then just make another variable Item_Timer

    and run the same action of -1 again for on destroyed.

  • Lol those global are hard to keep track of.

  • I cant use that origin in the middle because it will throw off my snap to grid and my other sprite for the Grid 32. this isnt the issue with Origin point. Even if i were to put it in the middle it wouldnt change the fact that its way off its location mark of where to anchor.