Daiz's Recent Forum Activity

  • Basically:

    P1 and P2 are shooting (pretty much rapidfire) bullets at each other, and we need to check when one players bullet collides with another players.

    Each bullet DOES have a PV 'Player' that is set from 1 to 4, depending on which player used it.

    That way if two players use the same character with the same attacks, it can still be differentiated.

    Daiz: That method didn't quite work, but I think I have an idea I'd like to try.

    How did it not work? It should work exactly as you want, since I've used the exact technique myself as well. In your case, the events would go something like this:

    Conditions:

    + Bullets1 colldes with Bullets2

    + Bullets1 value 'player' is different to Bullets2 value 'player'

    Actions:

    • Destroy Bullets1
    • Destroy Bullets2

    No matter what the object is, as long as it's in two families differentiating between colliding instances is very easy.

  • Or even easier, add all your bullet objects into two families: Bullets1 and Bullets2. Then just check for collision between Bullets1 and Bullets2, and it becomes a piece of cake to differentiate between the two colliding instances.

  • I know I'm double posting, but this is kinda important so I'm doing it anyway.

    Is there some sort of functionality to duplicate an array index to another array? Basically, I've done private variables for objects with 's', and I'd like to duplicate these objects in a way that copies the private variable values over to the new ones as well, but obviously they should still be their own private variables. As far as I can see, the only way would be to individually save every array I want to copy to disk and load them into the new empty arrays, but writing to and reading from disk is horribly slow compared to doing the same in memory, so...

  • 1920x1200, Intel C2Q Q6600 2.70 GHz, Nvidia GeForce 9600 GT 512 MB

    No canvas: ~1480 FPS

    Canvas: ~900 FPS

  • 50-57 FPS.

    Intel C2Q Q6600 �2.7 GHz

    4GB of DDR2 800MHz RAM

    Nvidia GeForce 9600 GT 512 MB

  • But how do I use the search expression in this case? I have no idea what to put to the searched value.

    S.FO({"selobjs"},????,0)[/code:3seysx7k]
    The hell am I supposed to put there? There's no kind of "picked object" expression to use.
    
    EDIT: Solved on IRC, I just had to use "Blue" (the family) in place of ????.
  • Pretty sure I read it's fixed in at least an unstable release, but what always worked for me was that instead of writing Panel('whatever') or just 'whatever', I wrote Panel.Variable('whatever').

    Looks like this is indeed the case, the private variables for Panel work perfectly for me in 0.99.85. 'value', Panel('value') or Panel.Value('value') all work just fine. (Sadly, Light's private variables are still broken)

  • The new "is contained in"-expression is great, but now I have a small problem.

    My code at the moment is like this:

    + MouseKeyboard: On Left Clicked on Blue
    ++ S: [negated] Object "Blue" is contained in {"selobjs"}
    --> S: insert object Blue to {"selobjs"} at "end"
    + MouseKeyboard: On Right Clicked on Blue
    ++ S: Object "Blue" is contained in {"selobjs"}
    --> S: Delete Object {"selobjs"}[/code:20rfpigi]
    
    Now, the problem is that I can't get the Delete Object action to do what I want, since I have no idea what to put in the range. Is there any way to get the range values of picked objects or something? Or do I need to resort to some sort of painstaking for each -loop once again?
  • It's a known bug of Panel object, you can't reference it's private variables properly. Go kick David to fix it.

  • You said in IRC that there's a new version of S that includes search expressions for easy index referring without the need for extensive "for each" looping.

    Can you upload it, pretty please?

  • Probably the easiest way would be to do this:

    Add your objects in different layers to two families. For example, put Layer 1 objects into Family Yellow, and Layer 2 objects into Family Blue.

    Now, in events:

    When Player is on Layer 1

    -> Remove attribute from Blue: "Solid"

    -> Add attribute for Yellow: "Solid"

    When Player is on Layer 2

    -> Remove attribute from Yellow: "Solid"

    -> Add attribute for Blue: "Solid"

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I wouldn't call Construct's level editor bad or inferior to GM's - even for tileset-based stuff. You just need to be wise about how to use your tileset - a combination of tiled background objects and sprites with sprite index works wonders for level creation.

    The initial set-up time might be a bit longer, but once you have established the base, building things becomes quite fast - if you need something, it's very quick to just select one or multiple objects already existing in the level and ctrl+drag a copy of it in the new place. Maybe change one tile here and there, and tweak the width/height of some tiled backgrounds using the snap resizing to grid -function as help.

    Take this tileset and starry sky here for example:

    <img src="http://planar-studios.com/bin/tileset.png"><img src="http://planar-studios.com/bin/bgstars.png">

    In relatively short time I came up with this:

    <img src="http://planar-studios.com/bin/pixelevel.png">

    It takes use of all the stuff I mentioned earlier, plus filters, layers and rotation for ease of work. Looks pretty slick, huh? It's very easy to expand as well when you already have stuff laying around in the layout - just ctrl+drag a copy of one or multiple things and do some little tweaking. I'd say it's quite a lot faster than selecting tiles from tileset every time when you want to add a different tile.

    Here's the cap too:

    http://planar-studios.com/bin/tilesetting.cap

Daiz's avatar

Daiz

Member since 9 Oct, 2008

None one is following Daiz yet!

Connect with Daiz

Trophy Case

  • 16-Year Club

Progress

16/44
How to earn trophies