nimos100's Forum Posts

  • Ok think you misunderstood what I meant, I have no clue if that solves anything or not. I just found it weird looking, so just wanted to make you aware that it might not be the way you wanted it to be. But if things still seems to work, and the high score, which I assume that sub event had something to do with is still working, then its probably didn't hurt.

    But there are to much code for me look through and not a lot of comments to go with it. But if you say that it only happens from level 7-10, then you have a good place to start, try to compared the difference between switching level from 5 to 6 and from 7 to 8.

  • [quote:9jpygpi8]Also,

    nimos100

    , what did you mean by, "Except 11 because it looks a bit weird, "On start of layout" (Line 12) are link to "Active level 10" (Line 11) What is the reason for it to be link to that only, ain't all the levels the same in regards to the high score or?"

    I don't see any link on line 11 at all:(

    "On start of layout" in event 12, its a sub event of event 11, which seems a bit weird. it only apply when Active_level = 10?

    [quote:9jpygpi8]@samblack Hey, thanks for the help. Can you show me what you mean when you say, "have you delete the function part of lvl 10 when your were making the code."? I don't get it:( Can you show me what you mean?

    Sorry have no clue what he is talking about

  • If you haven't done the tutorials yet, doing those can be a good idea.

    Otherwise you can make something like this, its not a game:

    You have to make each circle from 1 to 4 go to the square of the same color.

    Rules:

    1. They cant touch the gray box in the middle.

    2. Only 1 circle must move at the time.

    3. The circles have to go there, not just "Teleport" there.

    If you can do that, you will be well on your way. As this involve a lot of parts that you would need to make pretty much any type of game.

  • [quote:2xvt35nr]I'm guessing the problem has something to do with choosing instances of an actor, as only the first actor instance gets checked for passability. Help?

    Your picking is fine for this, you just need to add a "for each".

  • [quote:2zk1r55r]But is it possible to add new frames on runtime and load a different image for all frames for a sprite object and then set the shown frame for each object?

    I cant test it right now because I don't have access to C2 here.

    I don't think you can add frames to objects during runtime, at least not what I can see, you can however add the amount of frames you need before hand so it matches how many you need. And then just use them if you need or make it so it doesn't apply them if you don't.

    Here is an example of how you can apply different images from URLs to your sprites. If you want to exclude some of them, you can change how the "Set frame" work in the object handler.

    You could do the same without the object handler, by simply move it to the create event.

  • you can do it like that, it will increase the size of your project since you have to add some kind of objects to the area, but that is to be expected.

  • I tried as well some time ago and couldn't get it to work correctly either, sometimes it would do it, but most the times it just didn't work. Never managed to solve it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here is how you can do it, tried to explain it more visually, in case Its a bit confusing.

  • While doing some research about how to create a dungeon generator I found this site. Which is really nice for people making RPG games, but in general it have a lot to offer in terms of ideas, especially if you are looking for stuff about how to do random stuff.

    There are things about:

      • Generate a random world map.
      • Generate random names for characters, events, taverns, etc.
      • Generate random quests, NPCs, loot, castles, towns, etc.
      • Generate a random world map with mountain, forest, and city hexes.
      • Generate a dungeon with random features, monsters, and traps.
      • Generate random weather, from clear to storms.
      • Generate random names for characters, spaceships, locations, planets, etc.
      • Generate a random star system, including primary planet physics, population, tech level, and other characteristics.
      and lots of other stuff.

    So thought that it could be helpful for a lot of people out there. Its really well made.

    http://donjon.bin.sh/

    (If it have already been posted here by someone else, then its here once again )

  • Don't think I have as well, except I do think it can happen if you manual go into the folder where your project is and start to delete files there. But doesn't sound like thats what you did.

    Yeah a screenshot could have helped, but if it was in the editor it self, it most likely something that should be reported in the bug section.

  • No you have ended up with the same picking mistake as so many others

    Every time you use an object, like you have done in the area I have marked with red, you do picking. It doesn't matter if it says "pick" in front or not.

    Rule

    [quote:7tdgzrfo]Whenever you use an object in a condition it will do picking!! doesn't matter what thing you are using, width, opacity, a variable or something else.

    So the problem occurs as you already in the Trigger pick one object which is the line that are destroyed. So now you have 1 object selected.

    So no matter what conditions you add afterwards, they will only be checked against this object. So you need to reset the picking. You can do that if you use the system action "Pick All Lines". That will Pick all lines regardless of any former conditions,

    From manual

    [quote:7tdgzrfo]Pick all

    Reset the picked objects back to all of them. Subsequent conditions will pick from all instances again instead of filtering from only those meeting all the conditions so far. See How events work for more information on how instances are picked in events. Useful in subevents to start affecting different instances again.

  • [quote:1gh9mew7]Best way is to build small things.

    What game you going to make?

    Does it need a welcome screen. Build just that.

    Does it need a options screen. Build just that.

    Does it need a character to move left, right, up, down. Do just that.

    Build your game in sections.

    Agree with Dutoit, another way that can be very useful is to grab a tutorial, like the Space shooter, I think its called. And change it, for instant see if you can make it so player can switch weapon, some enemies have shields which need to be destroyed first before the enemy take damage. The reason this can be a good idea, is because you are already building on a game, where you can expect things to be done correctly. So you have some guidelines to where you have to make you changes.

    Also I good idea is to make your own space shooter from scratch more in the way you want it, and if you get stuck you can see how it was made in the tutorial, and after a while you will look at the tutorial less and less, because you start to get hang of how things work together and your game might have evolved beyond the tutorial so it cant really help you anyway.

    [quote:1gh9mew7]I'm not really a programmer but I do know some html stuff a bit of css that's all. Since C2 is based on html5, do you think it would be a wise idea to learn html5.

    I don't think doing this will help you a lot, I would actually think it would confuse you even more.

    [quote:1gh9mew7]I'm still having problems with the proper flow of events, like when will one condition be a sub event, some actions stacked together those sort of stuff.

    Its a bit difficult to explain in a proper way I think.

    But try to look at it like this:

    Trigger

    <When something happens as a result of something else> (Sounds a bit confusing )

    But this is what you can refer to as a trigger, like if a person have a pistol and pull the trigger. The Trigger in this case is that the person have pulled the trigger and the pistol is firing.

    Condition

    <Something needs to be true or false> (This is just an If, Then Else statement)

    Using the same example as above, the condition in this case could be, that the person actually have a pistol, that there are ammunition to it. Could be that the pistol is not broken and so on.

    Sub conditions

    <Something needs to be true or false> (This is just an If, Then Else statement)

    Is pretty much the same as a normal condition, except that it works on former conditions to be true. And is more of a way to specify conditions and to make things easier to understand. So lets expand the example above a bit. Imagine that you have 10 people some of them have a pistol some don't, some have ammunition but no pistol. Some use energy weapons that doesn't require ammunition. If you try to throw all of them into one condition you will suddenly end up finding it very difficult to match these conditions.

    For instant.

    We want to see if a person can shoot, the requirements for this is that the person have a pistol with ammunition or an energy pistol.

    So we make the conditions:

    Person have a pistol (So this person should be able to shoot if he have ammunition)

    Person have ammunition to pistol

    Person have an energy pistol (So he can shoot)

    However now there is a problem. Because conditions are always "AND" statement. So all of them needs to be true. So in this example, we might have a person with an energy pistol, but since he doesn't have a normal pistol he cant shoot, because all the conditions need to be true.

    So to make it work, we need to break it down, and change the conditions to use "OR" instead of "AND" (Do that by right click an event and check "OR", so now it looks like this:

    Person have a pistol (So this person should be able to shoot if he have ammunition)

    or

    Person have ammunition to pistol

    or

    Person have an energy pistol (So he can shoot)

    So now the person with the energy pistol can shoot. However now a person that doesn't even have a pistol can shoot, but also a person without ammunition can as well. So clearly this would wouldn't work either. So to solve it we add a sub condition:

    So the first thing is to simply check that the person even have something to shoot with so this will be our Main condition:

    Person have a pistol

    or

    Person have an energy pistol

    Then we need to check if the person actually need ammunition or not, and since we are not sure if the person at this state is using a pistol or an energy pistol, just that he use one of them. So to check it we add two sub condition since the person can actually have one of each pistol:

    Person have a pistol (If this is true, then we need to check if there are also ammunition, so we add another condition)

    Person have ammunition

    If both these are true, the person will pull the trigger and fire the pistol.

    Person have an energy pistol

    The same goes for the energy pistol, but here the condition is just that the person have one, and if that's the case we fire that one as well.

    So sub conditions will to some degree come automatically as things start not to work, and you simply need them to get them to work.

    Actions

    <A change to something as a result of something else>

    In our case, when the pistol is fired the person will use one piece of ammunition each time they pull the trigger.

    Hope that make it a bit clearer.

  • [quote:dohcoijd]My guess as to the problem. Is like you said, over time the way speed works causes this separation. However I think it becomes an issue because the spawn rate is determined when an object gets destroyed. As things get faster, they might hit or detect a collision with the "end line" later or further away than they should.

    Yeah this crossed my mind as well, and might be the problem.

    [quote:dohcoijd]At least I think that makes sense enough

    It might very well work, please post the solution when you have solved it, would like to see it as well.

  • You are trying to stop something that is not there. In the "Stop audio" or what its called it ask for a tag, at the moment your tag is "". So for the background music just add a tag, can be whatever you want it to. And in the "Stop audio" you write this tag instead of the audiofilename and then it works.

  • [quote:28c7c1a7]Nice work. Looks pretty slick.

    I was reading up on the thread that explains why picking works this way now, and I'm actually confused.

    In the thread, it is explained that the object doesn't exist to same-level events until the next top level event. Then how come pick by UID works on our tests?

    Agree that it gets confusing, because its logic that you have created the object, so surely it must be there, but it actually ain't as explained by Ashley in that post.

    A solution also from that post is:

    [quote:28c7c1a7]The workaround is to try to do everything in the same event - nest the other events beneath the creating event if possible, so everything is moved up in to the green area.

    Which are the reason that you can create an object and right afterwards set its variables.

    Create object

    Set Object name = "Whatever"

    That also means that you can pick UID of the object if its in a sub level of the create function.

    But if you do it like this:

    level 1: Create object

    --------------Do something

    Level 1: Pick Object with UID of the newly created object shouldn't work.

    You have to reach a top level. (Now this post is from version r102, so its pretty old, but don't think a lot if any have changed.)

    However the common way of dealing with this problem as you most likely know is to throw in a Wait of 0, 0.1 or 0.01 or whatever as it will then go through to the next tick and force it to reach a top level or what to say and then it works. Im not really sure how solid this actually is, it seems to work well with simple stuff, but if it gets a bit complex it seems to not really work well.

    For instant if you have an event:

    Repeat 10 times

    ------- Call function("Spawn enemy")

    Function Spawn enemy

    Create enemy()

    Call function ("initialize enemy")

    Function Initialize enemy

    Call function ("Create enemy weapon")

    Function Create enemy weapon

    Create Enemy_weapon

    Then suddenly things starts to go wrong as I see it.

    Because now there are actually two objects that doesn't exist yet, The Enemy and the Weapon that you want it to use. So if you throw in a Wait different places to solve it, It might work. However at the very start we are actually repeating this 10 times, to create 10 enemies which will then create 10 different weapons, so suddenly you might have 20 objects that actually doesn't exist, and then it seems to go wrong. Whether that's completely true im not 100% sure about, but it seems that a function doesn't count as a top level, which I find to be logic if its the case, but I haven't seen anything saying that it ain't which is why im not certain.

    As I mentioned in my last post, I had to repeat it 5 times, but I did something similar with 50 objects using a wait, and it looked like it was working fine, however as I went through the objects in the debugger I could see that suddenly some of the objects would have "NaN" in some of the variables. Which didn't make sense as 95-98% of them had no problems and all different possibilities for this variable was used, but for some reason some of them just failed, and my guess it that since I repeated it several times, it might have screwed up with the wait somehow. So the only thing I did, was to move the function call to the Object handler, didn't change any code and none of them had any problems after that, same goes for several other mistakes that was happening. So I moved those as well and now all of them gets initialized correctly, without having to use wait, which I think in itself is a huge benefit.