Lumicreative.com's Forum Posts

  • https://dl.dropboxusercontent.com/u/73836006/animationStart.capx

    I have a player (8 direction), that should animate when overlapping an object, but the logic doesn't work for 'when overlapping, start animation, else stop animation". However it only works if I do 'When not overlapping, start animation'. What am I doing wrong?

  • Construct 2 seems to be able to export to Android using a wrapper around HTML5. Does anyone know what GameMaker uses to export to Android? Is it a wrapper as well or true native code? Since it seems to be able to export to all platforms, I'm guessing this isn't the case.

  • Top notch!

  • Looking forward to this. You have any flushed out character image gifs? Would love to see a sampe of the style.

  • Derock Replying to this old thread, but hope it helps. You should do that on LOS only. Then when not in LOS, do path finding.

  • RamPackWobble This is great stuff, but it doesn't seem to work when the tilemap has a solid behavior.

  • Do you guys typically use one array to store one type of item such as weapons? Or do you stack multiple types all into one array such as weapons, inventory, tileset, powerups, etc...?

    If you do use one array, do you use a token to split between different types?

    Weapon 0 1 2 3 4 5 | Inventory 0 1 2 3 4 5 6 7 8 9 | tileset 0 1 2 3 4 5 6 etc...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • oosyrag Ah, I see. It's just loading to array form ajax.lastData and then using the for each xyz element on the array to append to the global variable or text. Thanks!

  • oosyrag I usually do array load by doing, "AJAX.LastData". Since I am not loading any data through Ajax, what should I put instead of AJAX.LastData?

  • fr0z3n Awesome. hope it works.

    I would try this as well if it makes sense:

    node: Set d to distance(node.X,node.Y,Enemies.X,Enemies.Y)

    node: Set a to angle(node.X,node.Y,Enemies.X,Enemies.Y)

    node d<55: Move at angle: angle: 0.5*(55-self.d) distance: 0.5*(55-self.d)

  • fr0z3n Would it work to make the nodes move in realtime to avoid the defenders?

    BTW, my Beast Attack game is american football, but not in the traditional sense.

  • Is there a really clean and easy way to split ajax.lastdata to simple numbers in a global variable so that it looks like, "0,0,1,23,4"? Currently saving ajax.lastdata into a global variable looks like this, "{"c2array":true,"size":[7,2,1],"data":[[[1286],[885]],[[1605],[693]],[[1716],[903]],[[1643],[1033]],[[1842],[1015]],[[1940],[844]],[[1989],[974]]]}"

    What I'm actually trying to do:

    I'm saving all enemy positions (XY coordinates) into a json file. Then i'm loading that json file into a global var and using tokenat to retrieve the numbers to create enemies using those X,Y positions during loading of the level. Reason why I have it as a separate file is that I have separate json files for each level to build tilemaps, enemies, items, etc... This way, I don't have to have 100+ layouts to load each level - I can just load them on the same layout after each level.

    If there is a more efficient way to do this, please let me know!

  • I've decided that this method is useless for mobile. It takes nearly a whole minute to run through the loop. If I have more conditions and different objects, it would take a century to run it like this.

  • Magistross

    Yeah, realizing it freezes the game for 5 seconds while it runs through the loop. Figured out how to do it though:

    For "X" from 1 to 3000

    For "Y" from 1 to 3000

    If (Tile loopindex("X"), loopindex("Y")=8)

    Then Set tile loopindex("X"), loopindex("Y") to tile 19 Or create enemy

  • nimos100

    I think what I'm looking for is similar to ReflextionsDev. If I have a tilemap with grass, rocks, water and also have a tile that is the enemy, could I loop through the tilemap and look for all the tiles with the enemy and spawn my enemy object there?

    Reason why I don't just create enemies at X,Y coordinates is because I have the maps generated from JSON file and when creating a level, I can't see where I want to place my enemies (they might be in the walls). If I have a enemy tile, I can just draw my tilemap, export it, and load it in as a level in my game.