zero_rogue's Recent Forum Activity

  • That's correct, but system comparisons do not pick, or place objects into the selected objects list.

    For example if you were to compare the enemy's private variable that way it would not pick that instance.

    Same goes for system compare, or system evaluate.

    Anyways, just pointing out the subtleties that might lead to more errors, like the fact that else doesn't take picked objects into account.

    In fact once the else affects an object, and is triggered, including any held in subevents, all events that excluded it beforehand are thrown out the window.

    http://dl.dropbox.com/u/666516/ohshi.cap

    Your .cap example does show what I was originally commenting about. Where i would assume when sprite is picked in event 2 it would also use the picked sprite for event 4(something it Should do imo.)

    Long story short.(aka what I learned)

    Else doesn't use picks.

    Objects are destroyed at the end of ticks.

    thanks for the help.

  • A couple things.

    Once hp goes to zero your continuously setting your global to random(100) in this scenario.

    "Trigger Once" will fix that, as long as that sprite is still picked in the variable comparison in the sub events.

    Also there is no "value between" expression so there could be some mix up there as well.

    ......But, and its a big but, the else is definitely your biggest issue.

    Just so you know, you can still reference a destroyed object while still in the same event.

    Given that little tidbit, I'd suggest adding a "drop" variable to the enemy object, instead of using a global.

    The event group was designed to always destroy the enemy object no matter what. (hence why Iput a else statement into it to prevent the exact situation you mentioned. ) this way any enemy with 0 hp will only stay for one tick.

    Also, there IS a value between condition its "Number in between..." In system

    (highlighted in blue)

  • > I dont feel comfortable to post the cap. I've been working on this game for a few months now and would not want someone coming along and steal my work.

    >

    That's absolutely ok and understandable. But most then create a new example cap that shows the error. Helps a lot when several aspects come together that you are not aware of when trying to help.

    >

    > I have found the Event that's causing the problem When an enemy=<0 a set of events is run to check if the enemy drops an item then destroys the enemy.

    >

    > The event basically calls a random value then checks what item it should drop.

    >

    > I haven't implemented this fully in the game (I also would like to reedit this event) so the only true option right now is the else at the end that just destroys the enemy. This is whats causing all the enemies to destroy themselves.

    >

    > I'm going to rework the event group to fix it. Although this does not explain the abnormality(else destroying all objects).

    >

    This for example: I don't see the exact event. Basically, using 'else' can explain it.

    When it comes to the action destroy, 'else' seems to not pick anything (not picking the opposite as one would expect). And if nothing is picked, Construct always refers to all instances.

    Enemy's health <= 0 and Already dropped = 0 -> do something
    else -> destroy[/code:2u5856s9]
    Such a construct does not pick anything on the 'else' part and therefore destroy any enemy
    
    [code:2u5856s9]Enemy's health <= 0
         Already dropped = 0 -> do something
         else and Pick by enemy('health') <= 0 -> destroy[/code:2u5856s9]
    Such a construct would first make sure that any enemy with health <= 0 will drop and then destroy any enemy with health <= 0
    
    But as I said, I don't see the exact events, so I don't know why 'else' is used. It isn't needed to let them drop and destroy them. This can be done in one step.
    

    The event group is basically, this(its a bit bigger but just repeating events)

    Enemy hp <= 0 -> set global variable drop to random(100)
         value drop is between 0 and drop_array (1,1) ->  destroy enemy
         value drop is between drop_array (1,1) and drop_array (1,2) -> create item at (enemy.x, enemy.y), destroy enemy
         value drop is between drop_array (1,2) and drop_array (1,3) -> create item2 at (enemy.x, enemy.y), destroy enemy
         else -> destroy enemy[/code:2u5856s9]
    The concept is that it draws a random number and then uses a drop table to check what drops, 0-x = nothing 
    x-y = item
    y-z = item2
    the else is really there in case something goes wrong.
    
    Like i said before this system was limited and didn't have everything I wanted in it so I'm just going to redo it.
  • In these scenarios it's best to post a .CAP file (uploaded to mediafire or something), or post screencaps of the event sheet in question.

    I dont feel comfortable to post the cap. I've been working on this game for a few months now and would not want someone coming along and steal my work.

    I have found the Event that's causing the problem When an enemy=<0 a set of events is run to check if the enemy drops an item then destroys the enemy.

    The event basically calls a random value then checks what item it should drop.

    I haven't implemented this fully in the game (I also would like to reedit this event) so the only true option right now is the else at the end that just destroys the enemy. This is whats causing all the enemies to destroy themselves.

    I'm going to rework the event group to fix it. Although this does not explain the abnormality(else destroying all objects).

  • Whats picked first?

    Sword or enemy?

    Tried it both ways with no success.

  • I've been working on this game off and on for some months now. Now all of a sudden Many of the object picking has stopped working correctly

    Such events as this.

    On collision between sword and enemy ; Subtract from hp

    It causes all enemies to lose health.

    Why is this happening???

  • Filters, more specifically masks.

    I'm sorry, but could you be more specific? I found how to apply a mask effect, however it seems to not have effect of what I needed. This seems to only modify the image below it and apply its transparency biased on the mask's transparency.

    what I needed was something that could apply to another sprite like a decal or an overlay, so that it wouldn't lose its original texture.

    I was able to make a "dirty" way of doing this However in the example you can see it would require a "mask" the size of the entire screen in any practical use.

    http://www.mediafire.com/?1i8pcsabfy877a2

    I was hoping to have an option that could be used multiple times on the same object such as splotches of paint when they hit a target. the paint shows up on the target sprite but the wall behind it is clean.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have yet to find how to do this in construct and would like to know if anyone else has an idea on how to do this.

    What I want to do is make an Sprite that's visibility is controlled by if its over another sprite as so.

    Ex the blue square would be what i want to decal.

    <img src="http://img836.imageshack.us/img836/3761/examplev.jpg">

    How would I go about doing this? Thanks in advance.

  • Yes the devs will often read peoples minds to know how they think something should work.

    I shouldn't have to say, Delay is a extremely simple thing. usually its written when the delay Is called the program takes the current time and stores it in a variable. Then once storedtime<Delay+storedtime. It triggers the evaluation.

    If you still do not understand Ill explain the workaround im currently using in Construct.

    I use three events and three variables(time, storedtime and trigger). the first event just adds 1 to time every second. The second event saves storedtime = time when I want the delay to start. The third just waits till storedtime+delay<time then turns trigger to 1 to activate the event.

  • now, Yes I'm aware you can jerryrig a delay with the function object as well as manually using the delay method that would be written in once a wait function is implemented. But this isn't a help thread is an suggestion thread.

  • Currently the 1# problem I run across when working on Construct Is the lack of having nothing to create a delay. Such as If object X collides with Object Y It dies 3 seconds later. the ability to time events would immensely help everyone.

    now, Yes I'm aware you can jerryrig a delay with the function object as well as manually using the delay method that would be written in once a wait function is implemented. But this isn't a help thread is an suggestion thread.

    Please add wait, your fans will thank you.

  • I'm working on the families and I want to get some confirmation on third events I made, as the only way I can see them being possible is heavy in jerry-rigging.

    basically how it works currently is (units is the family)

    first event:click on the attacker and it gathers the power and accuracy information as well as x and y position. as well as sets its pv "active" to 1

    second:click on the target takes the information from him and calculates damage and hit chance. and sets the "ready" global value to 1.

    third:constantly check's if there's a unit with active to 1 and the ready global value is 1. once both are 1 it sets the attacker unit's angle and fires the shot.

    This seems highly inefficient and I suspect there's an easier way.

    If not there should be, Like sprite variables/groups or something. something that you can identify a specific sprite for further reference without having to constantly reference it with some random variable.

    Something like:

    first event:click on the attacker and it gathers the power and accuracy information as well as x and y position. as well as sets its pv "active" to 1. Identify the attacker.

    second:click on the target takes the information from him and calculates damage and hit chance. and sets the "ready" global value to 1. sets the attacker unit's angle and fires the shot.

    thanks for the help.

zero_rogue's avatar

zero_rogue

Member since 11 Aug, 2009

None one is following zero_rogue yet!

Trophy Case

  • 15-Year Club

Progress

15/44
How to earn trophies