Shadowblitz16's Forum Posts

  • R0J0hound

    can you add support for drawing an entire part of the screen?

    I know it might not be very optimized but I have a cool Idea for a seemless screen wrap

    for example draw region (x1,y1,x2,y2)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • well I have tried (health/100)*healthbar.width when i was using a sprite but that didn't work

    maybe because my healthbar.width was changing?

  • does anybody know how to draw a resizeable health bar with R0J0hound's canvas plugin?

    I know I can make one 100 pixels wide

    doing something like this

    Draw Box

    X 164

    Y 94

    W (health/maxhealth)*100

    H 6

    but how do I draw one 328 pixels wide with the health bar being based off of 100%?

  • Problem Description

    custom movement behavior gets stuck at 200.00000000000003

    Attach a Capx

    Project

    Description of Capx

    this cap shows you the overall speed of the arrow

    Steps to Reproduce Bug

    • Step 1 turn player to a diagonal angle
    • Step 2 accelerate player to maximum speed
    • Step 3 when player reaches maximum speed turn around and try to accelerate another way

    Observed Result

    the speed seems to get stuck 200.00000000000003 even though I clearly set it back to 200

    Expected Result

    when it reaches higher then maximum speed it should reset back to 200 allowing the player to move again

    Affected Browsers

    • Chrome: (YES)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    Windows 10

    Construct 2 Version ID

    212.2 and beta r214

  • For Anybody wondering I figured it out you can see the camera code here

  • Scrolling to player.x,player.y would put the player in the center of the view..

    the offset you need is the amount the center of "your view" is from the center of the view..

    ok so I think I found out what you mean by this however

    the clamping should be done by comparing the boundingbox of "your view" with the sides of the layout..

    This I need a diagram to understand

  • LittleStain

    Something like this?

    http://imgur.com/c7dn9ut

    if so what am I doing wrong?

    Edit LittleStain can you show me a diagram of of what you mean?

    I feel like I don't understand

    clamp(player.X-20,10,LayoutWidth-view.Width+10)[/code:14tnn8ns]
    as far as I can see the 20 could either be the offset of the hud(not view) or the view split into 3rds
    and the 10 could either be the offset of the hud split into half or or the view split into 6ths?
  • the offset you need is the amount the center of "your view" is from the center of the view..

    how do I get the middle of the built in view?

  • well the project you gave me seems to use a set values to clamp the view

    It does however seem to resize correctly but I can't confirm it 100%

    I have tried messing around with the values and changing them to variables but I can't seem to get it right

    Edit: this is what I've been trying to make work

  • LittleStain can you explain how this works?

    I seem to be having problems understanding how the offset works

    when I adjust the position and size of the view object it doesn't seem to offset the camera

  • yes thank you so much

  • linkman2004 do you ever have plans on adding camera sizes or borders?

  • how do I install a C2ADDON.file?

  • bump can someone help me I still need this

    I want to make my camera system use 3 objects

    the hud the view and the player to indicate where the camera is positioned

    this right here https://www.dropbox.com/s/ejlmgsiypf31o ... .capx?dl=0

    it works if I don't need to modify the views position or size

    however I do so can someone take a look at this and write up a camera code I could use?

    Edit: basically a view port however I know you can't draw things to the screen in construct 2 so

    I need somebody's help for the math behind how it works

  • Can you provide a link to your .capx file ?

    I did you still haven't replied