allowiscous's Recent Forum Activity

  • Is there anyway to add an instance based list of obstacles to a pathfinding behavior? I have an object that wants to avoid objects of the same type, but because it is the same type as the objects it wants to avoid the pathfinding doesn't work properly.

    Thank you.

  • Thank you, that makes sense. See, I was proud of my code and didn't want to ditch it, but this does make sense. I assume I can use a for (ordered) loop to get the lowest number? Then I can assign order with another instance variable, perhaps...

    Ah well, I think I can work from here to get the desired affect. Thanks.

  • So I have this array. It grabs the UID of an enemy in a specific range, then uses that UID to find the distance between the enemy and the player. Now, I want to sort the data by the distance so that I can grab which enemy is closest to player for further use. I don't think I'd be able to sort by the second column, but I can't figure out how to edit the code so that the distance comes in first before the UID, as the UID is used to grab the distance and assign it to the correct row. Is there any other way to grab the lowest number in a series of columns?

    Here's the code

    Thanks for the help.

  • hi. i saved my construct 3 game, and closed the program. i'm attempting to open it, but the program is giving me an error; 'Failed to open project. Check it is a valid Construct 3 folder project.'

    anyways to fix such? also, if that's not possible, how can i import the event sheets, sprites, and layout from the files in the folders?

    EDIT: tried changing the extension around, no luck. i opened it in a text editor as well, and it doesn't seem awfully changed. not that i would know the nuance, but w/e. it's a c3proj file

    EDIT2: this may or may not be relevant, but it may be wise to take a look at the brightness effect. i added it to my game, and oddly enough when enabled it acted as the effect that flips the game vertically. i say this may be relevant because i saw that project files may not open if there's a conflict in file names within them (someone mentioned renaming their layout caused issues), and if the brightness is acting as the vertical warp effect that may have some relevance. just a thought.

    EDIT3: another edit, because edits are good. i attempted to open the file in older versions (and newer versions, lol) but no luck. apparently i am running 142.2, (which is 142.3, technically)

    EDIT4: https://www.dropbox.com/s/fss2l1s280rm3lv/proj.zip?dl=0 here's the project. help :v0

    EDIT5: cross-posted to relevant location https://github.com/Scirra/Construct-3-bugs/issues/2820

  • No workarround needed.

    You can do things (actions) with a newly created objects, either right after the creation or in the 'on create' event.

    You can NOT read things (expressions) from a newly created object until the next root-level event.

    Picking depends on expressions (by UID is the only exception), so you can not pick a newly created object until the next root-level event.

    You set the instance variable explosion.size to 0.5. Thats is possible, as said, its just an action. But read that variable is not possible until the next root-level event. 'On created' just runs as it is on the same time and place as the creation action. So it is no new root-level event.

    How to do this the easy way? And that is not a workarround, that is just how things go.

    Give the sprite an instance boolean 'JustCreated'.

    Right after the creation action, set that boolean to 'true'.

    Now just a totaly new event with the condition (root-event) ..

    Condition > Sprite > Is boolean instance set > 'JustCreated'

    Action > set 'JustCreated' to false.

    Action > anything you want to do with/read from the sprite.

    So that works, but now whenever the explosion sprite is spawned it there is a slight delay until the variables are updated, and thus a slight delay for the visuals as well. This, quite frankly, looks awful. Any other ideas?

    EDIT: Actually, I came up with a workaround. I set the explosion to be initially invisible, then when the instance variables were to be read I set it the explosion to be visible. Thanks for the help up to this point!

  • Because set scale to explosion.size happens at the same time as the object is created, before you actually set size. So it will be scaling at whatever size was before you set it to 0.5, the default value.

    That's what I thought. What's a good workaround, then? I'm trying to make it so that whenever I spawn that sprite I can specify it's size as well as a few other things.

  • "explosion.size" gets set to 0.5 (in game), but the scale doesn't update on spawn. Why?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Great, thanks for the help. Though, can you tell me the significance of using an offset of five for the proximity checks? Seems arbitrary, but it works.

    EDIT: oh, and i just noticed that doors occasionally spawn in the corners of the room which is illogical considering the player cannot reach it.

  • here

    thanks for the assistance btw, it is appreciated.

  • Event sheets are read top to bottom, so if you use on start of layout then you need to make sure that your room is created before you look for overlaps to create a door. All events will be checked each tick (depends on your monitor rate, but usually 60 times per second) so if you don't have a trigger once or other limiting condition for something like this then your walls will be checked a lot... Also, because of the way that events work, you don't need the for-each loop as that selects each wall in turn and will create a door for each one that meets the or group criteria.

    Yeah, that's what I figured.

    So... remove the for each loop and move the overlap check (events at line 2) and put them after the create room events (line 7 / 8) under the on start of layout.

    That doesn't work. Instead, not a single room is generated. I'm thinking it attempts to generate it, but unless I get very lucky and RNG lands on the 20 or so applicable squares out of 1,000 possible I wont be seeing it.

  • I'm looking to create a random dungeon generator, but being new I've hit a snag relatively early. So far I generate a room, and want to pick a single and random wall that is touching said room. However, all of the walls that are touching the room generate a door instead of only one, and do so in an (understandably) ordered way.

    Also, using the "at start of layout" condition causes no doors to generate at all.

    Is that enough information?

  • The character designs are great! I'd love to see those animations, how about a gif?

allowiscous's avatar

allowiscous

Member since 8 May, 2014

None one is following allowiscous yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies