lucid's Recent Forum Activity

  • whenever there is a value, or a boolean input on the ace table, it can be input as an expression, for instance - set sprite.angle to "45*sprite2.x". i think thats a string that gets broken down and converted into a value? is it possible for a plugin to use some of these same conversion functions internally?

  • is there a function to translate a string into an expression?

  • 1. I don't understand. What do you mean?

    Can I request a certain plugin module that isn't already on the CVS, like Mouse/Keyboard? I don't need Mouse/Keyboard, or anything specifically at the moment, but just curious if that's an option

    [quote:2ajiucmm]2....5.

    Thanks you very much ashley, and I will be getting myself a C++ ebook, as per your recommendation.

    • Can I request certain things on the CVS?
    • Is there a link to download a zip or something of an entire plugin, instead of each file one at a time?
    • Are there functions built into EditTime, or CRunObject that allow you to load and access file information at edittime, or would I have to do that from scratch? Specifically what I'd like to do is save a list of strings in a separate editor and then load this file in construct the way you load a sprite, so it's useable at edittime. After loading them into StringArray:

    // StringArray is a holder for the list loaded at edittime, arraysize is int for number of list items

    string StringArray[arraysize];

    // ExampleString now holds the first item in StringArray

    string ExampleString = StringArray[0];

    // Append all StringArray items so ExampleString becomes

    // "FirstItem|SecondItem|ThirdItem|etc"

    for (int i=1, i<arraysize,i++)

    {

    ExampleString = ExampleString + "|" + StringArray;

    }

    //use ExampleString to create enum for parameter list

    ADDPARAMCOMBO("Example", "This is just an example.",ExampleString.c_str());

    ADDACT("My action", "My category", "Example action (%0)", &ExtObject::aMyAction, "MyAction", 0);

    so basically, you could save a list of things to a file in a separate editor, and then load each item into StringArray. When you go to use MyAction in construct, your parameter list would be determined by that file. Are there any functions built into the SDK for loading and stepping through files, or would I have to do the FileIO from scratch?

    I don't need the whole plugin, but could someone please paste the ENUM from mousekeyboard, the one that let's you choose leftclick,rightclick,a,b,c,TAB,etc... for OnKeyPressed. It would be very helpful, and save me alot of tedium

    I only recently learned about defining macros from the illustrious David, but I don't understand this statement:

    #define ADDPARAMCOMBO(n, d, v)

    I thought it worked something like:

    [quote:2c1hym6h]#define ADDPARAMCOMBO(n, d, v) DoFunction(1,n,d,v,"stuff")

    when it doesn't have a second item, what is getting defined as?

    Thanks alot guys as always. Things are moving along very nicely thanks to all the help from all of you.

  • to jump add action, under the physics tab

    set velocity to -1000

    or

    add force -100000

    those numbers are probably too weak or too strong, and also depend upon your physics settings

    but either one will make an object jump. You can tweak it afterward, but it's a start

    [quote:22weebpp]

    One more question: would it be possible to give a platform object a property that allows it to interact with physics objects? I'm not trying to do anything crazy, just enable the player to move boxes out of the way, for example

    no. unfortunately physics does not work well with other behaviors. You can create an almost perfect replica of platform with physics and events though. And even add your own features

  • your chase timer default value is 2.5

    so it immediately calls the event

    it was probably just a mistake,

    but if not,

    the default value is what it will be before anything sets the value to something.

    To change the default back to 0:

    make sure you're in the layout editor, and not the event sheet editor,

    click on your ghost,

    on the properties pane(leftmost pane with all the info)there's a private variables section,

    there you can view and edit your private variables and their defaults. change it from 2.5 to 0, and it will work as expected

    EDIT, on a side note, (from the other thread)DropBox is my favorite. it makes uploading really easy, you save to a folder on your computer, which automatically uploads it. And then you can go into that folder, and right click, and it copies a link to the file online into the clipboard, and you can paste it here. It literally takes a few seconds. makes uploading not inconvenient at all, which I can't really say about any other upload method I've tried

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • your chase timer default value is 2.5

  • pSmith, it isn't just about stupidity though, it's also about power and control

    you may want the ghost not to slow back down after the delay?, you may want him to go even faster

    or maybe you want him to disappear, or you want the camera to zoom in on the ghost, or want to make him drop a coin and start the timer again, and drop a coin every 2 seconds that way

    construct doesn't assume you want any certain thing, this means you can make your game do anything you can think of, instead if just the one option

    EDIT:

    [quote:2lsxcsww]Another thing I noticed when I "Run" the level is that it starts with the "Player" letting off a single round, by default.

    you probably have a bullet on the layout to begin with

    this bullet behaves normally and fires in whatever direction it's facing

    in the properties panel you can click Destroy on Startup, to make this first bullet not exist

    or you can stick it off to the side outside your layout so it's not visible when it begins

    I'm not sure this is what's happening without seeing your cap, but this is most likely

    as for the other problem, I'm not sure why it's doing that without seeing the cap for myself

  • I was answering this segment of the opening post:

    SET NPC('STRING'): "MOVEMENT" & NPC('NUMERIC')

    SET NPC('STATUS'): NPC.Value(NPC.Value('STRING'))

    which attempts to dynamically read a private variable without explicitly naming it. This is not possible.

    right:

    [quote:1nd7w4n3]--STATUS = WHAT NPC IS DOING

    --NUMERIC = TEMPORARY NUMERIC VARIABLE HOLDER

    --STRING = TEMPORARY STRING VARIABLE HOLDER

    that's all the variables he needs

    I believe he meant to say:

    SET NPC('STRING'): "MOVEMENT" & NPC('NUMERIC')

    SET NPC('STATUS'): NPC.Value('STRING')

    the symptoms he was having also point to that. he said when he read the value of Status is was coming out as a long number instead of the value of NPC.Value('STRING'), which was holding the correct value

    this statement

    NPC.Value(NPC.Value('STRING')),

    would cause that problem, because by accident or design, this statement is valid, but does not automatically convert STRING to a string value. Unless he explicitly made it a string in the private variable editor, by default, STRING is a numeric value, which normally doesn't matter unless you use that exact (npc.value(npc.value('STRING')) syntax. i think it was a typo

  • From what I can gather he wants to do something like:

    Sprite("Some text" & Sprite('A number'))

    This isn't possible, you must explicitly name the variable you want to use in an expression, it can't be dynamically built at runtime through other values/expressions.

    I think that was a typo that was causing his numeric nonsense glitch

    I think he meant to say

    somestring ="Some text" & Sprite('A number')

  • I don't think what you want to do is supported (dynamic private variable grabbing). You could put the sprite in a container with a hash table, but currently you can't set up initial hash table variables, so I'm not sure if that solution will appeal to you.

    I think you may have misunderstood him rich, I think what he's asking is perfectly possible, it's just that it was converting his string value to a numeric value

  • Actually, the + is used for addition where as the & is used for concatenation. I tried the + first unknowingly.

    http://apps.sourceforge.net/mediawiki/construct/index.php?title=Expressions

    I see, my mistake,

    just for info though

    The & operator is a very useful way of combining numbers in to strings. It automatically converts any numbers to a string and appends them. For example, instead of:

    "You have " + str(Player('lives')) + " lives left!"

    you can use the & operator like so:

    "You have " & Player('lives') & " lives left!"

    now, on to your question:

    if you copied this verbatim from your cap:

    SET NPC('STATUS'): NPC.Value(NPC.Value('STRING'))[/code:1nzvmaxx]
    that is where the problem is
    I'm sure it's a typo, but it should just be 
    NPC.Value('STRING')
    not 
    NPC.Value(NPC.Value('STRING'))
    
    the second one I'm not sure is even supposed to work, but it converts your private variable to it's native type.  private variables are numeric unless you use the private variable manager to create them.  this won't matter at all though if you take out the extra npc.value('.  construct automatically converts to whatever it should be
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