Chris PlaysOldGames's Recent Forum Activity

  • Add function object by double clicking layout white space and selecting it (like you would add keyboard or mouse, etc). Then you can use function events and actions.

    You will need a basic scripting understanding of what functions are/do though.

  • It would be easier if you put your capx in a drobox or other media share site and posted a link to it for us to see where you have erred.

    If your rank isn't high enough for links you can still post them by putting spaces in them.

    My guess though is that your bullet behavior and/or bullet actions them self are to blame.. and it doesn't sound like your spawning at the target either.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You would need to use a global variable to do that.. or maybe call a function, haven't used Construct2 functions across multiple sheets yet but it "should" work...

  • Generally speaking rendering 4 sprites at once would require more than rendering one sprite frame at a time. Of course it the 4 sprites were small and the single with frames was larger you would reverse this situation.

    I don't do much mobile but what I understand is most mobile devices can handle 3x the screen resolution in sprites and backgrounds (non-tiled) at once at 60 fps... so a full resolution background plus a 25% coverage HUD would still allow quite a bit of sprite resolution not counting other drains on memory. OR I could be completely off.

  • You could always put all your colored projectiles into one static animation and then call them by frame# using a sequence variable.

    You would need to put an instance variable on your weapon, lets call it shotNumber=0. Set up conditions that refererence this variable then action out to spawn bullet object and set frame to appropriate color.. ie shotNumber=1 spawh object and set to blue frame, shotNumber=2... etc.

    As for the upcoming shot as long as you have a set frame order for the level (shotNumber1-2-3-4-5-6 = frames# 1-6.. then you could display object below weapon and show the next shotNumber value frame...

    For levels you would need a new order of frame numbers but you could put them all on one sheet and condition a global level=# in your events.

  • You could hack this with events but dsminor is right about a single dimensional array being best for what your trying to do.. would make it super easy to level change.

    Plus its a really good opportunity to force yourself to learn arrays in Construct2.. the 1d is really all you need for about 90% of Construct2 projects and it easy to learn.

  • All you need to do to log the position is to know the Y values from start to finish in the meter area and translate those values to your reading value. Then you just grab the current Y value (assuming X is constant) with Pointer.Y stored in instance variable that you compare with your actual values.. ie Y for meter = 100-300 you could output using Pointer.Y = <50 text = POWER: 100% or whatever...

    If your meter was exactly 100 pixels tall (or wide.. using X instead) it would be easy to translate to a 1-100% value to post to player (or show on meter) using (gulp) math... say you use Y pixel value 200-300 you could simply assign the Pointer.Y to a variable and subtract 200 for a 1-100% value... etc otherwise you would need to use complex math or a long series of value = result = value conditions.

    You could use a SINE behavior to make the pointer actually move up and down and use stop SINE behavior to make it stop at any point you choose.

  • As your code currently reads.. you may destroy the spite15 every time the layout starts and when his health is 0 or less but as long as the score value is over 20 he will respawn.

    Assuming you initialized BossIsDead to 0 when you made it.. otherwise add an action to On start of layout that sets value of BossIsDead to 0;

    You need to either add the condition BossIsDead=0 to the Create object Sprite15 on score over 20 event.

    OR you could add BossIsDead DOESNOT equal 1 condition to Sprite15 spawn event by creating a condition that says it DOES equal but then right click the condition and choose the red X to invert it to mean NOT.

    You will also need to move the System Add 1 to BossIsDead action to ABOVE the destroy action so he doesn't pop in for a split second before the variable stops him spawning.

    You add more conditions to events by right clicking the small area behind the current condition and choosing Add another condition... you can make many conditions inside a single event.

    Also not sure what the last System BossOneDead=0 is doing.. nothing at this point.... clear as mud?

  • I managed to do it using a simple sprite containing an instance variable called "Number" as a "brain" that obtained a random 1-3 via choose action and called on the box with that number in three events... the extra actions/events you see were a separate text box to bug test choose result to screen and to make the chosen text box spin around when chosen.

    Pic:

    https://drive.google.com/open?id=0Bx-ufu2WID53TV9PSnZWbG1lazQ

    [quote:bci02l6p] How can you say not equal to in C2? I tried the symbol and didn't work

    Use invert, right click the condition in the event and select the red X. It inverts the condition to a NOT state.

  • I played it for a bit (longer than I should have....) It looks and feels right to me. I tried to get it to get weird against objects but it functioned like I thought it should for a N,S,E,W control. What am I missing?

  • Make a global variable by right clicking canvas in event sheet and creating one. Name it BossOneDead and set its initial value to 0.

    Now wherever you create the boss right click in the left side boxes (not the actions, the conditions.. like On level start, etc) and choose add new condition and use system (gear) and select Compare global variable. Set it to BossOneDead=0. Now that event will not fire unless BossOneDead is equal to 0.

    Now go to where you destroy the boss after player kills him. Add the action Set global variable BossOneDead=1 right above the destroy action.

    Now once the player kills the boss he will stay dead.

  • For left and right you could use gravity along with bullet behavior to make it drop after thrown, your timer should make it break simulating hitting the ground when really it just looked like it, collisions with other objects could break it as normal.. Up and down shouldn't show drop, if so it could be done with scaling object size down to simulate fall when thrown up...

    as for direction of throw, set bullet angle of motion to player.angle wouldn't work?

Chris PlaysOldGames's avatar

Chris PlaysOldGames

Member since 22 Aug, 2014

Twitter
Chris PlaysOldGames has 1 followers

Trophy Case

  • 10-Year Club
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

12/44
How to earn trophies