lucid's Forum Posts

  • in the following cap

    dragging an A or B box over a 1 or 2 will highlight it as picked

    after that if you drag a picked 1 or 2 above the red line it should highlight the A or B box

    click here for cap

    if you go into the event sheet, and switch around which event is toggled

    it behaves differently

    there is only one difference between the two events:

    the original event uses sprite-compare y position

    and the second event uses system-compare sprite.y

    should I post this to the bug tracker?

    I was trying to recreate the bug from a larger cap where it had more serious effects

    it also began with

    for every A, pick B

    and then after the system-compare, it would pick some unpaired objects that belonged to another pair

  • you can try putting the laser on it's own layer

    and applying a layer effect to that layer

  • ok, here's a simple cap

    example

    I think you will be pleasantly surprised by how short it is

    it sounds more complicated than it is

    please examine it, and let me know what parts, if any you need help with

    to test, drag and drop the ship and the two control points

    click here to download

  • make a segment of laser, like if you could cut a small square out of the raiden laser going straight upward

    create a distort map for it, 1 across, however many segments you want down (try 10)

    create 2 different sprites to use as a bezier control point and an endpoint (we'll call them sprite1, and sprite2)

    make a bezier curve using the quadratic function (qarp)and the locations of the 2 sprites and the an imagepoint on the nose of your ship

    if you need help understanding what you're doing a little better, read some of this wikipedia article, especially the little moving diagrams near the end

    but for practical purposes what you will do

    is set each segment of your distort map in this way

    h=half the width of your laser

    for 0 to NumberOfSegmentsOfDistortMap

    set displacement (real) column(0)row(loopindex)

    x to qarp(ship.imagepointx(nose)-h, sprite1.x-h, sprite2.x-h,1-loopindex/NumberofRowsindistortmap)

    y to qarp(ship.imagepointy(nose)+h, sprite1.y+h, sprite2.y+h, sprite2.x-h,1-loopindex/NumberofRowsindistortmap)

    set displacement (real) column(1)row(loopindex)

    x to qarp(ship.imagepointx(nose)-h, sprite1.x-h, sprite2.x-h, sprite2.x-h,1-loopindex/NumberofRowsindistortmap)

    y to qarp(ship.imagepointy(nose)+h, sprite1.y+h, sprite2.y+h, sprite2.x-h,1-loopindex/NumberofRowsindistortmap)

    this will bend your sprite along a curve beginning at the nose of your ship

    and ending at sprite2, and the curve will be guided by sprite1

    always

    set sprite1.x = ship.x, and sprite1.y = to ship.y + a number that makes the ray look cool

    sprite 1 will be guiding the laser, so if you want it to lean toward y, subtly the way it does in raiden this is a good way to start

    set sprite2.y = 0 (top of the screen), and sprite2.x to ship.x + a number that changes when you're moving to the right or left, you can decide exactly how you want this to look

    you can also add small random values to either control point for a wobbly effect

    use an instant bullet aimed at sprite2 to check for hits

    once you hit an enemy ship, set sprite2's position to the position of the ship

    and make sprite1 move drastically to the right or left as your ship does

    if you need more details on any of the steps I can help you, but I can't post a cap just now

    if you get this far, you may notice something a little different about the bending of the ribbon

    because we're using parallel lines, the fix is simple, and takes only a minute, but might be confusing in the middle of this

  • I think this would be useful as well

    one example was that random star map generator

    I could have only tracked a few stars at a time

    and still been able to make a huge level where you would see the stars you passed if you went back to look for them

  • I like it rilem

    but I think you should have only that one section under the first one

    and a huge download button as aritz said

    then when you click that it should bring up the download latest stable and all that

    and I also agree with quazi

    we have to get some cooler graphicalness that shows what construct does, without being too specialized towards one particular game

  • I tried this before but can't get it to work... what am I doing wrong?

    I have no idea why it was doing that, unless you were trying the animation method first...it really makes no sense to me

    anyway, start from scratch and it should work, I think that was some random nonsense,

    also, if you use the "mouse is over" with "system-else" instead of always

    it makes more sense, and it's probably more efficient then the other way

    like this

    click me

    you can make all the mouseovers work with one event, but then you need use the object pairer and families, if you have questions on how to do that, let me know

    if you have alot of mouseovers you want to do, broos method will be much cleaner as rich said

    it just seemed kinda complicated if you're just getting into construct

    which I assumed you were, since I haven't seen your avatar around

    welcome!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • thanks

    this is good stuff

    especially the private variables stuff

    I've got to try out some random things and see how they work

  • wait

    there's an easier way

    make a mouse and keyboard object

    then two events

    system - always
         offsprite.set visible: visible
         onsprite.set visible: invisible
    
    mouse/keyboard - mouse over object - offsprite
         offsprite.set visible: invisible
         onsprite.set visible: visible
    [/code:3q634y47]
    
    [url=http://willhostforfood.com/access.php?fileid=63355]click here for cap[/url]
  • ...Do you want to do a #8 on conditionals by the way, or should I?

    I took 8...sorry bout that, but can you please tell what this conditional thing is?

  • I know this is no substitute for an object, but

    it's kinda fun

    and it works differently than the other cap I saw, shorter and more customizable:

    if you want to use a different font

    make the sprite font strip evenly spaced,

    and input the characters from your font strip into text2 and you can use any fontstrip you want

    maybe you'll want to edit it for your purposes

    to test

    just type in your words into the edit box

    click here

    as you can see, you can do text blitting in just a few events

    also, if you wanted to make it more efficient, you could make it so it didn't start from scratch every time

    but it runs well on my machine at least, until you type a few hundred characters

    for you troubleshooters out there if you change the toggle off on that action in the beginning and move sprite2 onto the board, you'll see it's glitchy for the first 50 something characters kinda weird, not gonna troubleshoot it anymore for now at least, not having any luck

  • I thought you wanted it to only make this new one flash

    but since that's happening, you must have meant something else

    i didn't even realize you could make it create a random one by asking it to create an object from a family

    but

    if you want it to create the new random one and still make them all flash, then when you call your function tell it to "forget" picked objects instead of remember

    then they all flash when the random one is created

  • empty project, the object in question

    + 1 text object displaying vram remaining

    hash table with 10 keys

    2522873856 k in vram

    12576 k in task manager

    10x1x1 array

    2522873856 k in vram

    12556 k in task manager

    0x0 sprite with 10 entries (invisible and off screen)

    2522873856 k in vram

    12528 k in task manager

    0x0 sprite makes 0 impact in vram when invisible

    I did this twice, accidentally erased my post the first time

    and the other time the sprite used the most ram in task manager

    with the array in second. I guess it doesn't make much of a difference

    it's all a matter of convenience

    unless you plan on having 100s of variables, which I do

    but then, you'll probably need an array

    or a bunch of sprites storing xy info anyway

    I think it's low priority,

    but I don't think it's worth getting all aggressive about

    also, I get his point

    it is a workaround. it's no big deal

    it's not like construct is full of em

    but it is.

    putting a text object I don't need in a project in order to store variables locally

    is a workaround

    it's not even a pain in the ass, it's almost as simple as having an object made for it

    but it is a workaround.

  • is there any good way to do such a thing?

    Private variables don't correspond to an ordered indexed list of objects

    is there an ordered indexed list of objects somewhere? like if i keep track of what order they are created, can i pick them by index? ooooh! i just thought of a cool idea that might work for this particular need. let me know if you see any holes. basically i had a hundred or so sprites ordered in a certain way, and i wanted the last one dragged to remain pickable indefinitely, so i could do operations on all sprites, or pick a group, but still go back and that selection could be used as needed for all future actions until another was dragged. i could make a single object of some type called "picker", and then use the object pairer, and use an event to pick picker everytime i need the other thing. neat. still though, i can see other times when being able to single out a pick like i was trying woukd be useful, is it possible to do in a nonwasteful way?

    thanks rich for the response

  • I don't know much about how events work from a behind the scenes standpoint, so I have a question about how much cpu time I am or am not wasting doing something a certain way

    so let's say I had a 1 dimensional array of objects in c++

    and I decide I want to do something with some arbitrary object (let's say..the 24th object) in the array

    I can just say my_array(23) - do whatever

    now in construct, I can create an 'array' of objects using a loop that creates one object per iteration, sets a private variable in that object(let's call it "index") to the loop counter value, and every object gets a unique ordered index

    then later I can pick any object directly by having an event with the condition

    sprite.value('index') = 23

    works fine, easy, wonderful

    my question is, from a processing standpoint, is this like c++, pretty much direct

    where one object has this index, so it triggers this event

    or,

    am I basically making the exe loop through every object and check the value of "index",

    so if I have 100 objects, I'm making it do 100 steps instead of 1?

    i suppose for one group of objects it shouldn't make or break anything,

    but for the project I'm working on, there are going to be quite a few picks like this going on