Dunkelseele's Recent Forum Activity

  • BUMP.

    The .cap is updated with my latest version... I changed the complete script, and it behaves a bit better now. Still not doing what I intended. Please have a look at it... I know some of you can help me, please...

    Best regards,

    Noel

  • Hello!

    I want to create x instances of a sprite at random locations on the screen in a certain area, whereas x is a global variable. I also need to give each created instance different values for their private variables.

    What I figured out so far (but doesn't work):

    10 IF: button clicked
    20   THEN: delete starsystem
    30      IF: global('starsystem_creation_counter') is lower than global('number_of_starsystems')
    40         THEN: starsystem set position x: random(1024) y: random(768)
    50            IF: starsystem overlaps creation_area_sprite
    60               THEN: starsystem: spawn starsystem
    70               THEN: add 1 to global('starsystem_creation_counter')[/code:3878vfr1]
    
    Instead of creating the number of starsystems/sprites it only creates one, and if I click another time, nothing happens at all and the one generated starsystem/sprite vanishes. I have no clue what is going on.
    
    I also have no clue on how to make them 'unique' after their creation, so I can deal with them each for their own. Any help would greatly be appreciated.
    
    Best regards,
    Noel
    
    PS: *.cap of what I've done so far. Ignore the other layout. [url=http://dl.dropbox.com/u/12049513/Construct/GE/alpha.cap]http://dl.dropbox.com/u/12049513/Construct/GE/alpha.cap[/url]
  • Well, the only thing I missed, was to put the "Multiply"-effect on the "Lighting" layer ... Fascinating that such a small thing can keep one busy for days.

    Thanks a lot for helping me seeing the obvious!

    Best regards,

    Noel

  • I take the liberty to bump this topic, because I think it's unlikely that no one here has a good hint how to get the problem solved... or so I hope

  • Hi,

    currently my lighting looks like this simplified version of my layer structure:

    0 A layer with GUI

    1 Layer with 75% Black background (to darken everything, I may later change the opacity of the layer to simulate daybreak or something)

    2 Layer for sprites

    3 Layer for shadow-caster objects beneath the sprites

    4 Background Layer for all textures/sprites that go behind all other objects (ground level)

    Now my first try was to simply put a light on a layer between 2 and 3. This results in a complete black level except for the part where the light was placed, all shadows act as like 100% opacity.

    screenshot:

    <img src="http://dl.dropbox.com/u/12049513/Construct/ZombiePanic/lighting1.jpg">

    If I add the effect "additive" it starts to look a little better, still it's dampened by the "darkness"-layer 1. Screenshot:

    <img src="http://dl.dropbox.com/u/12049513/Construct/ZombiePanic/lighting3.jpg">

    Then I recreated a tip from somewhere in this forum, to use a sprite on layer 1 and set it to effect "erase", that works - but without the shadows. Coloring of the "light" is also not possible. since it only partial erases layer 1... Screenshot:

    <img src="http://dl.dropbox.com/u/12049513/Construct/ZombiePanic/lighting2.jpg">

    How do I add proper colored lights that play nice with my shadow-caster objects?

    Thanks would be much appreciated!

    Best regards,

    Noel

  • Yeah, that did help me... I have now shadows that don't overlap anymore, thanks for that!

    It's a shame that I have to create a ton of shadow-caster elements to suit every not-quadratic element I use. I hope a better shadow-caster will be implemented in Construct 2, that would be a killer feat for me.

    Best regards,

    Noel

  • It will be updated eventually, and the interface will be pretty similar to the one in the physics behavior. However, if we finish the inline editor for the physics complex shape, then we can just copy and paste the code from physics into shadow...

    I found this quote in an old post from around 2007 or 2008. Is this done, and ready to be copied and pasted? I read trough all threads in the forum vaguely touching the shadow-casting-of-complex-objects-subject... but the only finding seems to be that it is not possible.

    I am desperate enough to buy anyone a grand hot Venti who helps me on this...

    Best regards,

    Noel

  • Hello,

    I need your help with understanding something: A shadow-caster behaviour slapped onto a sprite that is round, is using the boundary box for rendering the shadow. The boundary-box is quadratic. This makes the shadow also quadratic. How to change this?

    Is the only solution to make a specific collisionbox for each not-quadratic object that will draw a shadow?

    The other thing is: Why does the shadow of two shadow caster-objects overlap, as if they where on top of each other? Screenshot: <img src="http://dl.dropbox.com/u/12049513/screenshot_01.png">

    *.cap if someone wants to have a look: http://dl.dropbox.com/u/12049513/ZombiePanic.cap

    Please help me on this, it's driving me mad.

    Best regards,

    Noel

  • I feel a bit stupid. I didn't see that you can invert conditions. That did the whole trick. Next time I try to search more careful before shouting for help.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi!

    I have some zombies running around my map. That's okay, I put them there.

    I get the moving state via condition "is moving" (RTS behaviour). I then set animation to "walk". This all works fine, except for they never stop walking. So what I need is a "is not moving" condition or rather a "special condition" that is "not". I tried it this way:

    Zombie is moving -> Set Zombie animation to "walk"
    else -> Set Zombie animation to "idle"[/code:21gge1gc]
    
    But that didn't work either. At the beginning of the level however, they are all standing still, even when one of them is starting to move ... 
    
    .cap for looking into it yourself is here: [url=http://dl.dropbox.com/u/12049513/ZombiePanic.cap]http://dl.dropbox.com/u/12049513/ZombiePanic.cap[/url]
    
    Best regards,
    Noel
  • Hey,

    sorry to dig up this old thread, but I found it via the search and thers that may find this too should maybe know this:

    To make this work with tiled backgrounds, you have to use a block-element (no sprite) with shadow-caster behaviour and properties "solid", and the sprite or tiled background on top of that (work with layers here, because you aren't allowed to make the shadow-caster block just beneath the tiled-background on the same layer - it leads to strange results). Making the shadow-caster block invisible at runtime via events also don't work, the shadow-caster element will need to be visible (although beneath another sprite/tiled background) to cast a shadow.

    I used different blocks with standardized heights (50 for walls, 10 for high objects, 1-2 for obstacles like crates etc).

  • Hi,

    I thought that I could also show my little project at the time, after reading trough all the 67 pages of this thread. It's very early WIP, in fact I just started working on it during this night. Yet it is already a little bit of fun, to kill the ugly placeholder-zombies.

    <img src="http://www.strongground.de/bunker/images/ZombiePanic2.jpg">

    As you can see I have a flashlight. It has simple dynamic lightning via light-element and shadow-tracer.

    <img src="http://www.strongground.de/bunker/images/ZombiePanic1.jpg">

    You can also shoot with your never-ending ammunition supply at the mindless (un)dead and watch their blood splatter around. This will of course be extended with various different blood-stains that will be randomly put on the ground on each hit via animation-frames... after all, what would a zombie game be without gore?

    I plan for it to be a strategic horror-survival game where there is no real chance of killing all zombies, rather you have to get to certain points of interest, resupply, find shelter etc. Just survive. The flashlight will partly be your only way to see and there will be always too much zombies to just shoot your way trough.

Dunkelseele's avatar

Dunkelseele

Member since 22 Sep, 2010

None one is following Dunkelseele yet!

Trophy Case

  • 14-Year Club

Progress

14/44
How to earn trophies