ptw's Recent Forum Activity

  • Solved - or I at least have what seems like a jenky workaround. I have Construct writing to Sheet1 as a normal published sheet. Sheet1 then sends data to Sheet2, which is published as a CSV. Construct pulls/reads data from Sheet2. Vwala. I’m sure there’s a more streamlined way (like writing to a CSV), but eh, it works. It didn’t seem like there was much interest in this topic but if anyone needs clarification let me know!

  • I'm new to Ajax and its functions (and still kinda new to CS in general...). I followed a tutorial and made an app to store data in a Google Sheet (like a live scoreboard). Everything is peachy and goes to the designated cell. What I can't find is anything telling me how to pull that data from the Sheet back into Construct.

    I tried a tutorial that required that the Sheet be turned into a CSV file - but then I can't read/write to it at the same time (that I know of). My best guess is to have Ajax request the sheet and then somehow specify what data to pull using ajax.lastdata but I get lost there. Is there a way to specify individual cells?

    *update - after some digging I’m starting to see that CS can talk to Sheets, but reversing that requires changing the format of the Sheet - which can’t be done in real-time? Again, I don’t know squat about this so if anyone can at least confirm whether I’m right or wrong that would save me some headache.

  • Thank you!

  • I know this topic has to exist but I can't find anything through numerous searches...

    I'm attempting a Zelda-style game, but noticed when my player runs into an enemy, the enemy hits multiple times and takes huge chunks out of the player health. I'm wondering if there's a way to tell C2 when the player is flashing (indicating they've been hit) to freeze the health variable until the flash has finished? That kind of half-second immunity you get after taking damage in virtually any game.

  • Oh holy crud... I can't believe I missed that. Thank you so much for taking the time to point that out blackhornet!

  • I'm still new to Construct and game creation in general - keep that in mind. I started this project and got really into it but ran into issues with making timed events. I'm hoping someone can explain what I'm doing wrong.

    The game relies on timed events (e.g. System > compare time > 20 seconds > spawn enemy). I know using the sys > compare time sources from the time since the game was started -- which, with pausing, boss fights, etc. isn't going to work for my project. BUT all other methods I've tried for making a controllable (global) timer don't work. I get one of two scenarios:

    a. Enemies spawn in excess - I get a stream of 50+ enemies for the amount of time that the timer = 00:20 seconds because I'm only counting up by seconds

    b. OR the system won't recognize that the timer = 00:20 because I'm counting on a 00:00:00 system and it doesn't hang on "00:20:00" long enough for the system to register it (at least I think that's the problem)

    I posted before about this and the response was to use the timer behavior. I looked that up and everything I found was what I had already tried. If anyone has a couple minutes to explain to me in detail (as if I'm 5yo) how to create a reliable / controllable timer system I promise you I will finish this project. I find it extremely hard to believe that CS2 didn't consider this scenario beforehand and it's the only thing holding me back at this point <img src="{SMILIES_PATH}/icon_mad.gif" alt=":x" title="Mad">

    If you want to check out the capx:

    https://www.dropbox.com/s/bzyjgm3hgvryk ... osave?dl=0

  • So, I see you've solved it but I actually had this problem at one point and your solution isn't how I solved it. It could be a "tomato, tahmato" thing but this info may help?

    for every X instance > system > create object ___ > at [random (Z, Z), random (Z, Z) So if the trigger is pressing the space bar then, depending on your layout size and where you want the spawn, the system will create the item randomly between the two X coordinates, and between the two Y coordinates listed -- every time the space bar is pressed. You can also do a random trigger for the spawn: system > every random (1, 20) seconds > spawn bullet, etc. Sorry if this doesn't help at all -- not sorry if it does.

  • Use the Timer behaviour. It is a better mechanism for accurate timing.

    Thanks for the response - I read it, looked it up, and everything I found were things I had already tried. Not to be a complete n00blet but if you or someone else has a minute would you mind explaining the process in detail? I actually scrapped this project for 3 months but I'd really like to finish it.

    If it's any help / reminder - I can't use system time because you can't control that. With pause menus, boss fights, etc. -- it's not reliable. I've tried making global timers but it's either too specific (e.g. on a 00:00:00 timer) and it doesn't hang on "00:20:00" long enough for the system to spawn a single enemy OR it's too vague (counting up in just seconds and minutes) and the system will spawn a wall of enemies for the time that the timer = "00:20" If there's a built in timer function, I can't find it :/ I won't be offended if you explain it to me like I'm 5yo.

    Many thanks ahead of time (but not too descriptive of time because that would spawn a wall of "thanks"...)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have a top-down shooter where enemies are spawned based on time. I've created a timer that counts time since the start of the layout - since game time isn't reliable after you've died or moved levels, etc.

    The problem I'm getting is I tell the system to spawn an enemy when the timer = 20. If I set the timer to tick up every one second, then it will spawn like 50 enemies because of the length of time that the scenario is true. If I set the timer to count up by tenths or hundredths of a second, then the system won't even register 20.00 seconds and nothing will spawn. I've messed around with half seconds, quarter seconds, etc. and there doesn't seem to be a sweet spot. I either get a stream of enemies or no spawn.

    The odd thing is that if I use game time then it's flawless. I say spawn at 20 seconds and it only spawns one sprite. Also, game time doesn't sync up with any of the timers I've made, it will hit 10 seconds when my timer is at like 6.5, even though they're both counting up in seconds. I feel like I have to be doing something stupid. Please help!

  • So, I've seen a few posts touch upon random spawning but it wasn't quite what I was looking for.

    I'm making a top down shooter (think 1943) and upon an enemy being destroyed I want them to randomly spawn either a power up, health, or nothing. Ideally (if it's not too crazy) I'd like to have control over, say, the likelihood of power ups that are spawned per level. I've gotten to the point where I can make the spawns seem random - but I know they're not and it bothers the crap out of me. I also fee like I'm taking the long road to get there by doing instance variables on each enemy that tick up every time the enemy is destroyed. When the count = 4, spawn object, etc. There has to be an easier way!

    Any help is appreciated.

  • korbaach - YES! Still took some tinkering but man... I never would've thought to do frame*90 to get the angle. Genius. Thank you so much!

    https://media4.giphy.com/media/VgNQdejHFZJdu/200.gif

  • So I have a top down 'bullet hell' game that I followed one of the tutorials here to build. Worked great at first until I added character selection (player animations) and corresponding bullet animations.

    The player is 4 directional but naturally only shoots bullets to the right. When I add something like:

    right arrow down : set bullet angle of motion to X angle

    left arrow down : set bullet angle of motion to X angle

    It changes the direction of the bullet correctly BUT if the player starts off shooting right and then turns left, all of the bullets just shot to the right will redirect and head left. It's actually kind of a cool effect - but not what I want in this game.

    Like I said, when the player was one animation the whole thing worked fine but something happened when I added animations that threw it off. Any ideas? I'll add some more info below that may be useful.

    Character selection (ctr) is a global variable. Player is set so if ctr = 0 then load a certain animation, etc. Each animation has 4 frames for each direction that correspond to arrow keys pressed. I've toyed around a lot with bullet behavior and 8-directional behavior with no avail. The bullet spawn point is set for each frame to load on the correct edge of the frame...idk, muh brain hurts.

ptw's avatar

ptw

Member since 17 Oct, 2015

None one is following ptw yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies