lucid's Forum Posts

  • using the splitup technique you wouldn't need crouching animations for the torso or the head if they were set to 'always' 'set position to' imagepoints that were placed at the connecting points

  • I'm just comparing private variables so it's easy to see the flow and logic, replace those conditions with what you'd need to know to know if your character was doing each of those things:

    <img src="http://files.getdropbox.com/u/1013446/New%20Folder/CustomKeys/New%20folder/Runtime/Capture3.PNG">

  • yeah, that's gonna be a crazy amount of vram

  • other way around

    in GetData(): if you need param for something that's where you cast it

    long ExtObject::GetData(int id, void* param)
    {
    	switch (id)
    	{
    		case 1:
    			return MASS+(int*)param;// for instance, 
    	}
    	return 0;
    }[/code:2tctjxno]
    This is where you would retrieve something:
    
    [code:2tctjxno]stuff += (*i)->GetData(1, *MyInt);[/code:2tctjxno]
    
    I may have messed up the asterisks in the return MASS line in order for it to add correctly
    I'm pretty new to pointer notation, but the basic idea is
    that void* is a pointer to [i]something[/i]
    you have to cast it so it knows what it is
    this way, you can make param any type you want
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • you can pass anything for the void parameter, so

    you have to cast the void* parameter to whatever you need it to be

    like (int)param

    or (string)param

    GetData() and CallFunction() are exactly the same as far as I can tell. There are two of them for logic and readablility

    pretty straightforward so far,

    however,

    if you happen to need more than one parameter there are three ways I thought of that would work

    I never tried it but I believe you should be able to make a struct in both the calling function and in the body of GetData(), and cast it to that if you need multiple parameters

    alternatively, you can pass the parameter (this)

    and cast it to *CRunObject

    then you can do param->GetData(whatever) and have GetData functions in the calling object that will return the parameters you need one by one

    and lastly, you can just set up multiple functions that append all the needed parameters

    like

    long ExtObject::GetData(int id, void* param)
    {
       int param1;
       string param2;
    
       switch (id)
       {
          case 1:
          {
             param1 = (int)param;
             return 0;
             break;
          }
    
          case 2:
          {
             param2 = (string)param;
             return 0;
             break;
          }
          case 3:
          {
             return param1 + param2;
             break;
          }
    }[/code:1pl9i59i]
    
    btw, if you're on right now, you should go to chat
    we can be plugin code buddies
    
    edit:: and if it's not top secret, may I ask what type of plugin you're developing?
  • Very gory... why do you need to cut to shreds what appear to be civilians standing around?

    you don't need to,

    you're just allowed to.

    what fun!

  • k

    Ash, I tried copying line by line the code from the sprite stop animation, and set animation frame actions, and I can't get the bug to stop happening

    there may be a mistake I'm making somewhere

    but it would help if I knew what CurAnim->Updated is for

    it doesn't seem to make a difference in anything I try

    I'm sure it serves a purpose, I'm just not sure what it is.

  • I only suggest vectical scrolling if that's not already done/planned.

    thank you for the suggestion, and yes that one is planned

    All right figured out a bit more. I think importing 1 single file would be the best way to go. That way you can crop the frames in Constructs editor, or leave them for a bounding box

    oops

    thanks again newt

    I think when the plugin is up and working I'm going to make an exe font cutterupper tool, if canvas and image manipulator are up and running well in the latest version

    it's a little bit of a pain to cut up tiles if they aren't evenly spaced, or if they are in vertical order instead of horizontal, whether you're using construct or photoshop or whatever. I don't know of anything that really makes it not a pain

  • I'll have to check that later ash

    I'm going to be out the most of the day,

    also, and perhaps if I am missing a call, it would be the solution to this as well,

    but when I ->info.HotSpotX, it returns the hotspot for frame 0, and not the current frame

    EDIT: info.HotSpotX returns the current hotspot, there was a simple logic error I had made

  • check it: not much new, just a better font, and some internal stuff

    http://files.getdropbox.com/u/1013446/New%20Folder/CustomKeys/New%20folder/new.exe

    and thanks newt

    I'll give it a try.

  • I want to submit a bug report, but I'd like some verification as to whether or not I'm missing something:

    the following code:

    destroys all MySprites,

    creates one MySprite,

    and sets the frame to MyInteger

    //destroy previous instances

    CRunObject** instances;
    int count;
    pRuntime->GetTypeInstances(MySpriteType, instances, count);
    
    if (instances != NULL) 
    {
    	CRunObject** i = instances;
    	CRunObject** end = instances + count;
    
    	for ( ; i != end; ++i)
    	pRuntime->DestroyObject(*i);
    }[/code:bwqd537a]
    
    //Create One New Instance
    [code:bwqd537a]MySprite = pRuntime->CreateObject(MySpriteType,0,pLayout); [/code:bwqd537a]
    
    //Set Animation Frame to MyInteger
    [code:bwqd537a]pRuntime->SetAnimationFrame(MySprite,MyInteger);[/code:bwqd537a] 
    //stop animation
    [code:bwqd537a]MySprite->info.curAnim->speed=0; [/code:bwqd537a]
    
    If you set MyInteger to anything other than  0 (frame 1 inside construct) it works as expected:
    destroys all sprites, creates a new one, sets the frame to MyInteger
    
    if MyInteger is set to frame 0, it works as expected ONLY IF you have a MySprite on the screen area of your layout at startup. 
    If it is off screen at startup, the sprite will be invisible when you set it to frame 0;
    occasionally (rarely) it'll blink on for a split second if you have it set to Always (but it's instantaneously gone, you can barely even see it)
    
    it doesn't make a difference if you destroy on startup or not
    and I isolated the code down to this specific combination of commands.
    if you don't destroy the other instances first, setting it to the first frame works fine
    and if you have the sprite on your startup view, it works fine
    and if you set it to any other frame it works fine regardless of where the sprite is or isn't in the layout upon startup
    
    to be clear it doesn't matter whether you place this action in "on start of layout" or later, it just matters whether there is a MySprite on your layout in the visible square inside the layout editor
  • don't feel like a retard

    there's alot you won't know in the beginning, asking, and looking through caps, and reading the wiki is the only way to learn stuff

    I only learned about the linear filtering thing a few weeks ago, while messing around with random stuff.

    it's not like people are born knowing how to use construct

    nah mean?

  • Hi!

    Awesome work with this object, I'm pretty excited by it. If there were features I'd request, it would be that we can have functions to manipulate any character in the character array by index, as well as the "for each". This way, we can use the index value as an offset for certain effects. I'd like to be able to sinescroll the characters, but also maybe adjust their width/height/rotation too. I imagine this could mean that every character in the array could have a subproperty for x/y/width/height/rotation which could be accessed/stored in the object, unless you think that's too feature specific or memory intensive or something.

    all of this is possible

    the expression for index in array will be Position in phrase

    [quote:1kp71c73]

    For a wishlist feature, it would be cool to have UTF-8 support, so we can for example have a separate character set for another language, or special symbols in-game. Control characters would be nice, too, such as to force newline, print one character over another, prompt for the next block of text and display a symbol (think RPG dialog boxes), or signify EOF.

    after the initial beta release I will be looking into expanding the possible character set

    but force newline will be possible, with the same "newline" expression you can use for regular text boxes

    printing one character over another will be possible by offsetting the individual character position, but when the beta is out, you'll have to tell me if it works the way you mean.

    being able to make a character that prompts for the next block of text is a good idea, and I will do my best to include something to allow that functionality in the initial version.

    I'm not sure what you mean with the EOF. I was going to add file support, but you can already use the construct file object to load strings, and I don't like the idea of people being able to read spoilers for games by opening text files in the directory, but this is the second time someone asked for text from file, so I'll include that.

    [quote:1kp71c73]I agree with others that in the future a tile blitter would be really neat (especially for making tile engines with the data and graphics separate, such as for changing seasons or time of day; or "layered" top-down engines which have different collision maps depending on the z height), but that would widen the scope for an object like this too much, especially when there are features specific to text blitting and features specific to tile blitting.

    yes, that is a matter for a separate object, I have been considering making a complete tile based editor, and a corresponding object to load them easily into construct, but I have a personal project I want to get off the ground first, and I'm also holding a little bit longer to see if aeal releases his level editor, and whether or not we're making the same basic thing

    [quote:1kp71c73]

    Anyway, here's where I get all my graphical fonts: http://www.algonet.se/~guld1/freefont.htm

    thanks alot! although the site is down it seems at the moment:

    the "Spin me around and make me happy!" link is broken

    EDIT::now it works!!! thanks...this is exactly what I needed!

    [quote:1kp71c73]

    EDIT: Also since I'm new to construct, I don't know if this would be possible, but are you able to use the SDK to clip a layer using your graphical font as a mask? If that were possible, we could make really cool "paint behind" effects, such as fake "copper", palette shifting backgrounds, stuff like that.

    you will be able to do this with just construct itself, without the sdk, since the fonts are sprites, you can just add the 'erase' or 'mask' effects to the font sprite(and set the layer to "force own texture")to do just that

    thanks for the input, and welcome to construct!!

    EDIT::LatestUpdate:

    <img src="http://files.getdropbox.com/u/1013446/New%20Folder/CustomKeys/New%20folder/Runtime/thisisit.PNG">

  • in fact, I've started my own large project in the as-yet unreleased next build of Construct

    release it! release it! what a tease!

  • for anyone interested, no link, cuz im on my cel in the bathroom, and not much time. but it should be a cinch to find on google.. beautiful game, especially on pc