Yann's Recent Forum Activity

  • ;_; so great Thank you

  • Is boolean instance variable set <=> "is bolean True"

    Invert this condition if you want "is bolean false"

    to invert a condition, you first create it, and then click on it, and then right click and you shall see the "invert" item with a stroke equal symbol.

    Cheers to you too o/

  • That's basically how I do that, but instead of using a global variable, I use an instance variable BOOLEAN typed.

    so basically

    on left click on sprite : selected to True

    [NOT] left mouse down : selected to False

    if selected : follow the mouse

    Also I add an offset calculation to avoid the sprite to snap on the mouse position. For that I use 2 instance variable xOffset and yOffset

    on left click on sprite :

        Sprite selected = True

        Sprite xOffset = self.X - Mouse.X

        Sprite yOffset = self.Y - Mouse.Y

    if [NOT] left mouse down : selected to False

    if selected :

        set X to Mouse.X+self.xOffset

        set Y to Mouse.Y+self.yOffset

    Oh and my way works with multiple instances, yours don't.

    Cheers too o/

    Oh and... The title of your topic has nothing to do with what you asked

  • Hi guys

    I managed to get all the description of the problem in the subject of the Topic.

    Basically I have a game in which the player can zoom in and out.

    As there's no such feature, I use layerscale.

    But let say I want to spawn something in this layer by mouse clicking.

    The coordinate of the mouse gets projected onto the layer which is scaled so the object doesn't appear under the mouse.

    I tried something basic like MouseX/layerscale("Main")

    I tried by scaling an offset from the center... It worked well with zooming, but when I scroll, it gets off.

    Well, I spent my afternoon on it and didn't find any good solution. So I'm asking you guys \o/

    Here is a little capix to try things :

    scaleProj.capx

    The red sprite is in the "Main" Layer and is supposed to follow the mouse even if scaled and or scrolled.

    thanks (:

  • interesting question

    do your characters have the ability to jump?

    And if they do, Is the jump based on grid movement?

    If it is... Strange feeling

    Anyway here is what I would do... I'm actually working on some changing gravity stuff too so I already figured out some stuff like how to unify code for all direction.

    Basically I use some vector concept

    like in the basic direction you have

    Up : (0,-1)

    Down : (0,1)

    Left : (-1,0)

    Right : (0,1)

    as vector for each direction.

    if you have a character on a wall facing right, his up, left, down and right vector would be something like (1,0), (0,-1), (-1,0) and (1,0)

    etc.

    So the idea is to have 9 variables for each character (enemy or player).

    Only one is really important but the other are better for code readability

    so these variables would be :

    • direction (the most important one)
    • xT and yT (for the top vector)
    • xB and yB (for the bottom vector)
    • xR and yR (for the right vector)
    • xL and yL (for the left vector)

    the direction variable can have a value form 0 to 3 representing the 4 possibilities :

    • 0 on the ground
    • 1 on a wall facing right
    • 2 on the ceiling
    • 3 on a wall facing left).

    This way you can set each of your vector depending on this variable like this :

    Top

    xT = round(sin('direction'*90))

    yT = 0-round(cos('direction'*90))

    Right

    xR = round(cos('direction'*90))

    yR = 0-round(sin('direction'*90))

    Bottom

    xB= 0-xT

    yB= 0-yT

    Left

    xL= 0-xR

    yL= 0-yR

    and then if you want to move a character to his right you just have to :

    + MouseKeyboard: On player 1 pressed "Move Right"

    -> Character: Set X to 'xR' * 'speed' * TimeDelta

    -> Character: Set Y to 'yR' * 'speed' * TimeDelta

    Now for the grid movement :

    You have to set the size of your grid cell in a global variable

    I will name it global('cellSize')

    you also need a variable that will carry the direction of your movement during the interpolation between one cell to the other

    I propose 'xMove' and 'yMove' this way we will also use the aformentionned vector.

    And to be accurate we will store the coordinate of the character before the interpolation in 'xStart' and 'yStart'

    Then you wil have something like that :

    + MouseKeyboard: On player 1 pressed "Move Right"

    -> Character: Set 'xStart' to .X

    -> Character: Set 'yStart' to .Y

    -> Character: Set 'xMove' to 'xR'

    -> Character: Set 'yMove' to 'yR'

    now 'xMove' and 'yMove' carries the direction of the interpolation.

    while 'xStart' and 'yStart' keep the origin safe.

    Now you just have to do :

    + Character: Value 'xMove' Greater than 0

    + System: Abs(Character('xStart')-Sprite.X) Lower than global('cellSize')

    -> Character: set X to X+'speed'*'xMove'*Timedelta

    + else

    -> Character: set X to 'xStart'+'xMove'*global('cellSize')

    -> Character: set 'xMove' to 0

    + Character: Value 'yMove' Greater than 0

    + System: Abs(Character('yStart')-Sprite.Y) Lower than global('cellSize')

    -> Character: set Y to Y+'speed'*'yMove'*Timedelta

    + else

    -> Character: set Y to 'yStart'+'yMove'*global('cellSize')

    -> Character: set 'yMove' to 0

    And that should do.

    So to sum up, you just have to put whatever direction you want in 'xMove' and 'yMove' to make your character moves

    ah and the 'speed' variable is how many pixel/second you want it to move.

  • I think that might help you

    selection.cap

  • And what do you think of that ?

    bigNumberDisplay.capx

    Just store units, thousand, million, billion in different variables

    Increment each one depending on the preceding one

    and just use a bit of string manip to zero fill them when displayed.

    right("000"&number,3) does the trick.

    Are you appy?Yann2014-01-27 09:44:09

  • Oh a nice one indeed. I'll add it as soon as I have the net back (house moving).

    DONE!

  • This list is a tool, what you do with it, good or evil, is your own and only responsablity \o/

    (that means yes of course)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • <font size="3">Audio</font>

    Audiere

    By R0J0hound

    Description: Here is a alternative to XAudio2 for having sound in your game. It uses the Audiere sound library as a base and it can play Ogg Vorbis, MP3, FLAC, uncompressed WAV, AIFF, MOD, S3M, XM, and IT files.

    It behaves much like XAudio2 but instead of channels you access loaded sounds and musics by alias' (or names).

    BASSMOD

    By Xtense

    Description: A wrapper to use BASS audio library in construct

    PC Speaker

    By Dataflashsabot

    Description: Make old-skool music with the PC speaker. Can be also nice for sound placeholder.

    <font size="3">Controls</font>

    CGUI

    By sglorz

    Description: Customise your graphic user interface

    <font size="3">Data&Files</font>

    Command Line

    By linkman2004

    Description: This plugin allows you to access and interpret all command line arguments passed to your program upon loading. This is useful for passing instructions or file paths to your program before startup.

    Resource

    By R0J0hound

    Description: Construct already has the feature to add files to include when building an executable, But only the Xauido2 plug-in has the ability to access those files. This plug-in provides access to those files to any plug-in that can load files.

    Deque/Queue/stack

    By Arsonide

    Description: it's actually a pack of 3 plugins which revolve into similar concepts. Go see the topic for more insight.

    MD5

    By BROO

    Description: There's only two expression "Get MD5 String" and "Get MD5 File". Can be usefull.

    <font size="3">Game</font>

    Advanced Object Creator

    By Aeal5566

    Description: It allows you to create objects by name an instantly set the Height Width and Angle. This option allows you to easily create new instances of the same objects without having to deal with object picking. It also has a create grid feature that will do just that for easy grid making. It also has two scatter options one with randomized Dimensions and one without.

    As the link is broken, you can download it here Advanced Object Creator

    BulletML

    By Luomu

    Description: It allow you to use the Bullet Markup Language to shoot complexe pattern of bullet.

    CustomControls

    By lucid

    Description: Customize all the controls for your games

    Dungeon generator

    By Luomu

    Description: This plugin can easily build a maze or a "dungeon"

    FileDialog

    By Lucid

    Description: let you use a fully customizable file dialog popup window.

    Fluids (incomplete)

    By lucid

    Description: it allow you to produce neat smoke effects.

         

    Game Jolt API

    By CROS

    Description: it allow you to use the Gamejolt achievement system within your game.

    GridTree (incomplete)

    By Arsonide

    Description: GridTree helps you generate infinite worlds

    Input System (incomplete)

    By sglorz

    Description: Manages Keyboard, Mouse and Joystick through DirectX using the Win32 part of OIS. There are also many other things to discover.

    MagiCam (incomplete)

    By linkman2004

    Description: Allow you more control over scrolling, as if you were in control of a camera.

    Math

    By lucid

    Description: Add two interesting function Math.AngleLerp and Math.Lerp

         

    mousemov

    By lucid

    Description: this is a plugin for detecting mouse movement, (not just changes in screen coordinates) through directinput.

    Network (incomplete)

    By scidave

    Description: Allow you to make online apps and games : chat, action game, board game, etc.

    Perlin Noise

    By Arsonide

    Description: allow you to use the Perlin algorithmm to everything from cloud textures, to detail maps on "dirty" textures, and more importantly - to generate terrain.

    S (incomplete)

    By Lucid

    Description: S stands for superstructure, or systemplus. it is shortened to 's' to require the minimum amount of typing when invoking expressions. also, s happens to be the first letter in two of it's major functions...

    Screenshot (incomplete)

    By scidave

    Description: It only has one command right now, an action to take screenshot.

    Sprite Button

    By linkman2004

    Description: This plugin allows you to quickly and easily create your own custom buttons with custom graphics and text. Four types of buttons are supported: Normal, two-state, check-box, and radio buttons. A full feature list is found below.

         

    SpriteFont (incomplete)

    By lucid

    Description: Basically transform text into bitmap

    State Machine

    By Aeal5566

    Description: ?A state machine is a logical construct. It's basically a way to simplify handling an object by reducing it's flood of information down into one single "state" variable, that returns simple values like "walking" or "dying" so that you can interact with it it more easily.? (source: deadeye)

         

    UniqueSprite (incomplete)

    By lucid

    Description: I allow you to have many instance of the same sprite but with different texture in it.

    Wiimote (incomplete)

    By Luomu

    Description: enables using a Wii remote in construct applications via bluetooth.

    <font size="3">Graphics</font>

    TextureSetter

    By R0J0hound

    Description: This plugin allows one object to use the texture of another. It does not copy the image like ImageManipulator does, it just reuses the same texture. This results in instant texture changes.

    Noise (incomplete)

    By Arsonide

    Description: Like Perlin Noise but more powerfull

    <font size="3">Other</font>

    IK Solver 2

    By linkman2004

    Description: This is a plugin that takes all of the fancy math out of solving 2-bone IK chains. It automatically rotates the bones to the correct angle to reach a specified control point. It also positions the second bone automatically to the end of the first.

         

    Unix Time

    By linkman2004

    Description: A plugin with exactly one use: returning the Unix timestamp.

    <font size="3">Behaviors</font>

    Path

    By R0J0hound

    Description: allow an object to follow a path

    Gravitation

    By linkman2004

    Description: This is essentially a far more advanced version of my Orbiter behavior. BUT... instead of merely rotating an object around another object in a completely predictable/stable orbit, this acts more like a gravity well. You can set an object to act as a satellite, an attractor, or both, where every object could have it's own pull on the others and orbit the others as well.

    Scale

    By linkman2004

    Description: handle scaling animation

         

    Orbiter

    By linkman2004

    Description: This is a behavior which can be added to object to make them orbit another object. This usually takes a small bit of complex math, but the Orbiter behavior takes all the math out and provides speed improvements over doing it with events.

    <font size="3">to be released</font>

    MUSE (incomplete)

    By Arsonide

    Description: This plugin does not seem to be done yet (or am I mistaken?). I list it here 'cause you can help Arsonide by generating syllable sets. For more insight, I advise you to read the topic.

    Ok I think I'm done with this list

    As for the effect list, feel free to pm me about adding/modifying/deleting stuff

    PM me when you make a new plugin or effect too... I won't spend my life on the forum watching out for them, but adding them can be really quick.

    Ok then, hope it will be usefull

  • HSV

    By Animmaniac

    Description: Adjust Hue, Saturation and Value.

    <img src="http://www.prr-art.com/things/construct/hsv.gif" border="0">     

         

         

    Blur

    By Animmaniac

    Description: Simple blur with blending control.

    <img src="Simple%20blur%20with%20blending%20control" border="0">

         

    Pixel Noise

    By Animmaniac

    Description: Apply pixelated noise with color, opacity and refresh rate control.

    <img src="http://www.prr-art.com/things/construct/pixel_noise-02.gif" border="0">

         

    Depixelize

    By Animmaniac

    Description: Smoothen edges of color clusters similar to Eagle and 2xSaI, with scale factor and blending control. Work best with pixelart and flat shaded images.

    <img src="http://www.prr-art.com/things/construct/depixelize-02.gif" border="0">

    Comic Book

    By shinkan

    Description: Apply to object or layer and hit preview.

    <img src="http://dl.dropbox.com/u/34375299/comic2.jpg" border="0"><img src="http://dl.dropbox.com/u/34375299/comic1.jpg" border="0">

    Sharpen

    By Animmaniac

    Description: Simple sharpen with intensity control.

    <img src="http://www.prr-art.com/things/construct/sharpen.gif" border="0">

    Apply Below

    By Animmaniac

    Description: Allows to apply effects to every pixel below it. All preceding effects in the stack will be ignored. If applied to a layer make sure to turn off 'Transparent' on layer properties.

    Lister's Note : In short it's as if all the layer under the one which has the effect get flatten and pasted into this layer, and then you can put an effect on all these layer. No need to copy past the same effect on all the layer below. Pretty Neat!

    Curves

    By Animmaniac

    Description: Abstract implementation of tonal curves for RGB, Red, Green and Blue channels with three fixed nodes: highlights, midtones and shadows. Can be used to adjust overall contrast or create advanced color filters.

    <img src="http://www.prr-art.com/things/construct/curves.gif" border="0">

         

    Radial Blur

    By shinkan

    Description: Apply to object or layer and hit preview.

    <img src="http://dl.dropbox.com/u/34375299/radial2.jpg" border="0"><img src="http://dl.dropbox.com/u/34375299/radial1.jpg" border="0">

         

         

    Noise

    By shinkan

    Description: Nothing much to describe, apply to object or layer and hit preview.

    <img src="http://dl.dropbox.com/u/34375299/Noise2.png" border="0"><img src="http://dl.dropbox.com/u/34375299/Noise1.png" border="0">

    Static Noise

    By shinkan

    Description: Apply to object or layer and hit preview.

    <img src="http://dl.dropbox.com/u/34375299/staticnoise2.jpg" border="0"><img src="http://dl.dropbox.com/u/34375299/staticnoise1.jpg" border="0">

    Advanced Filter

    By R0J0hound

    Description: This is a white level preserving color filter.

    <img src="http://dl.dropbox.com/u/5426011/examples3/filerex.JPG" border="0">

    Color Fusion (Masked)

    By tulamide

    Description:This effect should be used as a layer effect only. Although it shares the same name with Color Fusion, it works a bit different.

    Basically it recolors whatever is beneath the layer it is applied to. But, other than the original Color Fusion, this version uses the layer it is applied to as a "cut mask". Whatever objects are placed on this layer are used to cut holes into the color field, letting the original colors shine through. Color Fusion (Masked) handles semi-transparencies (fog of war, spotlights, etc.) and even mixing the cut mask object's color.

    <img src="http://img220.imageshack.us/img220/3618/daynightl.th.jpg" border="0"><img src="http://img841.imageshack.us/img841/4713/verve3.th.jpg" border="0">

    Color Fusion, formerly Color Overlay

    By tulamide

    Description: This effect just merges a certain amount of a chosen color to the original. I did this one, because I didn't find a simpler one.

    <img src="http://www.bilderhoster.net/img.phpid=chnr5xx6.jpg" border="0">

         

    superBloom

    By Davioware

    Description: superBloom is a bloom lighting shader with adjustable intensity, light bleed, luminosity color weights, and luminosity curve. It also features an editing mode which allows you to adjust the luminosity map (when active, it only renders the luminosity map).

    <img src="http://dl.dropbox.com/u/1010927/Forumpics/Bno.png" border="0"><img src="http://dl.dropbox.com/u/1010927/Forumpics/Byes.png" border="0">

         

    Distance MultiSample Blur

    By Valerien

    Description: A parametrable gaussian blur

         

    AllWhite

    By DravenX

    Description: Makes a sprite completely white

         

    NuovoFill

    By Davioware

    Description: This fills the opaque areas of a sprite with a solid color to a selectable linearly interpolated degree. This allows for smooth transitions between color blending intensity. 3 blending modes are available and changeable at runtime: raw color, additive, and, multiply.

    Can be used to create more modern style (smooth transitioning) flashing,damage,and powerup effects.

    <img src="http://dl.dropbox.com/u/1010927/Forumpics/Nuovopic.png" border="0">

         

    RetroFlash

    By Davioware

    Description: Fills the opaque areas of a sprite with a solid color, and features an adjustable automatic flashing effect (can also be set to not flash to simply fill a sprite with color).

    <img src="http://dl.dropbox.com/u/1010927/Forumpics/SolidFill.gif" border="0">

         

    Super Emboss

    By Davioware

    Description: This is like the emboss effect, but features controllable image offsetting. The example .cap shows how it can be used to create a 70's film quality post-process effect.

         

    Gradients

    By tulamide

    Description: This effect draws color gradients over objects, using the object's alpha as a mask. It handles semi-transparencies and can be mixed with the original colors of the object. It is very useful in combination with (but not limited to) the text object, as you can see here:

    <img src="http://www2.mediafire.com/imgbnc.php/539688574da2bcb7b7e52bf2702f50d1cccb4cbe53c778620f2d9e7820525ce26g.jpg" border="0">

         

    [url=http://69.24.73.172/scirra/forum/viewtopic.php?f=29&t=4288&p=58431&hilit=

    [EFFECT]Alpha+Treshold]Alpha Treshold (old forum)

    By madster

    Description: Alpha treshold will remap the alpha contained in the source.

    Think of it as a smooth threshold. Start indicates the start of the new alpha ramp and End indicates its end.

         

    Color Replace

    By R0J0hound

    Description: Replaces one color with another.

         

    Scanlines (with offset) (old forum)

    By madster

    Description: This effect produces dark, smooth "scanlines". You just input the number of lines the screen will have and the width (as a coverage percent) and the intensity. Optionally you may provide an offset, so you can have the scanlines oscillate or glide or whatever. This is done as a percentage, so 0% and 100% look the same.

    GreyShade

    By tulamide

    Description: let you convert rgb to greyscale with different algorithms and event weight channels.

    <img src="http://www.mediafire.com/imageviewquickkey=dzwhdnyyznk&thumb=5" border="0"><img src="http://www.mediafire.com/imgbnc.php/2a9d5ed26edce87505fd80ded15124812g.jpg" border="0"><img src="http://www.mediafire.com/imageviewquickkey=zl4oounzmri&thumb=5" border="0"><img src="http://www.mediafire.com/imageviewquickkey=0ng2z2zgztj&thumb=5" border="0"><img src="http://www.mediafire.com/imageviewquickkey=hfjtvwamtnn&thumb=5" border="0">

         

    Radial Gradient

    By tulamide

    Description: A radial Gradient. Look!

    <img src="http://www.mediafire.com/imageviewquickkey=vwuhko2m1jj&thumb=4" border="0">

         

    ZoomBlur

    By tulamide

    Description: Exactly what the name implies. A classic zoomed blur.

    <img src="http://www2.mediafire.com/imgbnc.php/7e399fa18f3f67d0be10ff598a631c373g.jpg" border="0">

         

    Disk

    By tulamide

    Description: The boring basic explanation is, Disk allows you to focus on a part of an object using an oval shape by darkening everything outside the shape.

    <img src="http://www.mediafire.com/imageviewquickkey=yyjauzonigl&thumb=5" border="0"><img src="http://www.mediafire.com/imageviewquickkey=4bjmcmzzoqj&thumb=4" border="0">

    Hue Shader

    By linkman2004

    Description: This shader alters the hue value of each pixel of an image independantly. It takes one parameter, Hue, which is a value between 0 and 360, sliding the hue of each pixel based on that value.

         

    Blur Motion (old forum)

    By madster

    Description: Adjustable-size motion blur. Good for speeding objects.

    Use two times in perpendicular angles (0 and 90) to get adjustable-size gaussian.

    Refraction [LINK ON THIS POST]

    By Damizean

    Description: This effect refracts the objects underneath it through the use of a normalmap texture. This effect is useful for distortioning images to make effects like glass or water refraction. The key difference with the distort effect is that this one the distortion over each axis is controllable through the normal's color channels.

    As the link to download this effect is now dead, it can be nice if someone, who still has it, share it.

    Edit: thanks to newt this fx is now downloadable Refraction

    Heightmap plus

    By madster

    Description: It shades the underying image using a heightmap-derived (grayscale, white is high) bumpmap. Alpha is taken into account, so transparent parts of the heightmap do nothing to the underlying image.

    Also, specular spot size and intensity are done as in the phong model.

    Coloured Outline (old forum)

    By Luomu

    Description: a modified version of the basic Outline effect to have a Red/Gree/Blue/Alpha parameter (in percent).

    Colour Mask

    By Somebody

    Description: Basically what it does is: You pick a RGB colour and you can control that colour's opacity

    <img src="http://i244.photobucket.com/albums/gg36/some9000/cd6dfc98.png" border="0">

    <img src="http://i244.photobucket.com/albums/gg36/some9000/c50dc82e.png" border="0">

    C-DEX

    By tulamide

    Description: C-DEX is an effect that allows for gradient mapping. An offset parameter enables palette animation as well, which is the highlight of the effect. It is designed to be as easy to use as possible.

    <img src="http://dl.dropbox.com/u/11182740/construct/C-DEX%20beta/cdexscreen.png" border="0">

    Flip Layout

    By tulamide

    Description: This effect flips a bunch of layers up to the entire layout.

    <img src="http://dl.dropbox.com/u/11182740/construct/fliplayout1.png" border="0">

    <img src="http://dl.dropbox.com/u/11182740/construct/fliplayout2.png" border="0">

    Ellipse

    By tulamide

    Description: This effect flips a bunch of layers up to the entire layout.

    <img src="http://dl.dropbox.com/u/11182740/pictures/ellipsefx.png" border="0">

    ChannelToAlpha

    By Funky Koval

    Description: This is mostly an utility effect - it replaces/multiplies the original Alpha channel with/by either the Red, Green or Blue channel.

    and a few orphan (no forum post) effect :

    AmbientShadow by David Clark

    Bumpmapping3D by David Clark

    Voil? \o/

    If anyone has anything to add/remove/modify feel free to ask, better pm me, I'm not here that often (:

    If you create a new effect, PM me to have it in the list!

    It would be great if the effects without picture could have a few to discribe them... I like the animated gifs of Animaniac... It's clear and takes less room.

    Well enjoy now =D... Time to list plugins too

  • Here InkBot, same thing, but with half the number of event (14 instead of 33), and potentially... I hope... a bit more efficient.

    The function object is neat when you begin to see repetition of the same kind of code. There's a getting a use to it, but it's worth it.

    also, you put strange values in the random(), I rewrite these line with the equivalent. But if you wanted a particular range value of force, like between -15 and -20, you should put :

    20-random(5)

    for -20 to 30 it would be :

    random(50)-20

    bitwise_terrain_better_better.cap

Yann's avatar

Yann

Member since 31 Dec, 2010

Twitter
Yann has 5 followers

Connect with Yann