openfocus's Recent Forum Activity

  • thanks i will look at the example and read up on arrays!

  • Hello!

    in my project at the start of each level i spawn sprites called "Citizen" with the text variables "FirstName" and "LastName".

    i was wondering how to get and randomly assign a "FirstName" and "LastName" from a list of names i have compiled.

    Searching the forums and tutorials it seems this would be best accomplished with XML files but i dont understand exactly how and maybe there is a better way?

    help please!

  • Link to .capx file (required! If link is blocked remove the http and www parts):

    dl.dropboxusercontent.com/u/65114700/buttonbug.rar

    Steps to reproduce:

    1. create a button

    2. make it invisible but enabled

    3. make an on click button event that plays a sound

    Observed result:

    no sound play when you mouse click or tap with touch on the invisible button.

    it is possible to use other events to play sound when clicking/tapping the invisible button (on touched object play sound) but that will always play the sound even if the button is disabled.

    Expected result:

    sounds should play when you click on the location of an enabled button even if its invisible. (worked in previous versions of construct2)

    Browsers affected:

    Chrome: yes

    Firefox: ??

    Internet Explorer: yes

    Operating system & service pack:

    windows 8.1

    Construct 2 version:

    r159

  • Here is a working example with zooming and scrolling:

    http://dl.dropbox.com/u/5426011/examples16/pinchzoom.capx

    I used two layers and only scale layer 1. layer 0 I used to get the touch positions used for zooming. If I scaled the layout instead zooming became very unstable.

    thanks rojo, exactly what i was looking for! =D

    btw, is there anyway to set max zoom, so that you cant zoom outside layout or super close?

  • Hello openfocus.

    This is purely speculative, as I haven't messed with pinch-style controls yet, but I imagine you could save the point touched on the screen to a variable and measure the difference in a 'system tick' event.

    It doesn't look like there's a way to measure two touch events at the same time, though. If only one can be tracked, it might be tricky; with X increasing right and Y increasing down, you might be able to measure just the X/Y position to determine if it's a pinch or spread motion.

    I'll be curious if you get a demo of this working!

    yeah, thats exactly what im trying to do =) but i just cant figure out the variables and the events..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ok so ive been looking around the forums but havent found an elegant solution to pinch to zoom without plugins.

    sort of what i want to do:

    create object at touchpoint 1

    create object at touchpoint 2

    measure distance between object 1 and 2

    this distance is "X"

    if distance becomes greater than X (objects moving away) then zoom in

    if distance becomes less X (objects moving closer) then zoom out

    zoom speed could be whatever, just not snapping.

    would this work and could someone help please =)

  • nope, actually i could not; recreated the situation which particles were spawned in a new project without using any plugins and the "blinking particle" bug went away...

    tried to clean away plugins from first project but that did not eliminate the bug

    EDIT:

    false alarm, bug is now back in clean project capx

  • i get the same error

    capx

  • awesome plugin!

    one "problem" though; i want the bullets to fire at an angle of weapon.angle + random(X,-X)degrees from the weapon but if the weapon changes its angle while firing, so will the bullets mid-flight =(

    anyway to get around that or like add a "spread" variable to the weapon?

    thanks!

    EDIT:

    think i fixed it, changed from "set angle" to "set bullet angle of motion to bullet.angle + random(10, -10) degrees

  • thanks, will check out the tutorials!

  • 1. is it possible to randomly pick the sprite in a particle effect?

    example: i want a "snowing" particle effect that everytime it creates a new sprite randomly picks 1 out of X snowflake sprites.

    2. how do i make the sprites in a particle to start rotating when they are created?

    thanks!

  • awesome, thanks!

openfocus's avatar

openfocus

Member since 18 Mar, 2012

None one is following openfocus yet!

Trophy Case

  • 12-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

14/44
How to earn trophies