dop2000's Forum Posts

  • If you open the plugin page, it's very well documented and there is a link to sample capx project. Also, check the discussion thread, this is a popular plugin and there may be lots of useful information in the comments.

  • Yes, you can add "DrawingCanvas Save Image" action, and then in "DrawingCanvas on saved image" event use DrawingCanvas.SavedImageURL expression - it will contain your image data. You can do whatever you want with this data - load to sprite, another canvas, save to local storage etc.

  • Yes, you can pass any number of parameters to functions, and access these parameters inside the function using Function.Param(0), Function.Param(1) etc..

    So in your case you can call function "AddAmmo" with parameter 6, and inside the function use "Add Function.Param(0) to ammo"

  • If you need to pull data from static tables, use these addons:

    construct.net/en/forum/extending-construct-2/addons-29/plugin-csv-csv2array-csv2dicti-41868

    You can also exchange data with google spreadsheet:

    scirra.com/tutorials/9614/create-online-database-with-google-spreadsheet

  • You can try this - use an invisible sprite with platform behavior (lets call it PlayerBox) and remove platform behavior from the player. When player is on this slope (use Overlapping at offset to check this), set Player position to lerp(Player.X, PlayerBox.x, dt*10), lerp(Player.y, PlayerBox.y, dt*10) , this should smooth out the jitter.

    When player is not on the slope, simply set position to PlayerBox.x, PlayerBox.y

  • You can increase sensitivity, but it's not possible to decrease it with standard methods. Even if you replace the mouse cursor with slow-moving sprite, when the real mouse cursor hits the corner of the screen, Mouse.X and Mouse.Y coordinates will no longer change and your sprite will also stop.

    The only solution I believe is to use this (or a similar) addon:

    construct.net/en/forum/extending-construct-2/addons-29/plugin-mouse-lock-v0-5-updated-77252

    It allows you to read "raw" values of mouse movement and you may be able to use them to move the sprite cursor.

  • You need to add "Pick all" into event 15. Because in the parent event you created a new dictionary instance, you can't pick any other instance in sub-events, unless you use "Pick all".

    Also, the IID in event 15 will now refer to the instance with UID=3. If you need IID of the newly created instance, save it to a local variable, or use (Dictionnaire.Count-1) instead.

  • Set 0 parallax and scale rate for "UI" layer. Or use ViewportLeft("UI")+50 and ViewportTop("UI")+50 in events 2 and 4.

  • Never ever use "Trigger once" condition when multiple instances are involved! It doesn't work per instance, as long as one enemy has state=1, this condition will not be triggered for other enemies. If I had to name one thing in Construct that causes most problems and bugs when used incorrectly, it would be "Trigger once" condition :)

    Instead, add more states, for example: got LoS, set state=1; started timer, set state=2; started burst, set state=3 etc.

    But personally I don't like state machine events that are running on every tick. I prefer to do this with functions and "For each" loops, you have a much better control over it:

    "For each" are important, because LoS and Timer may be triggered in one tick for multiple enemy instances.

  • Like I said, using viewportRight/viewportBottom expressions fixes the issue.

    dropbox.com/s/zvvdc7dt5nxy7wf/ScrollRTS.c3p

    Только я не знаю, как они называются в русской версии :)

  • "Pick all" is left from previous version, it's not needed here, you can remove it.

    "For each chooser order by random(1)" is to pick two random chooser sprites (excluding the one we removed in event 5). It doesn't matter what number you put in random() expression in this case, it's just used to sort the list of instances randomly. Then "loopindex=1" condition is used to stop the loop after two chooser instances are processed. Again, this is not really needed, the loop can continue for the remaining chooser sprites, but Dino sprites will not be changed after that.

    random() doesn't always need a range, random(1) means the same as random(0,1)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think you are confusing IID and UID - they are different! Run the game in Debug Mode, find your dictionary object in the list and check them yourself.

    Also, it's a bad practice to use fixed values for UID in the code, (like in your condition Dictionary.UID=3), because when you change the project, add/remove objects, these values can change. It's recommended to use instance variables instead.

  • There are no "objects" on canvas. You can only make "On Canvas clicked" event, and inside this event figure out which part of the image on canvas was clicked, either by comparing mouse coordinates, or by reading r/g/b/a values of the pixel under mouse pointer. For example, if your circle is red and the clicked pixel is red, then you can assume that the circle was clicked.

    Another option that may work in some projects is to add invisible sprites - clones of images drawn on the canvas - and use them in events.

  • If the screen scrolls up and left, then the issue is with the WindowHeight and WindowWidth expressions. Try using ViewPortRight(L) and ViewPortBottom(L) instead, where L is the layer with zero parallax and scale rate (for example "HUD" layer). Also you can use Mouse.X(L), Mouse.X(L) instead of absolute values. And if you map is bigger than layout size, make sure to enable Unbounded Scrolling in layout properties.

    If this doesn't work, add this event, open browser console (F12), this should help you to understand the issue:

    On every tick
    ..Browser log Mouse.AbsoluteX & " " & Mouse.X("HUD") & " " & WindowWidth & " " & ViewPortRight("HUD")
    

    PS: Русский интерфейс выглядит совершенно дико. Я не ожидал, что даже системные выражения переведены на русский! :) Если постить скриншоты на этом форуме, лучше все-таки переключаться на английский интерфейс, иначе никто ничего не поймет.

  • You have enemies that are off-screen, you don't see them but your character has LoS to them.

    Run the game in Debug Mode, when this bug happens, pause the game and check all enemy instances one by one.