Kahless's Forum Posts

  • 14 posts
  • zenox98 Thanks. This helps a hole bunch.

  • R0J0hound Hello. I'm having trouble installing the Paster plugin. I tried to install it using the .c2addon file but was unsuccessful. I opened C2 using administrative privileges but the .c2addon file failed to instill in either the plugin folder or Application Data. However there is a Construct2 folder within Application Data, but it's empty. Are there any known issues installing .c2addon files with Windows XP(I know I'm probably the only person still using XP, LOL). Would it be possible for you to post the files directly?

  • Arima Thanks for the tip about the paster plugin. I tried to install it using the .c2addon file but was unsuccessful. I opened C2 using administrative privileges but the .c2addon file failed to instill in either the plugin folder or Application Data. However there is a Construct2 folder within Application Data, but it's empty. Are there any known issues installing .c2addon files with Windows XP(I know I'm probably the only person still using XP, LOL).

    On a side note I'm also very interested in the "render-to-texture" feature but having trouble finding info relating to it's function. Would you happen to know the name of the texture file the objects are merged to. I tried using notepad++'s find feature but only located one reference to "render-to-texture" within c2runtime.js.

    Line 2119   this.layer_canvas = null; // for layers "render-to-texture".

    Any further help with either issue would be greatly appreciated.        <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Hey avinashizhere I'm still new to this my self but you could try this.

    Add the 8 Directional movement behavior to your object.

    Then on the even sheet new touch event - Touch-On touched-Object

    Then set up an action for speed, acceleration, max speed, and simulate control.

    Then set up another event Touch-Touch end-object with the action deceleration

    Let me know if that does it.

  • tulamide Cool thanks for the info. So I just did a bit of reading on "force own texture" and this is what the manual has to say.

    Force the layer to always render to an intermediate texture rather than directly to the screen. This is useful for some kinds of effects. However, it slows down rendering, so it should be set to No unless specifically needed.

    I see that in the layers properties it can be set to yes or no but I'm not entirely sure what the difference is. Is it saying that if set to yes then all objects within the layer are merged into one texture. Than that texture is drawn. If so where is all this taking place. Like what .JS file I would like to take a deeper look.

    Also whats you take of the performance hit. On the forms some people are saying that it can be quite a problem.

  • Awesome. Thanks Arima and tulamide for the clarification about when objects are drawn. Is there any point when the entire layout gets merged into a texture? Like maybe right before it's drawn?

    And tulamide that's a cool fact about layers I always wondered how that worked.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Are all objects drawn every frame? Or only when the object is altered? I would imagine every thing has to be rendered every frame of you couldn't have multiple layers. Right?

  • Aphrodite

    Awesome. Once again exactly what I was looking for. Thanks for the help.

  • Hey Aphrodite thanks for the help this is exactly what I asked for. After implementing the solution I realized the sprite was moving a bit to slow so I made a small adjustment.

    OriginalSpriteX - (-OriginalmouseX+Mouse.X)*6.5

    It still needs some fine-tuning but I'm gonna keeping playing with it. There is one issue I ran into when testing. I noticed that if I'm using full screen mode and decrease the window size the sprite seems like it's moving faster. It's really not. It just has less space to cover before it's out of the canvas. Do you know of any way to adjust the distance the sprite will move based on the size of the canvas?

  • Hello and thanks for your interest. I'm trying to set it up so when I left click and drag the mouse a sprite will move away from the mouse the same distance and angle the mouse is dragged. I have tried to use the move at angle action paired with the Mouse.Absolute X-Y features but cant get it to work. Also it's important that the sprite doesn't rotate. I'm completely stumped. Any of you upper echelon programmers got any ideas?     <img src="smileys/smiley4.gif" border="0" align="middle" />

  • After much trial and error I have determined it is possible for one plugin to both draw images and interprets user input. Now the only question is are there any draw backs to setting up a plugin this way?

  • Awesome. Thanks for the response. Iv'e been looking at some of the plugins and the templates trying to figure out how everything fits together. I'm trying to have a plugin that distorts an image based on mouse input.I see plugins that draw images are of the world type and plugins that capture user input are of the type object. Is it possible to have one plugin that does both. Or do I need to have my plugin communicate with the mouse plugin? If so then whats the best way to set up the event sheet. I was thinking some thing like mouse-left button is down, then have that call a function.

    function mouseDown(e){

         mouseIsDown=true;

         mouseDownPosLastX=e.clientX;

         mouseDownPosLastY=e.clientY;     

    }

    So my plugin can see the x and y position. Is this type of interaction possible? Sorry for hitting you with so many questions at once.

  • Can event listeners like onmousedown be used in plugins?

  • Is it possible to distort a sprite based on the movement of the mouse and or keyboard. For instance I would like to offset the pixels in my background image based on user input. Now I don't see any obvious way for this to be done through eventing. Since it seemed a plugin might be in order I took a look at the plugins that display images. Would it be possible to adjust the sprite plugin for the purpose. It seems to me I might need to hard code the user input settings into the plugin. Is that even possible? Thanks in advanced for any and all help received.

  • 14 posts