heromedel's Forum Posts

  • It seams that having a map reveal or fog of war that is limited by walls is difficult for many people in construct 2. I may have to make a temporary work around by revealing walls that you are one tile away from even though line of site would go much further into the room or down a hall.

  • Oh, well I think that having a timer every so many seconds would work but maybe this would help more.

    https://www.scirra.com/manual/103/sine

    I'm not an expert with sine behavior but I believe it can do exactly what you want.

  • I believe there is a timer object or behavior that might help also you could use system every x seconds.

    Not sure what method would work best for you but when I do random movement for enemies every x seconds works for me.

  • I'd probably use 8 directional movement and then compare the touch.x to the object.x and if it is was not equal have it simulate movement. However in my game I made like this I believe I decided to not want it to go to the dead center of the object so I used two vents to check if it was greater then object.x+32 and a second event to check if it was less then object.x -32 or something along those lines.

  • I know I'm probably handling this in an inefficient way but, to make a map discover-able I am using dark sprites that are destroyed when in line of sight.

    The problem is that if the dark sprite is above a wall it does not reveal the wall.

    I tried having an event like

    if wall is in line of sight and overlapping darksprite then destroy darksprite.

    But that didn't work either. So a solid wall blocks itself form being in line of sight.

    Any recommendations on how to proceed. Everything I find online seams out of date or based on construct classic. If I could just remove the darksprite above a wall in line of sight i'd be set.

  • Looks like your question has already been answered but what I would likely do is use

    system - create object - x = random(0,0) y = random(0,0) and then replace the 0,0 with whatever space you want it to spawn in such as x = (0,680) y = (580,680)

    then I would either have it repeat 10 times or I'd just manual copy and paste it a few times.

  • Yeah I figured it our using load from url and then just typing the filename of the imported file. But I still wish I could just use a load action from the array like array.load json and just skip the ajax thing completely. But oh well.

  • I recently had an issue with this although not with audio files. From what I found auto import will import all files inside the folder named "files" that you will see if you are working with a project folder instead of saving as a single capx file. But it does not import from subfolders.

    So the same folder that your project icons are inside of.

  • Doesn't Array.Download create a json with the arrays current values. or are you talking about something else?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well I found that if I use the ajax request url instead of load file that I can get done what I wanted. But I still dont understand why ajax is required to load an array from a file but oh well.

  • My guess would be to set the events that connect to the signaling server into a group, then have the group get deactivated when you select single player. If the host never connects to the signaling server then no one should be able to join.

  • Ajax isn't going to work for me since you have to import the json file and pick it from a list.

  • I have found a method I like.

    What I have ended up doing to fit my movements needs for tile based movements is..

    I use two objects one is the real object the other is invisible like a shadow. When push an button such as right arrow the shadow jumps to the new position and checks for overlap or collisions. If none are found then the real object moves to the shadow. If a collision or other problem occurs the shadow jumps back to the real object and a message such as "there is a wall" can be played or if it is an enemy then an attack can occur.

    I even use this for my wandering enemies if they move in a tile like way. Though I am going to have to work on better path finding for enemies.

  • Why do I have to use ~ ajax request 001.json and then ~ load from ajax.LastData

    Instead of just ~ load from 001.json

    I have tried to have the array just load from json but it seams to remain empty where as using ajax fills my array correctly.

  • I was playing around with bullet behavior and chasing a moving dot that would be invisible but that led into a lot of probles such as missing the coordinates and flying off screen.

    I will check out the links.