zero_rogue's Forum Posts

  • 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.

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • Ah-ha! I see where the train of thought got derailed. I thought any reference to a Family affects all sprites in it, however if you reference a single sprite in a family, much like they do with other sprites. It keep all other family references to that sprite. The wiki entry was really misleading in this..Thanks for the help.

    This was the hardest hurdle to get over for me, I already have the movement added in(using a jerry rigged system to be overhauled with families now ^_^) as well as the know-how to complete the remaining tasks, you may not know this but I've been lurking the forum and wiki off/on for about 4-5 months now.

    Ive already taken the plunge into this project and I'm not to be deterred. I'll drop the link to the project later down the road once I get a working model of it.

  • Ok let me explain what I'm doing... I'm basically making an turn biased Rpg style game. So I have multiple units of the same type(ie multiple copies of the same sprite each with its own numbers) on the field. I'm also going to have a leveling system so the more kills a unit gets the more improved its skills will be.

    What I need is a system of events that I can use for the attack of the units, so that i can click on the attacking unit, it grabs the attacking value, then click on the target,grab its defensive values, and the attack will be calculated then attack.

    The forumula I use for attacking uses the

    power, Accuracy, and weapon Range of the attacking units pv

    defense of the target unit's pv

    It also uses the Distance between the units.

    It also uses a few global variables but those can be added easy...

    I hope that clears things up on what I need. I think long story short I need something that can identify each individual sprite on screen then take the pv or other values from them. something like a Unique Id however I think UID's work only with each sprite.

    about families:from what I understand Families only work on all sprites in the family, meaning they can only retrive/add values to all the sprites in the families.

  • This will not work because I am looking to access the information form two unique sprites (private variables, and xy for one). Like I have said these sprites will be different each time I need to use this event, so I would like to have a system that would allow me to plug in the information from different sprites.

    From what I've seen Families do things globally only, and each unique sprite has its own values, I was thinking of using families to designate Each sprite but I don't know how to do that. (and couldn't find anything on the wiki about it.)

    let me say this again, In my project I will have about 40 sprites that will use this specific event in any combination.

    In case I was not clear by Unique I mean an individual sprite(with a unique id), not just all the same sprites. From what I've seen Currently of construct It will get the unique id of any individual sprite you reference previously in the event, however in this case I need two different sprites that cannot be referenced. (not without making approx 1,500 events, 80 events if I need to reference one of them.)