fassFlash's Forum Posts

  • Hey,

    I have yet to fully learn how families work but as I understand it a family group is considered a separate object to the objects that are children of it.

    What this means is when you have your actions call the families group it does not get your instanced variable for the object that is a child of it but the family object itself.

    I have not found a way so far to reference dynamically the child objects of a family. And believe me I have been trying as it would save me about 200 events in my event sheets.

    Yes, but families also have instance variables which are given to the objects inside that family. You do that by pressing right click on the family and selecting the "add instance variable". In this case, hp is a variable of the family.

  • Bam Bump.

  • https://www.dropbox.com/s/htodmstra9gz2 ... er093.capx

    Sorry, here's the capx. The code is in the "Common Sense" group.

  • So basically I have this code, where, when an enemy(aka Hurtables)dies(hp is below or equal 0), they drop an item, like, ammo for missiles, or hp. This event plays BEFORE the event where the enemy destroys itself.

    Before, I had instance variables called Drop and DropRandom. Drop was either yes or no, and it basically said if the enemy dropped an item or not. DropRandom was a variable that, when the enemy dies, rolled a number from 0 to 5. If the number is 2, it spawned hp, and if it's 5, it spawned a missile pickup. Yes, it's dumb. But it worked.

    What's not working is this. I replaced the Drop variable with a variable called DropProbability. If I wanted a Hurtable to not spawn anything, I would set the DropProbability to 0. And if I wanted a Hurtable to always spawn something, I would set the probability to 100 or 99. And that worked.

    However, 98 is a different story. It's a number that is very close to 100, yet, when enemies die with DropProb set to 98, they only spawn anything half the time, and I checked that multiple times. And when I actually set DropProb to 50, IT DOESN'T SPAWN *ANYTHING*. Here's the main event:

    [attachment=0:ynnarnoi][/attachment:ynnarnoi]

    There's also only 1 event for each pickup when it is destroyed, that is, when it's picked up. That busts my theory that pickups instantly self-destroy when they spawn for no reason. :/

  • If you're making a game for a computer, the node webkit object has a "quit" or "exit" action. Same goes for all the other platforms: They have a similar object for them that can have an "exit" action.

  • Thank you very much.

  • Ashley the Wait is usually and in this case 0 seconds. Does that still cause glitches?

  • The For Each helped! I didn't include the hurting itself into the loop, though.

    But it's really strange the glitch even occurred, So umm, Ashley ? This might be interesting.

  • Also, here's the capx (All the basic enemy hp code is located in the "Common Sense" group).

    https://www.dropbox.com/s/nwnozh79qnucu ... er085.capx

    Sumyjkl

    The hpMissile variable is there for times when I want to create an enemy that is impossible to kill with regular weapons, but dies from 1 missile shot, aka hp=9999999, hpMissile= 1.

    I'll try the For Each now.

  • Wait 4 seconds. It's in the System object.

    ...That's what you meant, right?

  • So here's this glitch that is really bothering me. Sometimes, when I kill an enemy, almost every other enemy dies. But that's the problem. Almost.

    I'd understand if all the enemies would die, because the code looks like this:

    https://www.dropbox.com/s/3ew3mfr4ziw3x ... emcode.png

    (There's also an hpMissile variable, which is basically deducted from when you hit something with a missile, but I didn't use it.)

    And it's easy to assume that in the action, C2 thinks that it needs to destroy all the instances of the "Hurtables" family, and not the one that was specified in the condition, aka got its health to less than 0. But in this case, only a select few die, while some enemies are still alive (huge success?), which makes no sense. Here's a video:

    Subscribe to Construct videos now

    Thank you.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Empty event

    Sub events:

    Condition: B Is mirrored Set A to Mirrored

    Else: Set A to not Mirrored

  • Is Safari on Mac or on Windows?

    (For me, testing my game on Mac never works, I use a Windows emulator to both develop and play it)

  • Where can I see the to-do list, shinkan ?

  • This is a very useful thing to have, because when you search for a family so you can add variables/objects to it, you have to read all the family names until you've found it, and that is, if you didn't forget the actual NAME of the family. If there were icons for them, we could search for families easier.

    Is there any way to do it?