lucid's Recent Forum Activity

  • New Customizable Controls plugin

    • Change your key settings at runtime.
    • Works with built in behaviors.
    • Customize all controls for your games: mouse, keyboard, and XBox360 controls.
    • Display set keys for Key, Mouse, and Pad controls, or use images for XBox 360 Pad buttons.
    • Save and Load Controller Configurations to Disk.

    Fixes some Construct 99.4 glitches to hold you over till the next build

    • Fixes Glitch where fourth 360 Pad isn't Detected.
    • Fixes Glitch where Right Analog Stick Up isn't Detected.
    • Has a working Set Control State action.

    Now fixes 360 pad issues where pressing to the left or right slightly on analog thumbstick will sometimes also trigger up and down movements

    <img src="http://dl.getdropbox.com/u/1013446/Captur55e.png">

    DOWNLOAD PLUGIN AND EXAMPLE CAP

    FOR THE LAZY FOLKS, HERE'S AN EXE VERSION

    Microsoft Permissive License.rtf

    The button images contained in the CAP file inside the rar file on this page are bound to the Microsoft Permissive License (Ms-PL).

    these button images are downloadable here.

    To use this cap:

    • click on the name of a control
    • the next thing you press will be set as the button

    example cap is tutorial

    please report if there are any bugs

    also, please tell me your thoughts on the button image system

    I'm considering making it work with sprite frames

    but I'd like to hear scirra's thoughts

    -----------------

    quick tips

    -----------------

    to set default controls for your game

    • make a cap where the player can set controls
    • temporarily make it save to the filename "default" (or whatever you want to call it)
    • load your game, and set the keys, and save
    • then change the cap so it no longer saves to "default", and it saves to "user"
    • you can then choose when to load your defaults as necessary

    How do I show the player what button is set?

    The ControlString(control name, player number) expression returns a string for the name of a set key

    for instance

     Set Text to : CustomKeys.ControlString("Move Left",1)[/code:25l3013g]
    would set the Text to [i]"Left Arrow"[/i] if that was the button set for Player [i]1[/i]'s [i]"Move Left" [/i]control
    The [b]Set Control Sprite[/b] and [b]Show Control Sprite[/b] Actions allow you to display an image for an xbox 360 control
    
    [h2][u]what if I want it to say [i]Mouse1[/i] instead of [i]Left Mouse Button[/i], or [i]Enter[/i] instead of [i]Return[/i]?[/u][/h2]
    the[b] Set Control String[/b] action allows you to overwrite the name of a control, so you can make it say "LMB" instead of "left mouse button" or whatever you want
  • edit:ashy's right, but I already typed this, so...:

    two parts to the answer

    first is, it only jumps down if you have word wrap on

    if you turn off word wrap it'll act as if the bounding box is infinite

    second, is

    you can set Write Text to 2 different settings

    "insert" writes the letters one by one

    as if it were a complete phrase

    it looks nice, and very different for centered or right aligned text

    "absolute" is what you're asking for

    this writes the letters in their final spot, this will make it wrap the words

    before it gets to the letter that causes the wrap

    the following cap demonstrates the difference between insert and absolute

    http://dl.getdropbox.com/u/1013446/absolutevsinsert.cap

    left click to see insert

    right click to see absolute

  • Yeah some interpolation would be required. An expression like get stack amount would be nice.

    definitely going to have "get size" stuff

    also considering interpolating, but for other purposes, like

    an action to Lerp Object positions between blank and blank

    which would automatically lerp, qerp, or cubicly interpolate the positions of all the objects automatically making the first and last objects be in the correct positions

    it would be a nice shortcut for a commonly done function

    ...

    Well, it is not a hack per se, just bit of a clever solution. What you do is add two or more families, depends how complex your picking code gets....And that's it from me.

    thanks for the explanation

    and that's a perfect example

    you could do something like this without using the family trick

    I understand the family trick works perfectly well, but logically it doesn't correspond with the intended purpose, as in, reading the events doesn't make it immediately obvious what it's doing like it normally would

    and being able to create these picking relationships on the fly would allow more power and flexibility

    so you could do something like

    if Sprite.x<100 place spriteA in group "LeftFam"

    if Sprite.x<100 place spriteA in group "RightFam" if Sprite.x>100

    if sprite('yodude') = "whatup" place spriteA in group "CoolGuy"

    if spriteA in "CoolGuy" is overlapping spriteA in "LeftFam", do whatever

    know what I mean?

  • Hmmm, how about stack object?

    eh...I don't know, it does alot more than stacks, and stack is a programmer's term

    construct is supposed to be a tool especially made for nonprogrammers to be able to jump in and use

    [quote:10sz4cw5]Oh wait will this even be an object? Cause it kinda needs to be built in. You know with the functionality of an object, as well as a behavior, kinda like families are.

    I can't build it in. I can only make plugins, but I'm not sure why it needs to be like a behavior, or how are families like behaviors?

    you won't be able to use it like a family in the sense that there won't be an icon representing your custom families

    however, I do plan to have collisions and comparisons, etc.

    you would have to use the objects' conditions to test for collisions, as opposed to the sprites' collision tests, though

    but it will amount to the same, and use the same collision testing techniques

    as for object specific things, like sprite 20 having a behavior, or being a panel instead of a sprite, and you want to access those things, one of the main points of this plugin is to fill in any gaps with picking you would have

    the picking system is awesome, but there are certain things that are difficult or impossible to do with picking right now, picking objects included in the plugin is going to be as comprehensive as possible. I am going to try to cover all the bases

    [quote:10sz4cw5]

    As to the double family hack take a look at this:

    http://dl.getdropbox.com/u/666516/stareater.cap

    Taken from one of the compo's lol

    thank you, but can you just give me a sentence or two that describes why you'd need it

    all this segmentation stuff is distracting me from the basic picking issue that makes the family hack necessary

    [quote:10sz4cw5]

    Also for the stack, how about placement as a percent?

    what do you mean?

    like add object at 50%?

    what happens if you have 10 objects and you tell it to place at 15%?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • it didn't crash or freeze for me

    but I did notice a few things about your cap

    and trust me, I understand most of this is my fault for the lack of documentation

    <img src="http://dl.getdropbox.com/u/1013446/Capture14141.PNG">

    1. when you left click you destroyed the fontsprite, and do not recreate it.

    anything that happens from here on out is relying on a glitch in construct or in the fontsprite to continue.

    also you don't need to destroy the panel and remake it, you can just move it, unless you're just testing something. for the fontsprite, just clear it, it will be invisible until further notice

    2.not sure if this was your intention, but "write text" at 0 milliseconds, writes one letter per tick

    if you want the text to come instantly, just use "show text"

    3.it is not necessary (and will most likely cause problems) to set the character sprite and range repeatedly, just do it once in start of layout.

    also, I think something may be wrong with the cap, because I tried changing some things, and they wouldn't work, and I was able to make them work in a fresh cap.

    as far as setting the length and width of the object

    I guess I forgot that part

    consider it done - sometime in the next few days, I'll have an update

    but in the meantime, you can use attach to object

    which automatically always sets the fontsprite position and dimensions to another object

    unfortunately I discovered a bug just now with it

    I realized it sets the position and dimensions at the beginning of a tick, and not after a tick

    so if you don't either Show Text again after the move, or Set Phrase Position after the move

    the fontsprite will always be in the previous position.

    in the following cap, I've included both workarounds (these workarounds will not be necessary when this will be fixed in the next update)

    here's something similar to your cap, with some of the modifications I mentioned :

    http://dl.getdropbox.com/u/1013446/arima.cap

    edit: correct - it destroys the fontsprite, but does not clear the text first. it would make more sense if it did, though

    it might be useful to keep the sprites around for something, so I will make it give an option to clear text (set default to yes) on destroy.

    thanks again guys for helping me improve this

  • kinda

    the idea of the family and the arrays are separate

    you can add several things to a family, and they aren't thought of in any particular order

    they are just together

    like a regular family or container

    you can also have an array

    this is ordered, you can add stuff to the top or bottom, remove stuff from the top or bottom

    you will probably be able to do this to the middle as well, but I need to test the efficiency

    you can put arrays inside families, and you can have arrays of families

    you could create a family called 'item'

    [item]

    sprite object of item

    string object's name

    number for the repair level of the object

    you can access it all as if it were one thing, the commands will be different than with private variables, but you will be able to access the name as if it were part of the item

    if item sprite collides blah blah blah

    and item name is "sword"

    -1 from item repair level

    you could make an array of items called 'inventory'

    and then access them by the name inside item

    by an index in the array

    and you can pop or push them to the bottom or top of a stack

    then you can make another family called 'character'

    [character]

    string for name

    number for hit points

    inventory (the array of items)

    then you can create an array called 'army'

    which would be an array of 'characters'

    as I said before, you'd be able to create a random group of objects and put together families randomly for one time use

    like remembering a group of objects a character encountered,

    or a list of coordinates

    but this is an example of how it could be used more powerfully through organization

    and solidly defined containers

    as for the stack controls you could have,

    pick bottom, pick top, push and pop bottom or top

    for starters,

    but any suggestions anyone has, let me know

    oh yeah, and when exactly do you need the double family hack again?

    I haven't had to in a while, and I don't remember

    it falls in this general area though, and a more logical workaround is probably possible here

    also, if anyone has any ideas for what this object should be called...?

  • So, you are creating some kind of customisable "struct", like in C? (or object in c++) So that the members of the structure can be other data types or objects of construct?

    exactly

    also adding arrays of objects

    and the ability(like structs)

    to use these containers to hold other containers

    That would be awesome! It would be ideal to also have a pairer plugin, well, a simpler one than Object Pairer. Imagine if you could link sprites and data containers like that into a relationship, organizing a parent-child hierarchy!

    yeah thats the idea too

    something very simple

    like 'remember' picked "charsprite"s in "mymem"

    'remember' "20" as "bullets left" in "mymem"

    and then later - 'recall' "mymem"

    and 'forget' "mymem"

    a completely flexible object pairer

    with backward lookup ability

  • basically everything you described is what i was trying to describe, but without saying lifo and fifo,

    i was giving situations is can be used in, but yes, the plugin would focus on giving you as much control as possible over the creation and management of customizable containers, with the ability to index by any member, one of which could be a name string, or by actual numerical index.

    i would prefer to have it be flexible, so you can use fifo,lifo, or regular array and chyange at any time

  • please post any issues you've had where either you had no way to pick something the way you wanted to, or where you needed to use the object/family hack or the double family hack. this can include situations where the solution included creating a new private variable just for the sake of helping you pick, where the private variable served no other purpose.

    when i've made a reasonable amount of headway on my game project, and updated custom controls, i will be making a new multipurpose plugin.

    so this is also the place to post suggestions

    im on break at work, so ill try to explain briefly.

    first, wherever i say arrays, that means arrays, stacks or queues.

    it will provide:(if it all works out)

    strings and numbers(separate from private and global variables, this will make sense in a minute)

    a way to create arrays of objects, that can be picked by index.

    and create families and containers which contain any combination of objects strings, numbers, arrays, and other families

    objects in arrays can be accessed by index, or by traditional picking means of course...anywho:

    EDIT: what I had here before very confusing, so I will post my more rational example from later in this thread:

    [quote:2jymb8fn]the idea of the family and the arrays are separate

    you can add several things to a family, and they aren't thought of in any particular order

    they are just together

    like a regular family or container

    you can also have an array

    this is ordered, you can add stuff to the top or bottom, remove stuff from the top or bottom

    you will probably be able to do this to the middle as well, but I need to test the efficiency

    you can put arrays inside families, and you can have arrays of families

    you could create a family called 'item'

    [item]

    sprite object of item

    string object's name

    number for the repair level of the object

    you can access it all as if it were one thing, the commands will be different than with private variables, but you will be able to access the name as if it were part of the item

    if item sprite collides blah blah blah

    and item name is "sword"

    -1 from item repair level

    you could make an array of 'item's called 'inventory'

    and then access them by 'name' inside 'item'

    by an index in the array

    and you can pop or push them to the bottom or top of a stack

    then you can make another family called 'character'

    [character]

    string for name

    number for hit points

    inventory (the array of items)

    then you can create an array of 'characters' called 'party'

    as I said before, you'd be able to create a random group of objects and put together families randomly for one time use

    like remembering a group of objects a character encountered,

    or a list of coordinates

    but this is an example of how it could be used more powerfully through organization

    and solidly defined containers

    using the stacks and queues are like arrays that you only about the top or bottom of

    a queue is like a line at a grocery store

    the person who got there first, will leave first, and they are gone, no longer part of the line

    a stack is like a stack of books, the book you placed last on top, is the first one you will remove, then no longer part of the stack

    I'd like to make this fully flexible, where all arrays can be used as stacks, queues, or arrays at any time, and you don't need to think about the terminology, just add, or remove, or get, or pick from front or back.

    but examples of uses can be:

    having an AI character go to one location at a time, or attack one character at a time, and move on to the next when the last one is done,

    have a list of functions (Strings), and then call the functions in the order they were received, if a new high priority function comes along, it can be added to the bottom of the array (used as a queue). when a function is done, it is removed, and with no loops or commands, the next function is ready to be called with no separate command to do so.

    a third use would be a multiple targeting system, where pressing a key locks on to the next thing

    this is already possible, but could be much simpler with something like this

    remember also, that this isn't just for stable organized objects

    you can create a random list of random objects to save in a group to remember at any time for later use

    the idea here is to fill in any remaining gaps that the normal family/container/pairer/picking built into construct can't do, or could be easier. combined with the stuff that's already there

  • If this writes at a speed , can there please be an output which is triggered whenever it "types" so we can have some sort of typewriter sound added in

    excellent question:)

    there are several conditions for this purpose

    there is

    "on character written", which you can choose to activate on any character or a specific character,

    "non-white space character written" which triggers when anything except return or space

    "on newline written" so you could add a separate sound of the carraige return on the typewriter as well

    "on last character written"is triggered at the end of the writing

    and "is writing" is true as long as writing has not completed

  • the object pairer can do stuff like this

    if I'm understanding you correctly

    i'm about to leave for work

    but if you search the forums you can see some examples of how it works

  • thanks ashy

    I was noticing crashing on exits, too

    there's probably a way to fix it, now that I know it works if you clear and unset text

    so yeah, thanks, that was very helpful

    btw, the last post in this thread shows a few tricks you might find useful:

    http://www.scirra.com/phpBB3/viewtopic.php?f=3&t=4396&start=10

lucid's avatar

lucid

Member since 16 Jan, 2009

Twitter
lucid has 22 followers

Connect with lucid

Trophy Case

  • 15-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

22/44
How to earn trophies