dop2000's Forum Posts

  • So you want to display the list of player sorted by an instance variable? You can easily do this with "For each (ordered)" system event.

    For each Players ordered by Players.TurnCount

  • Sure, my email is in this post.

  • Could you give more details about what you are trying to do?

    You can pick one Family instance and one Object instance (from this family) in the same event, and compare their instance variables. For example - "If Enemies.hp > Zombie.hp"

  • Can you share your project file?

  • That's what I told you - "if you want it to move up, then left, then up, you need to change the coordinates in the second and third MoveTo action."

    To move Up, then Left, then Up:

    Move to self.x, self,y-100

    Move to self.x-100, self.y-100

    Move to self.x-100, self.y-200

  • On the first screenshot change mode from "Direct" to "Add waypoint".

    And if you want it to move up, then left, then up, you need to change the coordinates in the second and third MoveTo action.

  • You mean a virtual joystick?

    howtoconstructdemos.com/category/virtual-joystick

  • I mean remove instance variables from the object and add them to the family. The objects in the family will inherit these variables.

  • I don't know, does it work?

    You should probably only remove the line when the text has more than 10 lines:

    if tokencount(BBText.text, newline)>=10

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can, but you need to define the instance variable on the family level.

  • there is no loop in the screenshot you posted in your first comment. "On collision" event happens only once, and the enemy is destroyed. So the sub-event is never repeated.

    With music you need to assign a tag to the audio and check that this tag is not already playing.

    If player X>2000
    Audio "music" is NOT playing
    	Audio play Music with tag "music"
    
  • You can remove lines which end with line breaks. But if you have a lot of text which is automatically wrapped to a new line, it's very difficult.

    To remove the first line:

    Set text to right(text, len(text)-find(text, newline)-1)

  • It may not be compatible with BBcodeText.

  • You mean you need 1-in-5 chance to drop a power up?

    random(0,5) will generate a random number between 0 and 4.99999999999, it will never be exactly 5. Change your condition to random(5)<1, this will give you a 1-in-5 chance.

    Another option: choose(1,2,3,4,5)=5

  • Instance variables store values for each instance. If you have 100 enemies, each enemy instance can have its own 'health' value for example.

    When you switch layouts, new instances of all objects on the new layout are created, with default values in instance variables.

    You can set an object as Global, and then it will be transferred to another layout with all its properties.