justifun's Recent Forum Activity

  • CJK - the overall idea was that i wanted to have different "waves" in the game, imagine space invaders.

    there would be an overall function or something else that would enable/disable which wave was active, so that i could either have a predetermined order of the incoming waves, or the option to do something like "activate wave (random 1,3)"

    so if there's a better way of doing it i'm all ears.

    Wave 2 and 3 are the same simply because i didnt fill out any more details of which monsters would be spawned in there etc. for the purpose of my question.

    But imagine this.....

    Wave 1 - Monsters spawn, wait a few seconds, then start playing some music, then when a few of them are killed a different type of monsters are spawned etc. and then perhaps after 100 are killed total WAVE 1 is disabled and WAVE 2 is enabled and executing a new series of spawns/music/etc etc

    Is there a simpler way to approach a wave after wave system like this?

  • Yeah being able to save and load the state would be awesome. Can't wait to show you what I have made so far with the plug in. It's been a lot of fun.

  • the MyVar& is your number variable that you are combining with the "name of player"

    so simply make it.

    set text . text = nameofplayer

  • you need to remove the extra quotes and & you have around your text strings

    wrong:set text.text= "&myvar&"&nameofplayer&"

    right:set text.text= myvar&nameofplayer

  • On ball collision with square

    (sub event) compare 2 values ball.x > square.x -> destroy ball 3

    (sub event) compare 2 values ball.x < square.x -> destroy ball 1

  • If all of your objects are in a family, you can do this

    on touched "FamilyOfObjects"

    (second condition) Pick Top Instance -> FamilyOfObjects - set opacity to 50

    it will only pick the highest object in the stack that was touched.

    Pick top/bottom instance is found in the very bottom right of the event actions btw.

  • i suggest you try the beginner tutorials out first to get a better understanding of everything though.

    but to make the dinosaur do something when he gets within a certain distance of the player

    compare 2 values - > distance(dinosaur.x, dinosaur.y, player.x, player.y) < 100 -> (action) insert whatever you want the dinosaur to do here once the distance of the dinosaur is less then 100 units in this case

  • D key is down - > set animation to walk

    D key is released -> set animation to idle

  • By looking it up i used the search function and searched for "converting gamepad axis to 360 degrees and someone had posted that math equation. I suck at math so i dont know why it works, but it does

  • Ok i looked it up, the fancy math way is

    Every tick set text.text to (angle(0,0,Gamepad.Axis(0, 0), Gamepad.Axis(0, 1)) % 360 + 360) % 360

    that gives you a value of the gamepad thumbstick axis between 0-360

    but the rectangle method as described above is easier to wrap your head around probably

  • angle(0,0,Gamepad.Axis(0, 0), Gamepad.Axis(0, 1)) is the angle of the left thumbstick

    so you can set and invisible sprite object to that angle every tick

    every tick - set sprite angle to angle(0,0,Gamepad.Axis(0, 0), Gamepad.Axis(0, 1))

    then if you check the angle of that sprite eg: it will give you a value between 0 and 360 degrees

    you can then divide that angle by 12 or however many slices as you need

    The easiest way for a GTA type circle weapon picking thing would be to create a invisible rectangle with a pivot point at one end. Place it in the center of your selection ring.

    then use

    every tick set rectangle angle to angle(0,0,Gamepad.Axis(0, 0), Gamepad.Axis(0, 1))

    on button press if rectangle is overlapping circle piece, then select that weapon.

    use it as a cursor of sorts to pick which slice is selected.

    this way you dont have to deal with any math either.. (i'm sure there's a fancier mathematical way to do this)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • mneilly - can you post the capx of the modified autorunner template plz?

justifun's avatar

justifun

Early Adopter

Member since 9 Oct, 2012

Twitter
justifun has 4 followers

Trophy Case

  • 13-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

21/44
How to earn trophies