lucid's Recent Forum Activity

  • What exactly are you looking for? It to Fill up with white space when you change the height and or width?

    if so, then create a new larger canvas, and paste the old canvas onto it, then erase the old canvas

  • here's a 98 version for those who don't have 99 installed:

    download cap here

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • depending on how much you know about displacement, this may or may not make sense

    let me know if you need help understanding what I did

    the tiles are drag droppable:

    download cap here

    <img src="http://dl.getdropbox.com/u/1013446/New%20Folder/tiles2.PNG">

    one event

    <img src="http://dl.getdropbox.com/u/1013446/New%20Folder/tiles.PNG">

    <img src="http://dl.getdropbox.com/u/1013446/New%20Folder/tiles3.PNG">

  • ok, sorry grim

    I took a look at some of the source, and the learning process is a little more involved than I can do at the moment.

    hope you find someone though. To be honest, there aren't that many plugin makers here, so I'd advise trying other messageboards as well, if you're serious about hiring a programmer

  • can you give me an example file, and what the plugin would be reading from it?

  • hi all

    I've created a Custom Controls plugin you can use for your games. To begin with, I will state that unfortunately, this does not work with built-in behaviors, but only for your own control and movement.

    Now on to the good news...

      Features:
    • Set up to 100 different controls for up to 10 players (total of 1000 controls)
    • Allow players to change keys at runtime
    • Save keys to a file and load them to individual players
    • Saves key config files not easily readable in a text editor

    Now, before you try to use it, please read the tutorial below.

    download the plugin here

    Download an example exe here

    • click the text of the control setting you want to modify (i.e. Left Mouse Button)
    • if you change the controls after clicking Save, clicking Load instantaneously loads your saved keys and sets them.

    Download the example cap here

    (saved in .99)

    (the tutorial below will help you to understand what you're looking at)

    first I will list the actions and expressions, and then explain how they are all used.

      Actions:
    • New Control (makes a new control for your game, such as "jump", or "move right". creates the control for all players)
    • Set Key (sets a key to your control)
    • Save Key Config (saves a key config to a file)
    • Load Key Config (loads a key config from a file)
    • Change Display String (allows you to change the default text to represent keys, like "F-12" instead of "F12", so you can decide what the player sees on your key config menu
      Expressions:
    • Get Control (Let's you check if the player is pressing one of their set controls)
    • Get Control String (Returns a string with the name of the key set to a certain control, like "Tab", or "Left mouse button")

    on to the tutorial:

    first unrar the plugins into construct's plugin directory. one will go directly into \plugins, the other will go into \plugins\runtime

    <img src="http://dl.getdropbox.com/u/1013446/New%20Folder/1ChooseObjects.PNG">

    1.when you open your construct project. add both the Custom Keys Object and the Mouse/Keyboard Object

    <img src="http://dl.getdropbox.com/u/1013446/New%20Folder/2AddControls.PNG">

    2.At start of layout, add any controls you want in your game using the AddControl action in Custom Keys

    3.In your game, you make your control editor menu. Decide when you want the player to press the key he is customizing.

    Now this part might seem a little weird, but don't let it confuse you. you do the same exact thing every time, and after the next step, it all becomes very intuitive.

    Add a System Condition : For, and set it up as displayed below; just set the "end" number to 89. I will explain the reasoning for this in the next step

    (I know some screenshots show 1 to 89, but it should be 0 - 89, you leave the 0 alone. Will retake screenshots later)

    <img src="http://dl.getdropbox.com/u/1013446/New%20Folder/whatitwilllooklike1.png">

    <img src="http://dl.getdropbox.com/u/1013446/New%20Folder/Capture.PNG">

    <img src="http://dl.getdropbox.com/u/1013446/New%20Folder/3AddSystemForLoop.PNG">

    4.Next you add a subevent, Mouse/Keyboard : On Key Pressed,

    <img src="http://dl.getdropbox.com/u/1013446/New%20Folder/whatitwilllooklike2.png">

    instead of choosing a key from the list:

    right click the word key just above the list of choices and select use expression.

    for the expression, simply type loopindex

    <img src="http://dl.getdropbox.com/u/1013446/New%20Folder/4OnKeyPressed.PNG">

    the reason you are doing this is because the system:for loop is having the mouse/keyboard function check whether the player pressed any of the 90 possible keys.

    loopindex is the current key it's checking

    5.Now you can set the keys by adding the CustomControls : Set Key action:

    • choose one of the controls you added in the start of layout,
    • choose a player to set it to,
    • and always type loopindex for the key to set to. remember, loopindex is the key that you actually pressed.

    <img src="http://dl.getdropbox.com/u/1013446/New%20Folder/5SetControls.PNG">

    it will be easy to read in the event sheet which key was set and when:

    <img src="http://dl.getdropbox.com/u/1013446/New%20Folder/whatitwilllooklike3.png">

    <img src="http://dl.getdropbox.com/u/1013446/New%20Folder/6OnCustomKeyPressed.PNG">

    6.Now for the fun part - where you're making the character move with your new controls.

    You add a mouse/keyboard : "On key pressed", or "key is down" condition,

    but instead of choosing a key from the drop down list.

    Right click the word key just above the list of choices and select use expression. Now double click the custom keys icon to bring up the expression list:

    <img src="http://dl.getdropbox.com/u/1013446/New%20Folder/7OnCustomKeyPressed.PNG">

    7.The first parameter is the name of the control, the second parameter is the player number. So the condition in the screenshot above would trigger anytime player 1 pressed the "jump" key

    <img src="http://dl.getdropbox.com/u/1013446/New%20Folder/8GetControlString.PNG">

    8.You may have noticed in step 6, there is another expression for Custom Keys --- Get Control String. This is to show the player what key they have set.

    ControlString(name of control, player number) [/code:1ji99rbx]
    If player 1 would have set [b]jump[/b] to be the [b]Left mouse button[/b], then the action in the screenshot above would set [b]Text[/b] to [b]"Left mouse button"[/b].  
    
    But what if you wanted the text to say [b]"Mouse1"[/b], or [b]"LEFT MOUSE BUTTON"[/b], or [b]"lft ms btn"[/b]?
    fortunately there is an action for that as well:
    
    [b]change display string[/b]
    <img src="http://dl.getdropbox.com/u/1013446/New%20Folder/9ChangeDisplayString.PNG">
    <img src="http://dl.getdropbox.com/u/1013446/New%20Folder/10ChangeDisplayString.PNG">
    9.[b]Change display string[/b] allows you to override the default string output for keys you get from the [b]Get Control String[/b] expression.  First choose the key you want to override the string for, and then, input whatever string you wish.
    
    <img src="http://dl.getdropbox.com/u/1013446/New%20Folder/11SaveKeyConfig.PNG">
    10.And last, but certainly not least, there are the [b]SaveKeyConfig[/b], and [b]LoadKeyConfig[/b] actions.
    Simply select a filename, and which player you want to save the keys from, or load the keys to.  You can choose whatever file extension you wish, and the saved file is purposefully not easily readable in a text file.  The start directory is the directory your game exe is in.  
    
    If you want to save a default key configuration, make your cap with your own key configuration menu.  Make the cap save to [b]"default.keys"[/b] (for instance),  then set the keys and save the cap, then change the cap so it no longer saves to [b]"default.keys"[/b], and make it load those keys whenever a user clicks a Set to Default button , and save new key configs to [b]"user.keys"[/b](or whatever).  You can also setup several preset control schemes this way by saving several files [b]"Control Scheme A"[/b], [b]"WSAD walk"[/b], etc.
    
    Have fun, please feel free to ask questions, and make suggestions.  This plugin is free to use for whatever purposes you wish.  I hope you find it useful
  • can I see the source for mouse/keyboard?

    and also, can I modify plugins, and share the modified versions on the board? (with a different name of course to avoid conflicts)

    is it possible/how do you set defaults for PARAMCOMBOs?

  • ok thanks, rich, the first question doesn't make any sense if it only loads the ACE Table once.

    question:

    As I've looked through the SDK tracing functions, and #defines and such, Every once in a while I stumble upon comments that say something along the lines of "See SDK docs for more information."

    Is this referring to the ACE table and SDK wiki pages, or is there a docs file somewhere?

  • He said 'runtime zooming' .

    yeah, I know, but this part:

    So I don't always have to see a 1:1 scale view of my layout. Would be handy with options like Show All, or Show Layout.[/code:1dqeqjhe]
    sounded like he might have just thought it was called runtime, but meant edittime
    ...
    or something
    
    

    For anyone wondering how to do edit time zooming it is CTRL+mouse wheel. as for runtime its what Ashley said.

    thanks aeal, I was wondering about that

  • i think you may have meant edittime zoom in construct. if so, this is also possible, though im not sure how to do it without my logitech mouse, which has a separate zoom wheel

  • I have something I'm going to try tomorrow night, but if one of you already knows whether it's possible, it could potentially save me some time working on something that won't work.

    if I have a property_edit that takes a filename.

    and a property_bool, to click, and make it load the file, on properties update

    I want the acetable to read the value of the filename in the property_edit.

    First, do the ACETable functions get called every time the dialog is called?, or is it only read once when the object is added. if it is called every time:

    The OnPropertiesUpdate (or something like that), is a member of ExtEdit.

    and ACE uses global functions, if I remember correctly. I don't want to use global values unless it's a last resort, and I'm also not sure if it's safe to do so in this situation.

    1. Is there another way to do this?

    2. I can't find the code where adding a sprite object calls the sprite editor dialog. which file should I be looking in?

    3. If sprite is not a special case, does the sdk have a particular way to add dialogs?, or is that what the MFC version is for?

    thanks again for all the help, things are coming along nicely, if anyone's curious.

    Going by how many functions I'm completing per day, and how many are left to write, I should have something cool to show in about a month. It will be far from complete, but it will be something that shows what types of things the plugins will be used for.

  • that's a pretty clever little technique there dkdoom

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