SpookySkeleton's Forum Posts

  • Great advice, Octopus tophat! This brings it much better into perspective! I think I'll use your method instead.

  • Surprisingly, I found a work around! Will close this thread on request.

    X = 100

    a = random(0, 1) * X

    b = random(0, 1 - a) * X

    c = (1 - a - b) * X

  • Multiply X by a fraction that represents each object variable - the sum of the fractions should add up to 1.

    Hey Colludium!

    Thanks for the answer, but that's not exactly what I had in mind. I used X (100) as an example, but I'd prefer it to be dynamic as well as random. Say numbers like 317, or 61, you know, numbers that might not always be divisible by 5. Say I have something like three Stats, here are some example possible, desired outputs:

    You get 22 points to be assigned (22 can't be divided by 3 cleanly).

    -RNG build number 1-

    Str: 5

    Def: 8

    Dex: 9

    -RNG build number 2-

    Str: 3

    Def: 17

    Dex: 2

    -RNG build number 3-

    Str: 0

    Def: 0

    Dex: 22

    That way if I was to spawn items or mobs, it would scale with rarity. Say I want common objects to spawn with 52 points to use, while extremely rare spawns could use 133 points. If this doesn't make sense I am extremely sorry. If only there was a way to randomly select a private variable on an object I could keep assigning points and loop it until the stock was depleted. That was my original (hack) idea hahaha

  • Hello CC aficionados!

    I've got a simple question that I can't figure out. I want a sprite to spawn then be given a private variable of "statues points" (let's say 100)

    I want to be able to split those points randomly into five other private variables with it equaling the allocated "statues points" (100).

    for example

    Vit: 15

    Dex: 17

    Str: 35

    Int: 20

    Def: 13

    Which all equals 100

    tl; dr: dispersing a total point value, "X", randomly between multiple private variables that equals "X" when totaled

    Thank you so much for the time!

    Help is greatly appreciated!

  • Macbee This is fantastic! Can't believe I missed this one, thanks for the help!!

  • Bartosh

    Hey, I gave this a shot, it looks fantastic! I've played good old Infantry too! I know this thread is a coming up to being a year old, but if you still have those files kicking around, I'd LOVE to check them out. I'd PM you, but I need to work on my cred some more. Even if you don't have them, I hope you pick this back up some day! Thanks

  • What's up guys! <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy" />

    I've been hunting the forum for a way to get chromatic aberration to work. Anyone got any hints? I don't really know how it works, but I'll post some examples.

    Any help is appreciated! Thanks!

    i.ytimg.com/vi/n2vxfnr4mRI/maxresdefault.jpg

    tlc-systems.com/pp011185crp.jpg

    i.stack.imgur.com/VfOHj.jpg

  • lennaert

    Thanks guys! This solved my problem, and more!

    R0J0hound

    woof woof!

  • Hello! Right now I'm prototyping a turn-based sort of game. You move units around and it creates a wall behind themselves, kind of the same way snake does. <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink" />

    The trouble I'm having is, when you move a unit it spawns a tail piece that I'd like to give an individual private variable number to. Something like, if you move 4 spaces, create a trail of 4 tail pieces and number them 1, 2, 3, 4. I could give them a private variable when I spawn them, but I'd like it so if you lost a piece, the rest would be able to adjust accordingly.

    For example, The unit has 4 pieces: 1, 2, 3, 4. Looses the number 3 piece then the others would recalculate their variables to 1, 2, 3 instead of 1, 2, 4.

    If you want more info let me know. I've been searching keywords on the forum for an hour or two so I'd really appreciate a helping hand here! Thanks so much! <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy" /> <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy" /> <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy" />

    Cap file:

    mega.co.nz ... BkCNdaADf8

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Glad it worked! Good luck!

  • There are many ways to do this. If you posted the .cap it'll probably be easier to help. You could make a timer that spawns bullets depending on a "NextShot" variable, or after the Tri-shot/rockets/vulcan are destroyed, (like leaving the layout, hitting the player, after a timer) spawn the next attack, etc. It would probably be best to post your .cap

  • Link doesn't work for me. Perhaps post a .cap?

  • Hmm, I would say the trick is to set a destination for the bullet to hit no matter what before it's shot, then you know the start and end point of the projectile and can do the scale based on that (or, if you want it to always hit an object/around an object, just set the end point to somewhere near the target)

    That way you can set the size as a % of distance from the center between both points (so it could be 50% size at start and end, and 200% at the middle).

    Edit: Looks like you've got that idea started in your file already.

    Double edit: Found this on my PC from an old forum example someone made and it looks like it might actually be close to what you wanted so I tweaked it a bit (original was called: Top Down Artillery.cap): dl.dropboxusercontent.com/u/471 ... ectile.cap

    With some tweaking you could make the shadow change size too, but hopefully it's straight-forward!

    This is beautiful, Jayjay! You don't disappoint! Now that that's fixed, I can't procrastinate on my project anymore hahaha Take care!

  • ...You could use an invisble object for the actual projectile, and then the graphic can grow and shrink based on SINE functions (essentially it should be like "width = object.value('startwidth') + sin(object.value('throwtime')) * object.value('startwidth')" but that's just a rough example.

    Thanks for the reply, Jayjay!!

    I've been tossing that idea around, I wasn't sure if that would be the optimal way to implement. I hacked together a blotchy .cap where I regretfully don't think I got much closer...

    I have the attack split into two parts: A shadow sprite, which basically is a bullet that heads straight towards a target, and a block sprite that flies overhead. Like in the video examples I posted earlier. The problem I'm having is telling the block sprite when to move on the Y axis to create a depth effect. Basically getting the two sprites to separate and come together smoothly with different distances to the target. This feels like it should be so simple but I'm having a hard time cracking this one

    Here's a .cap showing where my progress is so far.

    Any more advice is strongly appreciated!!

  • Hello forum!

    I have been racking my brain for a way to create the illusion of 3d projectiles within a 2d platform. The example that I found was an older game (completely 2d), that managed to create depth with arrows, flying cows, etc., Stronghold Crusader (great game). I'll post a some links to examples of this technique being used. Pseudocode welcome. If you need more examples or have any input, please let me know! Thanks for looking!

    Flying cows: (Violence warning)http://youtu.be/rulL_S7KyG4?t=21m55s

    Arrows: youtube.com/watch