lionz's Forum Posts

  • LOL the name, and the text on this trailer. Looks good.

  • Whatever he sent you in PM can't be too difficult, it's quite simple to set up variables like this. The Family becomes an object, instead of picking a single object you are picking from all the objects in the family. Pick random instance > sprite, or you use Pick random instance > family. If you're going to make a game with some complexity you should get your head around the debug mode and looking at objects to see what their current states and variables are, then you'll have an idea of what has changed and what is set as you expected.

    As an example, you have ships. Ship A, Ship B and Ship C are all in a family called Ships.

    Pick a random instance Ship A. That will choose one object, a randomly selected Ship A.

    Pick a random instance Ships. That will choose one object, a randomly selected Ship A, Ship B or Ship C.

    You select a Family as though it is just another object but really it represents all the objects within it.

    They are useful for when you want to sometimes group events.

    For example in this game, if you wanted to say :

    Bullet A can damage Ship A

    Bullet B can damage Ship A

    Bullet A can damage Ship B

    Bullet B can damage Ship B

    You put the bullets into a bullets Family and the ships into a ships Family and then it becomes one event applied to all :

    Bullets (family) can damage Ships (family)

  • As a standard they should all play and overlap based on that logic so your actual sound is probably cut off when it plays once?

  • Technically they are at the correct positions but you're scaling individual layers. If for example the police unit is on a scaled layer and the ground is not then it will look offset. Usually I use set layout scale for zooming, which scales everything together and avoids any issues like this.

  • Can't get to that file but I'm assuming it's because of the top to bottom structure of events in C2, where you've probably said if 0 set to 1, if 1 set to 2 so it makes the first event and second event true in order. You can add a small wait 0.1 secs before you set the variable if you want, this should stop that from happening. My guess could be completely wrong but I am assuming this is what you've done.

  • Usually in appdata folder.

  • I would use a function for something like this because of the trigger event. I've left a wait in so you can actually see what it's picking.

    https://www.dropbox.com/s/omt8tfzvdsvga ... .capx?dl=0

  • The way that logic is set up, it picks the 3 random sprites first before doing anything else, so it can pick the same one more than once.

  • Oh right, yeah just use the tilemap on its own if you're going to build it like that. No need for an additional sprite for collision.

  • Not entirely sure what you're asking here in terms of an invisible solid sprite for the collision but a tilemap is used mainly for top-down games to map out large areas with optimised collision. For a 2D platformer you wouldn't use a tilemap, likely just sprites with box collision for platforms.

  • That is what you're after? I didn't look too deep into the logic of the game.

    https://www.dropbox.com/s/1sj8rr6h3n0kn ... r.jpg?dl=0

  • No idea about that but you don't need to use that save state now that you've explained what you're trying to save. To check whether time attack mode is available you just need local storage and a key. To toggle whether it is available use a global variable instead of an instance variable.

  • The problem is that you said you wanted a way of saving instance variables and I recommended that link. What you should be doing is saving that unlock information as a global variable, local storage is what you should be using for this. If it's not working properly with other global variables then it's a logic error, possibly you are loading the key items to global variables then resetting their values afterwards.

  • You can safeguard it by not resetting global variables many times. If you want to store variables FOREVER as a mechanism for when something is unlocked by a user then I don't see how resetting them can be good practice. In this case I would reset individual global variables that need to be reset, if they have to be. You could probably reset global variables then load all the keys from local storage but I've not tried this around a reset.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You need to use a global variable and local storage for that.