keepee's Forum Posts

  • Try putting them as sub events under a 'for each' loop

    something like:

    For each HumanPlayer

    ..>Gamepad HumanPlayer.ControllerNumber Left analog > 0 -simulate right

    ..>Gamepad HumanPlayer.ControllerNumber Left analog < 0 -simulate left

    ..>etc etc

  • I've posted a .capx in this other thread that you might find useful

    http://www.scirra.com/forum/doctor-who-can-help-me-see_topic83819.html

  • I did this a while ago for someone asking a similar question, i've modified it to be more relevant here. hope it helps..

    it uses the family method of picking separate instances of the same object at once

    https://dl.dropboxusercontent.com/u/53374990/Forum/LOS%2Bteams/01/LOS.capx

  • if you know the basics, then you understand how to use a variable for the score, right?

    what you described entails a variable, creation of some objects, and finally a key to restart layout (which is already an action in C2)

    it sounds like you should just have a go at making it and come back if you run into a specific problem

  • use the 'loopindex' expression

    Repeat 10 times > create object at loopindex*10, 100

    will create 10 objects with respective x coords of 0,10,20,30 etc

    loopindex can be used for any type of loop, not just Repeat

    if you're in multiple loops, you can refer to them (provided they are 'for' loops) like this:

    loopindex("loopname")

  • BrandonJaySolus

    if you want stronger control over the object, you should try using 'Set Velocity'

    if you want to set the X component, but leave Y alone, you can do:

    set X component to [whatever speed you want]

    set Y component to self.physics.velocityY

  • you mean 'multiple instances of the same object'

    there are a few ways you can get around this..

    one way is to store whatever you need off instance1 into a local variable, and then after that, with instance2, you can refer to the variables instead of trying to pick instance1 at the same time.

    for example, in your LOS case, you can do this:

    pick the target instance, and store its X and Y into local variables

    and then in the next event (not a sub event) pick the other instance, and check if it has LOS on the positions of those X and Y vars instead of with the actual target instance.

    This doesn't work all the time and so sometimes you need to juggle both instances at the same time.. you can use a family unconventionally: call it objectB, and inside that family is just the object.

    then in the events you can filter with Object and ObjectB separately, and refer to them both within the same condition and actions. even though they technically just refer to the same thing.. the family is a means of having a separate filtering of the same object.

  • BrandonJaySolus

    are you using other movement behaviours alongside physics? They don't get along very well

    if you're using physics, it's best to control all of it's movement with those physics actions

  • not sure if this will work depending on your context but you could check the projectile X against the character X, in a sub event under the collision

    projectile | on collision with character

    projectile.x greater than character.x --> play hit from right animation

    projectile.x less than character.x --> play hit from left animation

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ashley, pick by UID is actaully what i was using in the earlier post,

    it's interesting for a situation i'm in because i'm picking by UID before collision checking, and a few events later I need to collision check against many instances.

    But the whole thing is within a 'For Each ..' event which makes it awkward to separate out the latter half into a top level event to make use of the collision cell.

    I'll have a crack anyway, thanks again

  • Ashley, okay cheers

    is it just conditions that filter instances that stop the cell method?

    It's okay to have them under other non-filtering conditions, functions and groups, right?

    ggibson1

    "..only scan for a matching UID on the objects in that Cell"

    well, anything post-collision check would already be filtered down to those instances overlapping

  • What if you make dozens of layouts and decide to add/remove/modify a layer? You'll have to do this manually for every layout!

    this is a huge pain in the ass for big projects, and it's the main reason I started having a go at my own in game level editor -so I can save and load levels off of a single layout.

    Although to be fair now I have a level editor that players can use too, and that's pretty cool.

    initial state for effects would be very useful for me too

  • Ashley, two questions about collision cells:

    will the top level+first condition requirement for using the cells always be true?

    also, in many cases I am filtering to one specific instance before doing a collision check (with another filtered single instance of another object).. am i right in thinking that in this case, there's no 'brute forcing' and as such, there is no advantage to trying to make them top level conditions in order to use the collision cells.

  • it is possible to create a line graph (or any curved line, really) by creating a ton of 1x1 sprites that are automatically stretched and angled correctly with a loop

    But I think it'll be be wiser if you download the 'canvas' plugin from here

    http://www.scirra.com/forum/plugin-canvas_topic46006.html

    it lets you draw stuff onto an area

  • But if the object falls a distance that's less than about two times it's height, it just sticks to the floor.

    that's odd.. is another behaviour interfering with the physics?