dop2000's Forum Posts

  • Your link is broken, try posting it without the "https://" part

  • luckyrawatlucky

    You mean having 2 spriter objects?

    This is what the OP was trying to avoid.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You have 2 instances of EF_Start.

    When you use "Pick by evaluate" event the system performs 2 steps:

    a) takes the first instance, compares if .stt=choose(1,2)

    b) takes the seconds instance, compares if .stt=choose(1,2)

    Because choose(1,2) expression generates a random number every time, this event works unpredictably. It may pick one instance, or both, or none.

  • Add Timer behavior to your Enemies and use it instead.

    On start of the layout - For all enemies start "shoot" timer for random(x) seconds (Once)

    On "shoot" timer event -> shoot weapon and schedule new "shoot" timer.

  • A ? B : C is called ternary operator.

    It basically means "if A is true, then B, else C"

    So this formula reads:

    chain.index* (IF loopindex("i")=1 THEN -dir ELSE dir)

  • I think what happens is that when you use one of the "Pick" events, the system actually loops through all instances and compares them one by one.

    So it takes the first instance, compares if .stt=choose(1,2)

    Then it takes the seconds instance, compares if .stt=choose(1,2)

    The problem is that the second time choose(1,2) may give a different number!

    Say for the first instance random number was 1 and for the second instance random number was 2. And as a result, both instances get selected and two bullets are fired!

    Here is an easy fix:

    rand=choose(1,2)

    System-> Pick EF_Start where stt=rand

    Or just use the Pick Random Instance event.

  • There may be errors in your .json file

    Could you share the project?

  • Maybe make them invisible or move off the screen on layouts where you don't need them?

  • 1. In line 80 you need to pass item number (item's position in the array, or InvCell.order number) to the "DropItem" function.

    For this you need to pick the correct cell, the one which is currently selected.

    Similar issue with "Use" function - you are passing Collectibles.AnimationFrame to the "SelectItem" function, which is incorrect, because by default Collectibles refers to all items. You need to first pick the correct instance of the Collectibles family first, the one which is selected.

    2. Same issue - you need to pass item number to the function.

    3. I tried that and it worked for me. The game didn't pause (because Wait doesn't actually pause the game), but the lines "Jim takes the note and reads it. etc...." appeared on the screen.

    4. If you pick up the note before the handkerchief, they end up in the same inventory slot. Not sure why.

    You can see it in debug mode - both sprites are in the second cell.

    I told you I don't like this inventory system. Integrating it into your game made it even more complex, it's now really hard to understand what's going on.

  • So what's the problem? Global variables should be accessible from all layouts.

    Make a separate global variable for each of your characters and that's it.

    You can also use a dictionary or an array to store high scores, set Global=yes and they will also be accessible from any layout.

  • Aguamoose

    Oh my goodness...

    Why don't you add another sub-event under #101 and replace all those lines with this:

    For "offset" from 31 to 1
      Set value at (ArrayTilemapper.CurX, ArrayTilemapper.Yaxis+loopindex("offset"), ArrayTilemapper.Zaxis) to "Sand"
    [/code:3v4ffqq5]
    
    Also, you should use variables instead of fixed values. 
    If you put "Sand" in 10 events and tomorrow decide to replace it with "Grass", you'll need to edit 10 events. 
    If you add variable TerrainType="Sand" and use it in 10 events, you'll only need to edit 1 variable.
  • I thought a large 1x1 px tilemap would be insanely slow. I underestimated C2 again..

  • R0J0hound

    Wow, this is so cool and works so much better than my petty attempt!

  • I understand you question, but you didn't provide any answers to my previous comment.

    Your walls - are they sprite object or tilemap object?

    If the wall is sprite, you can create another frame for metal wall and an instance variable "wallType".

    For rock walls set animationFrame=0 and wallType=rock

    For metal walls set animationFrame=1 and wallType=metal

    When player collides with the wall, add another sub-event to compare wallType. If wallType="rock", then enable wall jump. If wallType="metal", don't enable wall jump.

    With tilemap it can be a little trickier.

  • Have you tried contacting the author of this engine? It's his job to fix issues like this.

    The virtual joystick works on PC with mouse, but doesn't work on my mobile phone. Maybe there is some mouse event that is causing this problem.