lionz's Forum Posts

  • Use floor(random(100)) to set a local variable to a random number from 0-99 then adjust each possible outcome to be within a range of values that act as percentage i.e. if var is between 0 and 9 then that's a 10% chance.

  • Yeah Families then. Put rogue and mage into a family where Duration and MaxDuration are Family instance variables. You can still refer to the classes separately for some things but for those events you can use single events with family, so rogue.duration and mage.duration become family.duration which applies to both rogue and mage.

  • Where does the redundancy come into it? If you're talking about using the same events for multiple object types then you can put all objects in a Family and use the Family for picking.

    I don't know if that's what you're after but when you talk about events that are becoming redundant and you want to pick 'an object' rather than a specific object type then Family works well to refer to any number of specific objects that exist in the Family.

    If this isn't the case then please provide some more example events to demonstrate what is redundant for you. If I've understood it correctly I think what you might be describing though is not possible as Construct works by picking instances of an object type on the left then applying the action to those picked instances. Using Families may get you somewhere close though as objects can be grouped.

    Take a look at how events work, maybe that will be of some use : construct.net/en/make-games/manuals/construct-3/project-primitives/events/how-events-work

  • Hi, are you referring to global variables? There is a system action you can use 'Reset global variables'.

  • Well you are setting layer 1 to be visible on lives=0, but the level failed is layer 3. Also there's nothing to set the level failed message to the player position so you might not see it unless you are standing next to it.

    For anim events you can try :

    Platform is moving : set animation to Animation1

    Platform on stopped : stop animation, set animation frame to 0

  • Yes easier to debug with the file otherwise it's guesswork.

  • You create a sprite, open the image editor, import the animation as a sprite sheet.

    You give the sprite a behaviour depending on what type of game. If it is a platformer you give it the platform behaviour.

    Then in event sheet you create events such as on left/right button pressed play animation "Walk"

    This is the animation editor : construct.net/en/make-games/manuals/construct-3/interface/animations-editor

    This question does ask a lot though, probably better to look at the manual and try some things then come back on this if you are stuck.

  • This doesn't make too much sense. "When a word is chosen i want it to add a value equal to the global variable of the same word." ? Provide some examples.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ok no problem ^^

  • Look at the 'Persist' behaviour, it's for this kind of thing where destroyed objects stay that way when you return to the layout.

  • You can only have one instance of each object per container so it's creating the missing instances for two more containers. You won't be able to use Foliage 2 twice in the same tree for example.

  • Hi, you can use system compare condition when enemy.count=0. Count tracks the number of enemy objects that exist. You could also set a global variable to enemy.count so you can clearly see the number remaining.

  • Don't use families and containers, just containers. You can say on collision with trunk, move the foliage, and it'll move the foliage that is in the container with the trunk you touched. If you try and pick the foliage as a family it'll start picking every foliage.

  • Because both layouts use the same event sheet, when zombies=0 it keeps reloading layout 2. If they must use the same event sheet then you can add a condition, zombies=0 and layoutname=layout1. Also if you set a target number for zombies on start of layout it would stop the constant refresh.

  • Whatever the logic is, some kind of player movement I'm guessing, put it into a function.

    Then use two events -

    Controller stick block : call function

    D is down : call function