linkman2004's Forum Posts

  • Objects already stop rendering as soon as they're off-screen. If anything, I think the "Object is on-screen" condtions could actually be slowing it down. Every time that condition is checked, Construct has to loop through each instance of the object to determine if it's on screen. If there were 1000 tiles, that would be 1000 loops each time the "Object is on-screen" condition was checked.

    I don't know if that's actually you're problem or not, but I'd suggest having only one event with the "Object is on screen" condition and then placing all the events that currently use the condition as subevents to said event.

  • There's always TinyXML if you decide to make a plugin. It's small, open-source, and seems to be fairly popular.

    I don't know how accurate my estimation is, but I can't imagine it would be too hard to make a plugin using it. Once one gets used to it, the SDK is actually really simple to work with and the difficulty level starts boiling down more to ones own coding skills.

  • I don't think this is a bug so much as it is an inconsistency, so I'd thought I'd bring it up here. The image list object isn't currently 1-indexed like most of the rest of the objects, requiring you to use "0" to access the first image.

    Just thought I'd bring it up since the inconsistency was driving me nuts earlier.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've made a couple of XML parsers in Construct -- made one just last night, actually. I don't actually have an example on hand but I can give the general idea around my parsers.

    I usually use the ListBox object to load a file, then I use it's "For each line" event to read through the entire file. Inside the subevents to this event, you can read the file using tokens. To get the name of the tag on the current line, you'd this expression:

    GetToken(GetToken(ListBox.LineText(ListBox.CurrentIndex), 2, "<"), 1, ">")[/code:1vng6jel]
    And to get the contents of an element, you'd use this expression:
    
    [code:1vng6jel]GetToken(GetToken(ListBox.LineText(ListBox.CurrentIndex), 2, ">"), 1, "<")[/code:1vng6jel]
    Unfortunately, this only allows you to get the content of an element if your file is arranged like this:
    
    [code:1vng6jel]<tag>stuff</tag>[/code:1vng6jel]
    Instead of this:
    
    [code:1vng6jel]<tag>
        stuff
    </tag>[/code:1vng6jel]
    So, this method works, but it's pretty limited.  Hope that helps some, anyways.
  • Is there a function in the SDK that allows you to set an object's Z order to the back?

    EDIT: Nevermind, found it. For anybody interested, it's:

    pRuntime->ToBack(CRunObject*)[/code:1mvkxomn]
  • It's already there, but it's in the "Behaviors" folder instead of the "Plugins" folder.

  • Thanks. I noticed that it was cr::color, I just didn't know how it worked, or where the values went in.

  • How is one supposed to set the color filter of an object through a plugin? I know that I'm supposed to set:

    Object->info.pInfo->filter[/code:3vv376zu]
    But how do I set the value for this?  Using the RGB() function throws an error at me, so I'm at a loss for what to do. 
    
    EDIT: Also, it doesn't look like I can set the filter through a parameter from an action.  That throws a fit as well.
  • is rotate layer, or rotate screen working? It's the first time i'm trying to do it, but can't seem to get either to work. I have 3d layer checked.

    start of layout > set set layer 1 angle to 45

    Try enabling "Unbounding scrolling" in the layout properties. That should work.

  • -Always
    -----PixelsPerSecond=distance(sprite.x,sprite.y,sprite('LastX'),sprite('LastY'))
    -----Set LastX to sprite.X;
    -----Set LastY to sprite.Y;[/code:3vqjap7g]
    

    Just thought I'd mention that this expression will only retrieve the distance that the object moved in the last frame. You need to divide the distance by TimeDelta to get the actual pixels-per-second value. I'd also suggest putting round() around the expression so you don't have a jumpy floating point value:

    - PixelsPerSecond = round(distance(sprite.x,sprite.y,sprite('LastX'),sprite('LastY')) / TimeDelta)
    [ul]
    	[li]Set LastX to sprite.X[/li]
    	[li]Set LastY to sprite.Y[/code:3vqjap7g][/li]
    [/ul]
  • Are you using any behaviors? Those usually have an expression to get speed. If you're using something custom, I know some formulas for finding the speed, but I'd need to know how you have your movement system setup first.

  • It's a Windows Vista/7 specific issue that I reported a while ago, but it never got fixed, it seems.

  • Under the System object's actions, there's a "Set time scale" action. If you set that to 0, everything using behaviors or TimeDelta based movements will no longer move.

  • Since you're replacing the motherboard, you'll have to reactivate Windows, not reinstall it. However, I personally suggest a fresh Windows installation after major hardware changes.

  • Since the Wacom acts as a mouse, it would work for Construct applications using mouse controls. However, you won't be able to take advantage of pressure/tilt sensitivity.