Squish's Forum Posts

  • In a complex layout, I find that sometimes I'll accidentally drag something or I won't know for sure if construct has acted in the way I was expecting

    What would make this easier would be a message log of each action that the user has taken (eg.

    Sample contents:

    (Events) Move Group "Blah Group"

    (Events) Delete line (54) - "When Red is overlapping blue"

    (Layout) Move object <objectname> to (x2,y2) from (x1,y1)

    (Events) [Line 12] Completely screw up action that previously worked

  • I've been having some difficulties with a plasma object, and instead of trying things one by one and patiently waiting for the preview to load, I created this:

    Use it to fiddle with plasma settings in real time.

    Updated:

    http://www.mediafire.com/file/bkv83tah2 ... menter.zip

    Limitations:

    I wanted to have controls for Filter colours, strengths and cut-offs, but there are no actions that I can use to control those values (yet).

  • Thanks for the speedy reply.

    I've actually been toiling with arrays and through a combination of determination and experimentation have worked them out and created an actual working table.

    I'm sure if I didn't post here it would have never happened.

    Anyway. Even if my approach is probably messy and needlessly complex, it works nicely. I'll post a tutorial in a few days, if I can make it legible (especially to newcomers).

    The next trick is somehow applying some obfuscation to the saved file, such as encryption.

  • Davioware - THAT should be in the FAQ.

    I ended up manually tracking and replacing an entire set of (lots) of globals when I had the number bug. Gagh.

  • This might be useful, despite thread necromancy from 2008.

    Sigma is the Standard Deviation for a Normal curve. For any given normal curve (shown in that linked picture above) there is a standard deviation where ~34% either side of the mean (peak) will fall.

    There's a great picture on the wikipedia page:

    http://en.wikipedia.org/wiki/Normal_distribution#Standardizing_normal_random_variables.

    Normal random vs ... typical random.

    If you drew a normal random from 100, you are equally as likely to get 2 or 98 (each is 1/100 chance) as you are to get 45, 50, 60, 73 etc. With a normal curve, the further you are from the mean (50), the lower the chance of that number appearing. So, 2 or 98 will occur very infrequently (~1%) and most results will land around the 50 mark. If your sigma is larger, then the curve is flatter and in the 1-100 example, there will be a greater chance to get numbers between 30 and 70.

    This is a really cool feature, although I haven't actually found a use for it yet.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Keywords: wrong event, event triggers, spawning incorrect

    By somewhat pot luck, I found an odd bug with the for each loop. I don't know if it's a bug with construct or not - and I don't know how I'd go about testing it.

    However.

    If you have a for each object, and no other condition in the even, and a subevent below that (with or without conditions) it seems to cause weirdness. I mean wierdness because everything will seem to be fine. For example, In my stationary gun game, every 5-10 shots an enemy would spawn right as the bullet spawns, often with a strange angle (there are absolutely no events that ever set that object's angle). However, the bullet does have an angle set. By luck, rarely one of the enemies would survive being killed by the bullet - perhaps because the collision event was missed or something.

    Ok so like this:

    On left button

    System - create a bullet at gun's "bullet_point"

    Set bullet.angle to gun.angle

    etc

    Why is it spawning an enemy? Dunno. But it seems that the spawn an enemy event gets crossed up with the bullet spawning process, even though those events are well separated in the event list and share nothing in common other than a collision event.

    After discovering this oddness, I went through backups until I found one where the problem wasn't occurring. I then one by one transferred any new events to the layout (tediously) and debugged each time. That's when I found that the for each was causing the troubles. I replaced that with a more sensible condition and I haven't seen the problem since (Well, actually once but I immediately realised what I'd done).

  • After many long sessions and hours of tedious debugging, I'm being screwed by the simple problem of creating a high score table. I don't even want to get into details about how to move the landed troopers because it's an insane headache of (probably) sloppy code that somehow *just* manages to work.

    I found a tutorial high-score table somewhere in the forums, and although it's rudimentary it pretty much works. The trouble is when I try to adapt it to be a little slicker. Eg. If the player doesn't put any text into the input box - play a "deny" sound.

    On top of that, having the enter key pressed *while* the cursor is inside the input box (instead of only being able to press a submit button). And then there's the loading from disk and sorting the table. Ideally, I'd like to use something a little prettier than the listbox. Being no kind of game programmer, I simply do not understand hashtables and arrays (yet) but a tutorial would make for an excellent primer on how to accomplish this.

    For once, I'd like something in Construct to be actually as easy as it seems.

  • I was messing around with this because it seems quite intuitive.

    I *think* I fixed your problem:

    <img src="http://i37.tinypic.com/1euec9.jpg">

  • I used a similar cooldown variable in a game of mine.

    It's one of the first things I actually got working properly in Construct.

    (I use 10 ms and multiples of 10 because of that warning that the milisecond rate isn't accurate

    so cool_down = 100 means 1,000 ms.)

    Trigger (eg Left mouse is down):

    [subevent]

    spaceship.value('cool_down') equals 0: fire BFG (or a loop subevent to fire 100)

    Set spaceship.value('cool_down') to 10

    Every 10 miliseconds

    spaceship.value('cool_down') greater than 0: Subtract 1 from spaceship.value('cool_down')

    If you hold the mouse button (or whichever condition you set), then each tick it checks the cool_down. If it is not zero, then nothing happens.

  • I may have run into a similar kind of error as yours using functions.

    I worked around it using what is probably a dirty trick, but it works beautifully. Instead of calling the function directly, I have a global (or holder sprite) variable set and then use that to trigger a new function next tick. My problem was with Selected Object Lists causing hassles. It wasn't something that could be fixed with "Forget objects", and I can't remember exactly why now, only that it worked. :p

    SomeEvent: Action: Do stuff, set global variable Schedule_SomeFunction=1

    Always

    Schedule_SomeFunction=1: Call Function "SomeFunction"; Set Schedule_SomeFunction=0

    Alternatively, a variable holder sprite/box can handle all the private variables and won't clog up your app/game with globals.

  • Rebuilding the layout at runtime can be an annoyingly complex thing to do. Eg. If I have carefully placed all the multitudes of sprite objects used for specific detection, triggers etc. then having to handwrite all those x,y coordinates is too much of a task.

    All we really need is a "reset private variables" action, and even "reset global variables" if we're being greedy.

    Eg. I have a game that goes

    Splash (sort of) -> Title -> Game -> (return to title)

    It would save me a LOT of work and bug testing to simply reset variables in the layout on start.

  • Is it at all possible to suppress the Count error message? It's annoying as hell. It would be nice to have a toggle, because it's value is obvious *when* you need it to check for you.