dop2000's Forum Posts

  • Oh, I know what could be the problem. Local variables in functions lose their values after wait.

    So you need to move all actions with wordScore above "Wait 2 seconds":

    Also, when Attack button is pressed and you return all letters to their start positions, you should also clear "isOccupied" variable for Sprite133.

  • It does work.

    If the word is entered correctly, then wordScore variable will contain the score for this word.

    Say, in my example the word "sensei" will give wordScore=12 and the word "itadakimasu" will give wordScore=20.

    Then it's up to you how you use this value. You can do "Skeleton subtract wordScore from Health".

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok, since I recommended storing the list of all words in a single variable, I guess I have to help you with this one <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    Here is an updated file:

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

    Note, I used an older version of your capx, from the previous post. So you should only take the code in Battle Animation group, ignore everything else.

  • Unfortunately, you can't do it in C2.

    When I need to delete an object in a big project, what I usually do is I rename it to something unique like "Delete12345".

    Then save the project as a folder (not as capx) and search all .xml files for "Delete12345".

  • Sorry, I misunderstood your question.

    Is this what you want?

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

  • 2) I would ask each player to press a button on their gamepad before the game starts.

    "Player 1 press any button"

    Then wait for any button pressed on any of 6 gamepads. When a button is pressed say on gamepad #5, save this number in a variable Player1Gamepad or in array:

    PlayerGamepads.At(1) set to 5

    You can also make a reverse array for convenience - GamepadsToPlayer:

    GamepadToPlayer.At(5) set to 1

    PlayerGamepads[x] will give you gamepad number for player x.

    GamepadToPlayer[y] will give you player number for gamepad y.

  • What type of object is your "answer"? Its icon looks different from the TextBox icon. Is it some custom plugin?

    Have you tried running the project in Debug Mode (ctrl-F4)? You can check the contents of the array, question, answer objects before pressing the button.

  • I think what you need is Pin behavior.

    Set Object2 position, then pin it to Object1 as "Position and Angle".

  • Ok, this one was easy. Just move "Word Set text" to the start of the function:

  • I don't know, but I see on your screenshot (loop.jpg) that you missed "music" tag.

    Should be Audio.PlaybackTime("Music")

  • You can try the advice from this comment:

  • It's getting too difficult to follow.

    Could you share you capx?

    Also, can I ask - did you develop this game from scratch? Or did you use someone else's demo/game template?

    Because some of the code in your project is quite advanced, and yet the questions you are asking are very basic. I'm confused.

  • Well, what you are trying to do is not possible, because you can't refer objects by their name.

    By selecting multiple objects I didn't mean "at once", I meant selecting instances of different objects.

    Say, you can select either Block sprite, or Tree sprite or Rock sprite.

    And understandably you don't want to create 3 almost identical events. (if selectedObject="Block" then set position to block.. if selectedObject="Tree" then set position to Tree.. if selectedObject="Rock" .....)

    So the workaround would be adding all three sprites to a family SelectableSprites. And then do what I suggested in my previous comment - pick family member by UID and set position to family instance.

    And one more thing - BlockMoveable(21) means instance with IID=21, not with UID=21

    https://www.scirra.com/manual/130/common-features

  • See this tutorial:

    https://www.scirra.com/manual/163/line-of-sight

    Have you added "Has LOS to object" event? Your enemy should start shooting only if this event is true:

    Enemy->Has LOS to player -> Enemy spawn bullet

    If you still have troubles, please share your capx