dop2000's Forum Posts

  • camboriu

  • Variables (global or instance) are not very convenient for this purpose.

    Dictionaries and arrays are much easier to work with, because you can export/import them with one action (as JSON).

    So I'd recommend putting all data that needs to be saved into one or several dictionaries and export them as JSON to a text file.

  • And now... to create zillions of variables for each of my items! :D

    Joking aside - things like this is the reason why so many beginners never finish their games. It may take a few hours to read about the features like dictionaries, arrays, families etc., but they will save you weeks and months of work in the future.

    I've seen too many projects with many hundreds and even thousands of repetitive lines of code, that could have been avoided if the author had spent a little time researching and learning..

  • So what's the problem? Why don't you use "Pick nearest" event?

    Player On collision with teleport

    Portal pick nearest to (Player.x,Player.y) -> Player set position to Portal

  • I would suggest making the game first, and then worry about hackers :)

    .

    For example, when you are close to releasing the game, you can copy the content of the file (made with Array Editor) and embed it into the code. This way it will be significantly harder for hackers to modify it.

  • You can use Array Editor to create a list, yes, but you still need to load it into the array before using it. (request the file with AJAX, then load into the array from JSON)

    I would give you a tutorial, but with recent changes to the website, it's impossible to find anything...

  • Definitely NOT variables.

    You can make a list/reference of all possible items and their properties (damage, price etc.) using the Array Editor.

    For storing items that your characters owns, use another array or maybe a Dictionary. With dictionary you can save item code as a key and quantity as value, for example:

    Key="healthPotion01", value="7"

  • Add action -> Character -> Set Mirrored

    I suggest you click File-New in Construct 2 and select Template:Platformer from the list. It has all the required events.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You are still using mouse - you need to replace Mouse.X, Mouse.Y with Touch.X, Touch.Y

  • It would be much easier to help you if you could share your capx or a few screenshots.

    If by "on top" you mean z-order, you should use "Card-Pick Top/Bottom".

    .

    Or you can add an instance variable "RowPosition" to cards, set this variable to different numbers. Then you'll be able to pick top cards by comparing RowPosition=1.

  • Probably because Mouse doesn't work on mobile, you need to use Touch.

    If this is not the case and you are using Touch, please share your code.

  • You can define another imagepoint on the tip of the weapon in your Player sprite (you'll have to do it in all frames of "shoot" animation). Spawn bullets from this image point.

    Create a sub-event under your "spawn bullet" and add this:

    Player is mirrored -> Bullet set angle of motion to 180 degrees

    .

    To spawn less bullets you can add another condition "Every 0.2 seconds" under "Keyboard Z is down".

  • What do you mean by "static maps"?

    I tried both plugins earlier and both allowed to set the map to specified location and place multiple pins on the map.

    Rex's plugin is more advanced.

  • Yeah, you can do this to jump again while in the air:

    On key W pressed

    Player is NOT on the floor -> Player set Vector Y to (Self.Platform.VectorY-1000)

  • I don't understand what bugs are you talking about.. Are you controlling MaxSpeed or speed?

    Here, try this example:

    dropbox.com/s/bts9v6536aj5dc7/PlatformSpeed.capx