lucid's Forum Posts

  • to spawn sprites in specific locations with specific dimensions

    System : Create Object (let's you specify the location)

    Sprite.SetWidth

    Sprite.SetHeight

    actions after an object is created, and in the same event will apply to the object that was just created

    if you're using behaviors to move your sprites, most behaviors have an expression for speed,

    for instance, Set private variable MyCollisionSpeed to

    and then double click on the sprite, and click on the behaviors tab to find the expression for speed

    if you're using your own movement method, and no behavior, the way to determine speed is to set up two private variables, previousx, and previousy

    if you need absolute speed, or the specific x and y speed

    always

    set absspeed to distance(previousx,previousy,sprite.x,sprite.y)

    set xspeed to(sprite.x-previousx)

    set yspeed to (sprite.y-previousy)

  • rockin

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • if what you're asking is what I think you're asking, you may be looking for templates

    when you make an array of anything you can set a default for new array values

    templates are the defaults for super arrays

    in the example cap I didn't use a template because I wasn't sure if you knew about them

    but in this case you would say

    Action : Create Template

    template name "coord"

    add number array to {"t","coord"} "x" with default 0

    add number array to {"t","coord"} "y" with default 0

    the "t" as the first part of the address tells s you're adding to a special template super and not a regular super in your whole data structure

    you can use these as you can any other super, adding other supers inside if you wish, etc

    now when you create a super array you can do

    create super array "mycoords" with default "coord"

    now each time you add a super, it will already have the "x" and "y" arrays in it

    you can even fill the arrays with values in the templates if you wish, so each new super will be preloaded with preset values

    it may not seem immediately evident now, but there may be cases where you don't want the second super in an array to be exactly like the first, and vice versa, templates give you the ability to decide what goes in every super, without forcing you to put the same arrays in each one

    a few things of note, don't add objects into the templates, because object pointers change each time the program starts, so they would be invalid, you can add object types though. when you save and load supers to disk, you have the option to save your template data too. also, unlike arrays of anything else you can't access a super array outside of range and get the default

    meaning if your array has 5 supers you cant try to access index 9, and get access to the templates

    it really wouldn't make any logical sense anyway. but just so you know

  • why thank you minor

    btw, do you remember what the situation was where you needed a workaround

    it may be possible to bring this plugin up to a status of "use it this way"

    instead of my normal policy as of late "don't use it"

    I never had problems with it either

    another question, have you ever used it with multiple layouts?

    everytime people had problems using the plugin, their caps were always very different than I would have made them. there might be a dependable way to use this plugin yet

  • Whoa. So you mean spritefont hasn't caused you any problems? That's awesome

  • Hmmm. Ill take a look when I get home. In the meantime if you can get the debugger to give a message(the s debugger actions, not the regular construct debugger). I might be able to figure it out with those, and if it crashes before the debugger can figure out why, it'll almost guarantee it is an s problem and not a user error

  • I'm not at home to look at the cap

    But I ve had to use find replace a few times recently

    And I can tell you what I've nopticed.

    First if you try to replace an object name with another object name and the second object doesn't exist or is missing something like a private variable it doesn't have it won't work, and it will give no error. It will crash on most conditions that contain any reference to a function object. Sometimes it will mess up your actions so they look strange in the event sheet, but when you doubleclick and reaccept it its back to normal, and sometimes it will look fine in the event sheet but when you doujbleclick a string is empty instead of containing what it had before the find replace.

    if its a large find and replace operation I would still use it, and try a few different actions or conditions individually, and maybe there is a common thread to the oness that crash.

    Every few successful find replaces save again with a new filename. Not as nice as a fully functional find and replace, but still better than manually changing 50 events

  • I agree with the others

    even more experienced members, myself included, find themselves overwhelmed after realizing what a project really will take

    start out with a simple 1 on 1 swordfighting game

    then maybe a whole beatemup level with the same mechanics

    if you start on that huge game now, you will probably never finish

    especially if you're worried about how often you'll have to ask for help

    also, construct has it's bugs and quirks, you need to get a feel for it as projects grow

    I wouldn't recommend undertaking anything huge until you get really comfortable

  • <img src="http://dl.dropbox.com/u/1013446/cube.png">

  • oh wow

    I know I'm incredibly late on this

    but goodness this is so much more user friendly then the cvs

    right click, checkout, paste url

    done

  • I found the workaround I need anyway, but no I meant having hundreds of ai controlled npcs. It would have been really clean and easy to work with to justt be able to Set Control State "jump" or "move right" to control them. I suppose then there's the ten player limit as well. But still, ill put a feature requuest in to be able to assign player numbers at runtime. It seems like the most straightforward way to do local multiplayer

  • I wanted to make a multitude of platform behavior controlled sprites

    and control them by Set Control

  • um...I'm at a total loss with this step thing...

    I really don't get it at all

    am I correct in believing it should be simple to implement something like platform movement, but using only custom movement?

    http://dl.dropbox.com/u/1013446/howyoudodis.cap

    if this is a ridiculous request, let me know, but

    can someone remake this cap using custom movement so that will behave exactly as platform movement does?

    the speeds and acceleration need not be the same, just the basic way it reacts to input, gravity, and collision

    I really don't get the stepping thing at all, half the time I try and do something it just freezes movement altogether before it hits anything.

    and when it didn't, I could get gravity and horizontal acceleration working, but on collision with the ground it kept jittering into the ground

    EDIT:

    ok this works:

    http://dl.dropbox.com/u/1013446/howyoudodis2.cap

    still don't understand the stepping thing

    and if someone knows how this could work just the same without the detector sprite, please let me know

  • no I mean

    if I want platform movement for instance to be controlling a player

    I can't make two instances of the same platform sprite object be controlled by two controllers assigned to two different players